[Eeglablist] convert fieldtrip components to eeglab for IClabel

Roy Cox roycox.roycox at gmail.com
Fri Mar 11 10:26:18 PST 2022


hello,

I was wondering whether it's possible to apply IClabel (EEGLAB plugin) to
FieldTrip data?

I'm using FieldTrip (more specifically SleepTrip) to process 256-channel
sleep data (8 h, 500 recordings), and have been playing around with
Fieldtrip's runica/fastica etc (which as I understand it are just copies of
EEGLAB's versions). This returns quite reasonable looking eye/heart
components, but manual selection of artifactual components just isn't
feasible given our amount of data.

I've successfully used EEGLAB with IClabel on task data in the past, but
[for long list of reasons] we now want to stick to the FieldTrip/SleepTrip
environment and run ICA from there. I couldn't find functionality to
directly convert Fieldtrip component info to EEGLAB. But given that
FieldTrip and EEGLAB run identical ICA functions and (presumably?) have the
same output returned under the hood, I was imagining something like this
should be possible (simplified):















*%run ICA from Fieldtripcfg=[];cfg.method='runica';ft_comps =
ft_componentanalysis(cfg, my_ft_data);%create empty eeglab struct and
populate with relevant info from ft_comps and
my_ft_dataEEG_ica=eeg_emptyset;EEG_ica.chanlocs=  my_ft_data.elec %ensuring
correct orientation etcEEG_ica.icaact= ft_comps.[something]EEG_ica.icawinv=
ft_comps.[something]  ..and so on%call IClabel and identify bad
componentsEEG_ica=iclabel(EEG_ica)bad_components={some processsing of
EEG_ica.etc.ic_classification}*




*%return to Fieldtrip for component removal (and continue
processing)cfg=[];cfg.component=bad_componentsmy_ft_data_clean
 =ft_rejectcomponent(cfg, ft_comps);*

In order for this to work it's of course critical to know the exact
correspondence between FieldTrip's and EEGLAB's ica-related fields (at
least the ones required by IClabel), so I'm hoping there's someone out
there wielding these incredible powers :)

Best,
Roy



More information about the eeglablist mailing list