[FieldTrip] ft_artifact_threshold

Yanina Prystauka yanina.prystauka at studenti.unitn.it
Fri Mar 13 04:44:16 CET 2015


Dear all,

I would like to automatically remove trials in which the min or max of the
signal exceeds 100 uv/T. So I am planning to use the ft_artifact_threshold
on the preprocessed data.

After running the following code

cfg = [];
cfg.continuous = 'no';
cfg.trl = 'dataRejBrows.sampleinfo';                     * %I am not sure
how to specify the cfg.trl since I already have the epochs I am interested
in; someone on the mailing list has suggested earlier to use the
.sampleinfo parameter.*
cfg.artfctdef.threshold.min       = -100;
cfg.artfctdef.threshold.max       =  100;
[cfg, artifact] = ft_artifact_threshold(cfg, dataRejBrows);

I get the following error message:

Index exceeds matrix dimensions.

Error in ft_artifact_threshold (line 149)
    dat = ft_fetch_data(data,        'header', hdr, 'begsample',
cfg.trl(trlop,1), 'endsample', cfg.trl(trlop,2),
    'chanindx', channelindx, 'checkboundary', strcmp(cfg.continuous, 'no'));

Error in reject_artifacts (line 59)
[cfg, withinhundred] = ft_artifact_threshold(cfg, dataAllRight);

I will appreciate any suggestions on how to proceed with this function!

Kind regards,
Yanina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150313/520ccbe2/attachment-0001.html>


More information about the fieldtrip mailing list