Save data to certain format

Dear all,

I loaded my eeg data from *.edf format files. After adding a duplicate
channel, I want to save the raw data back a *.edf format file:

raw.save('sample_edf.edf',overwrite=True)

The file seems to be much bigger than the original one, from 460,000 KB to
860,000 KB.

Also, when I try to import it to Matlab EEGLAB, it says:
EEGLAB error in function getfiletype() at line 1111:

Operands to be || and && operators must be convertible to logical scalar
values.

And then I try to open the *.edf file in EDFbrowser, and return error:
1th character of version field is not a valid 7-bit ASCII character. File
is not a valid EDF or BDF file.

I try to just read the *.edf file to python and save it to another *.edf
file, same errors occur.

QUESTION:
Is there a format of file I could export my raw data so that it is readable
in Matlab EEGLAB? Or is there a way to save the raw data to a readable
*.edf file?

Thank you very much for your time,

Sincerely,

Ning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160331/b2e6c1f0/attachment.html

Hi Ning,

The only output file from MNE is the *.fif. We read the multiple formats
but we have two options for getting the data out: 1. raw.save with the
*.fif, or 2. externally from the numpy.ndarray as an npy with `np.save` or
as a mat file with `scipy.io.savemat`. The latter seems like the most
suitable if you want to interact with EEGLAB in Matlab.

HTH,

teon

Thank you very much! It really helps!!

Ning

Hi Teon,

I try to use savemat to save the raw data, but savemat cannot handle
'nonetype' class. I delete all the empty fields from the raw using pop()
because I think raw is a dictionary. However, there are still 'nonetype'
class in raw. Do you know if there is a way to handle it?

Thank you very much for your time,

Ning

Have you tried having raw._data only ?

You can also read the fiff files in using the matlab toolbox

Using only raw._data works.

Ning

adding a few lines on this to the doc would be neat.

let's make it happen

A