[FieldTrip] Rejecting BrainVision-marked 'Bad Intervals'

K S katemsto at gmail.com
Wed Oct 17 12:01:46 CEST 2018


Hi Vahab,

Thanks for the response.

The data is already epoched so I tried ft_redefine trial as you suggested.
I think the problem is that the segments marked as artefact are also marked
with triggers. I therefore need some way of saying:

"cfg.trials = {'s 1', 's 2'} except those also marked 'Bad Interval'"

I even tried cfg.trials = not('Bad Interval')  - it doesn't work. I tried
it also with ft_rejectartifact but I'm not sure how to get it to recognise
the 'Bad Interval' marking.

Any ideas?

Many thanks,
Kate


On Tue, Oct 16, 2018 at 10:13 PM Vahab Yousofzadeh <
bioeng.yoosofzadeh at gmail.com> wrote:

> Hi Kate,
>
> if it is a continuous data (before epoching), you can treat bad
> segments as an artifact (e.g. eog or muscle, etc) and do something
> like this,
>
> % artifact_EOG = [100  500]; % in sample
>
> cfg = [];
> cfg.artfctdef.eog.artifact    = artifact_EOG;
> cfg.artfctdef.reject          = 'value';
> %     cfg.artfctdef.value           = 0;  % replacing values with nan or 0
> data_continuous_eog_clean = ft_rejectartifact(cfg, data); % data is
> the output from ft_preprocessing.
>
> % inspecting cleaned data
> cfg             = [];
> cfg.continuous  = 'yes';
> cfg.viewmode    = 'vertical'; % all channels seperate
> cfg.blocksize   = 5;         % view the continous data in 30-s blocks
> ft_databrowser(cfg, data_continuous_eog_clean);
>
> if the data is epoched, simply use ft_redefinetrial.
>
> Best,
> Vahab
>


-- 
Kate Stone
PhD candidate
Vasishth Lab | Department of Linguistics
Potsdam University, 14467 Potsdam, Germany
https://auskate.github.io
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181017/7f641b45/attachment-0002.html>


More information about the fieldtrip mailing list