Improve I/O with EEGLAB
See original GitHub issueI have to work a bit with EEGLAB, and I’m not very familiar with it (yet) but I already noticed a couple of improvements that could be made to the I/O in my opinion.
Reader
Channel type is hard-coded to 'eeg' here while EEGLAB seems to support a larger variety of channel types.
From the documentation:
‘EEG’, ‘MEG’, ‘EMG’, ‘ECG’, ‘Events’, etc.
Proposition: Try to retrieve the channel types saved by EEGLAB and convert it to one of MNE channel types (e.g. 'EEG' -> 'eeg', 'Events' -> 'stim').
Writer / Export
Looking at export_set in eeglabio, it has an argument ref_channels that is not used by the export code. If I’m not mistaken, the referencing information is present in Info, so it could be passed to the .set file via this argument.
eeglabio.raw.export_set(
fname, data=raw.get_data(picks=ch_names), sfreq=raw.info['sfreq'],
ch_names=ch_names, ch_locs=cart_coords, annotations=annotations)
Support for channel type is not included in eeglabio, I would like to add it https://github.com/jackz314/eeglabio/pull/4
Once added to eeglabio, the exporter could make use of this additional argument.
TODO:
- Add support for MNE channel types in the reader (#9990)
- Add a warning when exporting with unapplied projectors + warning in documentation (#9994)
- Add support to export MNE channel types (depends on jackz314/eeglabio#4)
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (15 by maintainers)

Top Related StackOverflow Question
… and I think #8962 is good example actually, even though we haven’t settled on a solution there
Yes. And my opinion is still that we should move beyond FIFF when it is holding us back. EEG data is not stored in FIFF very often, and I believe other formats such as EDF or BrainVision do support storing the reference name.