[FieldTrip] ft_databrowser & ft_rejectartifact - wrong number of trials rejected
christine.blume at sbg.ac.at
Sun May 8 14:10:49 CEST 2016
Many thanks for your swift response. You were right, I am losing the sampleinfo generating tmpdata_small. However, even when I use the original data, i.e. data_segm_offsetcorr that includes the sampleinfo, the problem continues to occur. However, I now get the warning that samples are present in multiple trials. Checking the the number of unique rows in data_segm_offsetcorr.sampleinfo however finds the correct number of trials, it seems as if there were no doublings (which I would also not expect).
My trials are not in chronological order, though, but sorted according to data_segm_offsetcorr.trialinfo. May that confuse fieldtrip?
Von: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl]
Gesendet: Sonntag, 08. Mai 2016 09:46
An: FieldTrip discussion list
Betreff: Re: [FieldTrip] ft_databrowser & ft_rejectartifact - wrong number of trials rejected
Are you sure that the tmpdata_small and data_segm_offsetcorr are consistent with respect to each other? As long as this is not the case, I am not surprised that fieldtrip ‘misbehaves’.
On 08 May 2016, at 09:26, Blume Christine <christine.blume at sbg.ac.at<mailto:christine.blume at sbg.ac.at>> wrote:
I discovered that using ft_databrowser & ft_rejectartifact to preprocess my EEG data, often the wrong number of trials is rejected. This is the code I am using and it inherits data resulting from ft_redefinetrial.
cfg = ;
cfg.latency = [-2 2]; % period of interest
tmpdata_small = ft_selectdata(cfg,data_segm_offsetcorr);
cfg = ;
cfg.layout = layout2;
cfg.showlabel = 'yes';
cfg.channel = 'EEG';
cfg.gradscale = 0.04;
cfg.continuous = 'no';
% filtering only for artifact rejection
cfg.preproc.lpfilter = 'yes';
cfg.preproc.lpfreq = 40;
cfg_databrowser = ft_databrowser(cfg, tmpdata_small);
data_segm_offsetcorr = ft_rejectartifact(cfg_databrowser, data_segm_offsetcorr);
If I now, for example mark 10 trials in the databrowser and then run ft_rejectartifact, it tells me:
detected 10 visual artifacts
rejected 8 artifacts completely
Something seems to be wrong here as I clearly marked 10 artifacts (don't really care whether they are visual or not), but only 8 are removed. The problem gets worse when I call the function a second time, which is when usually none of the marked artefacts are rejected at all.
Any idea where the problem could be?
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fieldtrip