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?
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.
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?