Skip to content

Adding EEG .set files containing ica. - #55

Merged
larsoner merged 1 commit into
mne-tools:masterfrom
christian-oreilly:eeglab_ica
Oct 9, 2019
Merged

larsoner merged 1 commit into
mne-tools:masterfrom
christian-oreilly:eeglab_ica

Conversation

@christian-oreilly

Copy link
Copy Markdown
Contributor

Fixes mne-tools/mne-python#6917

EEGLAB/test_raw.set is identical to its previous version, but with added information on an ICA. It was generated from the original file using the following Matlab code:

file_name_in = '/home/christian/mne-testing-data/EEGLAB/test_raw.set';
EEG = pop_loadset(file_name_in);
N_of_Components = 25;
[EEG.icaweights, EEG.icasphere] = runica(reshape(EEG.data,EEG.nbchan,EEG.pnts*EEG.trials), 'pca', N_of_Components);
EEG.icawinv    = [];
EEG.icaact     = [];

flags = zeros(N_of_Components, 1);
flags(5) = 1;
flags(12) = 1;
flags(20) = 1;
s = struct('label', 'manual', ...
           'line_color', [0.7000 0.7000 0.7000],...
           'order', 1,...
           'flags', flags);

EEG.marks.comp_info = [s];
EEG = eeg_checkset(EEG);
pop_saveset(EEG, 'filename', file_name_in);

EEGLAB/test_raw.cleaned.* files are versions of EEGLAB/test_raw.* to which the ICA has been applied. Components manually marked for rejection have been removed from the ICA transformation, simulating a ICA artifact rejection for example. These files have been generated using the following Matlab code:

EEG = pop_marks_select_data(EEG,'component marks',[],'labels',{'manual'},'remove','on');
pop_saveset(EEG, 'filename', [file_name_in(1:end-4) '.cleaned.set']);

@larsoner

larsoner commented Oct 9, 2019

Copy link
Copy Markdown
Member

Why is there a .fdt file in there? Isn't that FieldTrip?

@christian-oreilly

Copy link
Copy Markdown
Contributor Author

My understanding is that EEGLAB has a kind of metadata file (.set) which points to the actual data (.fdt). Note that it just mirrors what was already in the repository (I didn't add or modified the test_raw.fdt file that was already in this repository).

@larsoner

larsoner commented Oct 9, 2019

Copy link
Copy Markdown
Member

Ahh okay

@larsoner
larsoner merged commit 5389e4c into mne-tools:master Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import ICA results from EEGLAB

2 participants