HDF5

External Email - Use Caution

Dear all:

I am getting a raw object from a peryst EEG data. I am trying to take the raw data and save like this;

with h5py.File("C:\\Users\\Andres\\Desktop\\h5_data.h5", 'w') as hdf:
    hdf.create_dataset('Data1', data=raw)

But when I try to save it it gives me this error

~\anaconda3\envs\mne\lib\site-packages\mne\io\pick.py in _picks_to_idx(info, picks, none, exclude, allow_empty, with_ref_meg, return_kind)
   1030 % (-n_chan, orig_picks))
   1031 if (picks >= n_chan).any():
-> 1032 raise ValueError('All picks must be < n_channels (%d), got %r'
   1033 % (n_chan, orig_picks))
   1034 picks %= n_chan # ensure positive

ValueError: All picks must be < n_channels (129), got 129

Any help ?

External Email - Use Caution

with h5py.File("C:\\Users\\Andres\\Desktop\\h5_data.h5", 'w') as hdf:

    hdf.create_dataset('Data1', data=raw)

You probably need to pass `data=raw.get_data()` so that you input a numpy
ndarray to the h5py function rather than a Raw instance.

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200930/9cbeb0c1/attachment-0001.html