question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve I/O with EEGLAB

See original GitHub issue

I 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:open
  • Created 2 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
larsonercommented, Nov 11, 2021

… and I think #8962 is good example actually, even though we haven’t settled on a solution there

2reactions
cbrnrcommented, Nov 11, 2021

what was the reason for this? we have no fif constant tag to store this?

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EEG Preprocessing in EEGLAB
Why preprocess data? EEG data out of the recording device is a continuous unprocess signal. It is like measuring a difference of potential....
Read more >
Getting started with EEGLAB - FieldTrip toolbox
The FILE-IO plug-in allows reading raw data from disk into EEGLAB, from any of the file formats that is supported by FieldTrip.
Read more >
An Introduction to Coding in EEGlab - OSF
Decide how and where you want to analyze your data. • EEGLAB is a popular EEG pre-processing and analysis software based in Matlab....
Read more >
Processing data with EEGLAB - The Carpentries Incubator
Before we get started analyzing EEG data in EEGLAB lets take a look at how the functions operate in the Matlab environment. Matlab...
Read more >
f. BIDS pipeline - EEGLAB Wiki
... into EEGLAB, you can also visit the bids-matlab-io EEGLAB plugin documentation. ... A BOLD signal increase in the same areas is seen...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found