You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if you have any tools for reading eeglab .set files (along with .fdt) and converting to mne-python representation?
It would have seemed easy to do if not for the fact that sometimes (always?) scipy.io.loadmat fails in reading eeglab .set files (eeglab .set files are just .mat files). See my issue on scipy repo here.
What do you mean by EEGLAB ICA files?
eeglab keeps everything packed in the EEG structure (the .set file; the eeg signal is usually kept as float32 in a separate .fdt file). ICA weights are kept in EEG.icaweights and EEG.icasphere. I was planning to extract these too.
Just BTW - I still can't import that file (or any other file for that study) I linked at the scipy issue through read_epochs_eeglab 😢 (on python 3 at least)
@KirstensGitHub this is not possible as of now. I suppose we could theoretically support it. But I don't know what the other developers have to say. I'm sure @agramfort has an opinion on this. @KirstensGitHub isn't it possible for you to save the epochs and then average it in MNE?
On my Windows 10 system, the mne.io.read_raw_eeglab reader always tried to append ".mat" to the .set file name with the error No such file or directory: 'xxxx.set.mat'. I tried reading the same EEG data in edf format , and mne.io.read_raw_edf() worked just fine. Not sure why .mat is automatically appended to the .set file name...
platform : win-64
conda version : 4.2.15
conda is private : False
conda-env version : 4.2.15
conda-build version : 2.0.2
python version : 2.7.13.final.0
requests version : 2.12.4
The error @KirstensGitHub had (didn't notice that discussion before) reminds me of another problem when reading set files - eeglab, when reading set + fdt files checks the filename in EEG.data but also the name of the set file (mne python only checks EEG.data). In some cases these names are not exactly the same (ie EEG.data.replace('.fdt', '.set') != set_filename) so might be good not to rely (at least not only) on EEG.data field.
I just realize I need to do "import scipy" first. Now mne.io.read_raw_eeglab () can read raw EEG .set files just fine. But I could not get the mne.read_epochs_eeglab () to read in the epoched datasets in EEGLAB to work. The reader always showed AttributeError.
epochs = mne.read_epochs_eeglab(fname)
File "C:\Users\Yang\Anaconda3\lib\site-packages\mne\io\eeglab\eeglab.py", line 241, in read_epochs_eeglab
uint16_codec=uint16_codec)
File "", line 2, in init
File "C:\Users\Yang\Anaconda3\lib\site-packages\mne\utils.py", line 708, in verbose
return function(*args, **kwargs)
File "C:\Users\Yang\Anaconda3\lib\site-packages\mne\io\eeglab\eeglab.py", line 484, in init
event_type = '/'.join(ep.eventtype.tolist())
AttributeError: 'int' object has no attribute 'tolist'
Hi,
I am working on a .fdt file. While ı am trying to read it with python scipy-loadmat, I am taking this error:
ValueError: Unknown mat file type, version 147, 65
what should I do in this situation, thanks for your helps!
Can you please provide the full traceback? Also for questions, the right place to ask is the mailing list. You should post on github only if you are reasonably sure you have a bug
Activity
jasmainak commentedon Dec 5, 2015
Not at the moment, but I think this would be a useful addition definitely.
mmagnuski commentedon Dec 6, 2015
I would be happy to dig into this, but I would have to use something else than
scipy.io.loadmatto open the.setfiles. I'll try usingh5pyorh5io...jasmainak commentedon Dec 6, 2015
I tried the sample data from EEGLAB and it seems to be loading fine using scipy. Let us know what solution you find for your file.
mmagnuski commentedon Dec 6, 2015
Did you try the file I link to in the issue here?
With
h5pyI'm gettingOSError: Unable to open file (File signature not found).mmagnuski commentedon Dec 6, 2015
I managed to open datasets from a different study with
loadmat. I'll investigate this in the next couple of days.jasmainak commentedon Dec 6, 2015
I just tried and both files work fine for me.
jasmainak commentedon Dec 6, 2015
... but I'm on python2.7
jona-sassenhagen commentedon Dec 6, 2015
This would be cool to have. Would you also do EEGLAB ICA files? :)
As a workaround, I've previously used the BVA export function of EEGLAB.
mmagnuski commentedon Dec 6, 2015
What do you mean by EEGLAB ICA files?
eeglab keeps everything packed in the EEG structure (the
.setfile; the eeg signal is usually kept as float32 in a separate.fdtfile). ICA weights are kept inEEG.icaweightsandEEG.icasphere. I was planning to extract these too.jona-sassenhagen commentedon Dec 6, 2015
Yes, I meant writing out the EEGLAB ICA structure to mne/fif ICA objects.
jasmainak commentedon Dec 6, 2015
I'm on it. I'll make a PR soon. @jona-sassenhagen you can lend a helping hand if you want ;) I'm not super-familiar with EEGLAB.
mmagnuski commentedon Jun 10, 2016
Just BTW - I still can't import that file (or any other file for that study) I linked at the scipy issue through
read_epochs_eeglab😢 (on python 3 at least)jona-sassenhagen commentedon Jun 10, 2016
A practical workaround might be downsampling in EEGLAB.
16 remaining items
KirstensGitHub commentedon Sep 25, 2016
another file-type-related question: is there a way to use mne.read_evokeds on the .fdt and .set files?
jasmainak commentedon Sep 25, 2016
@KirstensGitHub this is not possible as of now. I suppose we could theoretically support it. But I don't know what the other developers have to say. I'm sure @agramfort has an opinion on this. @KirstensGitHub isn't it possible for you to save the epochs and then average it in MNE?
jona-sassenhagen commentedon Sep 25, 2016
Is the EEGLAB format intended to store evoked data? I think it's intended for epochs and continuous.
EEGLAB is really not about evoked stuff, but about single trial stuff.
jasmainak commentedon Sep 25, 2016
This is indeed what I thought ...
zhang470 commentedon Jan 14, 2017
On my Windows 10 system, the mne.io.read_raw_eeglab reader always tried to append ".mat" to the .set file name with the error No such file or directory: 'xxxx.set.mat'. I tried reading the same EEG data in edf format , and mne.io.read_raw_edf() worked just fine. Not sure why .mat is automatically appended to the .set file name...
agramfort commentedon Jan 14, 2017
zhang470 commentedon Jan 14, 2017
scipy version: 0.18.1
platform : win-64
conda version : 4.2.15
conda is private : False
conda-env version : 4.2.15
conda-build version : 2.0.2
python version : 2.7.13.final.0
requests version : 2.12.4
jasmainak commentedon Jan 14, 2017
can you paste the error and also what exactly you are passing as
input_fname?mmagnuski commentedon Jan 14, 2017
The error @KirstensGitHub had (didn't notice that discussion before) reminds me of another problem when reading set files - eeglab, when reading set + fdt files checks the filename in EEG.data but also the name of the set file (mne python only checks EEG.data). In some cases these names are not exactly the same (ie EEG.data.replace('.fdt', '.set') != set_filename) so might be good not to rely (at least not only) on EEG.data field.
zhang470 commentedon Jan 14, 2017
I just realize I need to do "import scipy" first. Now mne.io.read_raw_eeglab () can read raw EEG .set files just fine. But I could not get the mne.read_epochs_eeglab () to read in the epoched datasets in EEGLAB to work. The reader always showed AttributeError.
File "C:\Users\Yang\Anaconda3\lib\site-packages\mne\io\eeglab\eeglab.py", line 241, in read_epochs_eeglab
uint16_codec=uint16_codec)
File "", line 2, in init
File "C:\Users\Yang\Anaconda3\lib\site-packages\mne\utils.py", line 708, in verbose
return function(*args, **kwargs)
File "C:\Users\Yang\Anaconda3\lib\site-packages\mne\io\eeglab\eeglab.py", line 484, in init
event_type = '/'.join(ep.eventtype.tolist())
AttributeError: 'int' object has no attribute 'tolist'
agramfort commentedon Jan 15, 2017
zhang470 commentedon Jan 17, 2017
Here are the epoched files from EEGLAB. I tested several other epoched files from different EEG experiments using different versions of EEGLAB. They all showed the same error. Thanks.
http://zhanglab.wikidot.com/local--files/method/KH1_TONE1K_IGN1_epoch.fdt
http://zhanglab.wikidot.com/local--files/method/KH1_TONE1K_IGN1_epoch.set
barisakin98 commentedon Dec 25, 2019
Hi,
I am working on a .fdt file. While ı am trying to read it with python scipy-loadmat, I am taking this error:
ValueError: Unknown mat file type, version 147, 65
what should I do in this situation, thanks for your helps!
jasmainak commentedon Dec 25, 2019
Can you please provide the full traceback? Also for questions, the right place to ask is the mailing list. You should post on github only if you are reasonably sure you have a bug
agramfort commentedon Dec 25, 2019