[FieldTrip] ft_databrowser & ft_rejectartifact - wrong number of trials rejected
Schoffelen, J.M. (Jan Mathijs)
jan.schoffelen at donders.ru.nl
Sun May 8 21:43:34 CEST 2016
Hi Christine,
Checking for the number of unique rows in the sampleinfo field does not ensure that the data are not overlapping.
e.g.
data.sampleinfo = [1 200;
100 300];
is a valid specification, and unique(data.sampleinfo, ‘rows’) gives 2, yet the samples are overlapping.
I don’t think the loss of chronology is causing the problem.
Best,
Jan-Mathijs
On 08 May 2016, at 14:10, Blume Christine <christine.blume at sbg.ac.at<mailto:christine.blume at sbg.ac.at>> wrote:
Dear Jan-Mathijs,
Many thanks for your swift response. You were right, I am losing the sampleinfo generatingtmpdata_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 indata_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?
Best,
Christine
________________________________
Von: fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl> [fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>]" im Auftrag von "Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl<mailto: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
Hi Christine,
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’.
Best,
Jan-Mathijs
On 08 May 2016, at 09:26, Blume Christine <christine.blume at sbg.ac.at<mailto:christine.blume at sbg.ac.at>> wrote:
Good morning,
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?
Many thanks!
Best,
Christine
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160508/72562723/attachment-0002.html>
More information about the fieldtrip
mailing list