Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to EEGLAB format? #1152

Closed
laemtl opened this issue Jul 18, 2023 · 8 comments · Fixed by #1187
Closed

Export to EEGLAB format? #1152

laemtl opened this issue Jul 18, 2023 · 8 comments · Fixed by #1187

Comments

@laemtl
Copy link
Contributor

laemtl commented Jul 18, 2023

I try to write a raw object using

raw = mne.io.read_raw_eeglab(input_fname=file, preload=False, verbose=True)
write_raw_bids(raw, bids_basename, allow_preload=False, overwrite=False, verbose=False)

and I got the following error:

Cannot write file - The data has already been loaded from disk. To write it to BIDS, pass "allow_preload=True" and the "format" parameter.

When I set allow_preload to True, I then get
For preloaded data, you must set the "format" parameter to one of: BrainVision, EDF, or FIF

The issue is I don't see an option of EEGLAB/set file.

Is this a know issue? Am I doing something wrong?

@hoechenberger
Copy link
Member

hoechenberger commented Jul 18, 2023

I don't think we support writing to EEGLAB. You can try to write to BrainVision instead

@agramfort
Copy link
Member

agramfort commented Jul 19, 2023 via email

@hoechenberger
Copy link
Member

For preloaded data, you must set the "format" parameter to one of: BrainVision, EDF, or FIF

You will have to pick one of those. No EEGLAB support so far. Sorry!

@sappelhoff
Copy link
Member

We can consider adding support for exporting to EEGLAB, using this library: https://github.com/jackz314/eeglabio

@sappelhoff sappelhoff changed the title Issue with preloaded data Export to EEGLAB format? Jul 19, 2023
@christinerogers
Copy link

christinerogers commented Jul 19, 2023

Thanks @sappelhoff
Full support for .SET would help us make open-source BIDS converter tools like EEG2BIDS accessible for many more BIDS-compliant cases, especially for researchers looking to move away from manufacturer-driven data formats like BV.

(Let us know if there's a separate issue to follow up on for this, my colleague @laemtl is raising this somewhat related also to #1151 )

@sappelhoff
Copy link
Member

Full support for .SET would help us make open-source BIDS converter tools like EEG2BIDS accessible for many more BIDS-compliant cases, especially for researchers looking to move away from manufacturer-driven data formats like BV.

3 comments on this:

  1. The EEGLAB data format is not "RECOMMENDED" under BIDS, it's merely "accepted" based on its wide distribution
  2. it's a MATLAB file in disguise
  3. The mne-bids devs (to my knowledge) don't work actively with the EEGLAB format themselves

that maybe explains why so far there have been only little efforts to support this file format.

Having that said, we'd welcome contributions in the form of PRs (perhaps by @laemtl) to allow export to EEGLAB.

What do you think @hoechenberger @agramfort ?

@hoechenberger
Copy link
Member

Isn't Matlab simply HDF5 these days? Hence I don't see why (modern) EEGLAB shouldn't be fully supported by BIDS (and hence MNE-BIDS)

@sappelhoff
Copy link
Member

sappelhoff commented Jul 20, 2023

@christinerogers @laemtl @jeffersoncasimir

Please see this issue as a list of To Dos as to improve EEGLAB functionality of mne-bids:

We'd be happy to review PRs to improve the state of the art. And perhaps working on these "smaller" items can be done in parallel to the present issue of also exporting to the EEGLAB format.

FYI, I have created a project board for all EEGLAB related issues: https://github.com/mne-tools/mne-bids/projects/10#card-89935503

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

5 participants