[FieldTrip] Importing EEGLAB data into Fieldtrip

Julian Keil julian.keil at gmail.com
Thu Mar 31 17:40:32 CEST 2022


Dear Luisa,

Regarding your first question, it is im my experience easier to recreate the .trialinfo field from the EEGLab event-info after exporting from EEGLab to FieldTrip.
You can find an example from a recent project here:
https://osf.io/ph5xm/ <https://osf.io/ph5xm/> for the export to Fieldtrip
https://osf.io/n27pe/ <https://osf.io/n27pe/> for the function to get the trial-info

Regarding your ICA-questions, in the aforementioned project, I did the whole preprocessing in EEGLab, including the IC rejection, as I only needed the „clean“ data later on. However, I guess this strongly depends on what you want to do with your data later on.

Hope this helps,

Julian

________________
Prof. Dr. Julian Keil

Biologische Psychologie
Olshausenstraße 62 - R. 306
24118 Kiel

0431 / 880 - 4872
http://www.biopsych.uni-kiel.de/


> Am 31.03.2022 um 16:35 schrieb Luisa Roeder via fieldtrip <fieldtrip at science.ru.nl>:
> 
> Dear Community, 
>  
> My name is Luisa Roeder and I am a postdoc in Prof Joachim Hermsdoerfer’s lab at Technical University Munich. Currently, we are working on a grip force control project, and I am analysing combined EEG-EMG data.
> I hope my email is not too long; I have a few questions re importing data from EEGLAB to Fieldtrip.
>  
> I have pre-processed the data in EEGLAB and would now like to import them into Fieldtrip. For this, I used ft_preprocessing with the details shown below. However, in the Fieldtrip structure I receive, I cannot seem to find any information on the events/triggers I had in the .set file.
> Where do I find the event information that was saved in the eeglab (.set) file as EEG.event? Is it possible to also import this event information (i.e. their indices and type of event) into Fieldtrip, or do I need to save this information separately and then use ft_definetrial to re-create my events in fieldtrip? If this is the case, what would be the best way/structure and file format for saving the events from eeglab?
>  
> Below are the details of my code and output:
> cfg = []; cfg.dataset = 'data01_cond1.set'; ft_data1 = ft_preprocessing(cfg);
>  
> and receive the output 
> ft_data1 = 
>   struct with fields:
>            hdr: [1×1 struct]
>          label: {61×1 cell}
>           time: {[1×692901 double]}
>          trial: {[61×692901 double]}
>        fsample: 500
>     sampleinfo: [1 692901]
>           elec: [1×1 struct]
>            cfg: [1×1 struct]
>  
>  
> I noticed when I use 
> ft_data1 = eeglab2fieldtrip(EEG, ‘raw’);
> with segmented (epoched) EEGLAB data, I receive some information on my trigger events I used for segmenting (in ft_data1.trialinfo), but this does not include the indices of the events (‘latency’ in EEG.event), nor the other types of events I had in EEGLAB in addition to the trigger I used for segmenting (also saved in EEG.event). In my case I have six different types of events in EEG.event which I would like to import into Fieldtrip.
> The output from eeglab2fieldtrip(EEG,’raw’) is
> ft_data1 = 
>   struct with fields:
>          elec: [1×1 struct]
>       fsample: 500
>         trial: {1×99 cell}
>          time: {1×99 cell}
>         label: {1×61 cell}
>     trialinfo: [99×2 table]
>           cfg: [1×1 struct]
>  
> In general, is it best to import continuous data into Fieldtrip or segmented data?
>  
> I have another few questions re importing/book-keep the ICA results from EEGLAB once I import my data into Fieldtrip.
> Is it best to exclude ICs in EEGLAB, then back project onto channels and then export the clean channel data into Fieldtrip? How do I keep track of the rank/dimensionality of the clean data then? Should I additionally also export the ICA results via ft_ICdata = eeglab2fieldtrip(EEG, 'comp'); and save those results separately? In the EEGLAB tutorials it is recommended to only mark/flag the ICs but not to reject artefact ICs – if I do that, how do get this information across to Fieldtrip?
>  
> Thank you for your help. 
> Best,
> Luisa
>  
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip <https://mailman.science.ru.nl/mailman/listinfo/fieldtrip>
> https://doi.org/10.1371/journal.pcbi.1002202 <https://doi.org/10.1371/journal.pcbi.1002202>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220331/6a96463c/attachment.htm>


More information about the fieldtrip mailing list