[FieldTrip] Automatic artifact rejection after ICA
MILÁN MAILLO, IRIS
iris.milan at upf.edu
Mon Jul 15 16:39:23 CEST 2019
Hello everyone,
I am trying to do the automatic artifact rejection after removing ICA
components but I am having some trouble with cfg.dataset.
If I input the ". eeg" file, the artifact rejection is done with the
original file, which means that I lose all the preprocessing steps (data
segmentation and filtering) including the ICA. I have tried with inputting
the variable of the last step that I have done with the data (as you will
see in the code) but it does not work.
The same happened to me when I tried to segment my data in trials after
doing all the preprocessing and the ICA (which is what I originally wanted
to do), I lost everything when inputting cfg.dataset.
Here you have a bit of my coding for reference:
cfg = [];
cfg.dataset = data_ica_cleaned.trial(:,:);
cfg.continuous = 'no';
cfg.artfctdef.threshold.channel = 'all';
cfg.artfctdef.threshold.max = 75; %value in uV or T, default inf
cfg.artfctdef.threshold.min = -75; %value in uV or T, default -inf
cfg.artfctdef.threshold.interactive = 'yes';
[cfg, artifact] = ft_artifact_threshold(cfg, data_ica_cleaned);
cfg.viewmode = 'vertical';
cfg.layout = lay;
ft_databrowser(cfg,data_ica_cleaned);
This is what I get back:
Warning: The field cfg.dataset is forbidden, it will be removed from your
configuration
Error using ft_fetch_data (line 159)
some of the requested samples occur twice in the data and have conflicting
values
Error in ft_artifact_threshold (line 197)
dat = ft_fetch_data(data, 'header', hdr, 'begsample',
cfg.trl(trlop,1), 'endsample', cfg.trl(trlop,2), 'chanindx', channelindx,
'checkboundary', strcmp(cfg.continuous, 'no'));
It seems it is not doing anything, even when I put extreme threshold values
(-15 +15) it keeps saying:
the input is raw data with 64 channels and 107 trials
detected 0 visual artifacts
I hope I explained my problem in a simple way.. Does anyone have
any suggestions?
Thanks in advance,
Iris
--
*Iris Milán Maillo*
PhD Student
Speech Production and Bilingualism (SPB) <https://www.upf.edu/web/spb>
Center for Brain and Cognition (CBC) <http://cbc.upf.edu/cbc.upf.edu/>
Carrer de Ramon Trias Fargas, 25-27, 08005 Barcelona | Edifici Merce
Rodoreda, (room 24.311)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190715/72c32ec4/attachment-0001.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202
More information about the fieldtrip
mailing list