Exporting data to EEGLAB

Hi,
I need to import dataset into matlab/eeglab from mne python’s date to .set function.
I am unable to save dataset using saveset (‘name.set’) function! or in another extension that the dataset opens in matlab.
Can you help me?
thanks!

Hello @leticiabragas2 and welcome to the forum!

You can export raw data to EEGLAB via raw.export(), please see the respective documentation:

https://mne.tools/stable/generated/mne.io.Raw.html#mne.io.Raw.export

Best wishes,
Richard

1 Like

Hello @richard @agramfort

I want to use a preprocessing pipeline done in EEGLAB (APICE) but before that I need to correct some triggers timepoints which I do in MNE python as it seems easier to me to access data through MNE.
So I import . bdf continuous file in MNE, do my event changes and then I want to save it to .set format (or .bdf) to be able to continue preprocess it in EEGLAB.

I have tried the code below to export to .set

from eeglabio.utils import export_mne_raw
export_mne_raw(data, ‘newfilename.set’)

but once I try to import the data in EEGLAB using pop_loadset() it says “Couldn’t order data set fields properly”.
In EEG.chanlocs I noticed that channel locations are empty and that no events have been saved.
So I have some questions:

  • is there any way of specifying channel locations for Biosemi system as does the file “'standard-10-5-cap385.elp” in EEGLAB ? Is there a proper way to read the elp format file to be able to specify channel locations in MNE before exporting ? It only save a .set file and no .fdt file : is this a related problem ?

  • do you have any suggestions regarding exporting MNE raw files to EEGLAB readable format in 2023 ?
    I have to say I am pretty new to eeg processing so sorry if my questions seem too obvious.

Thank you for your help and the amazing work in MNE.

Best Regards