[FieldTrip] Rejecting BrainVision-marked 'Bad Intervals'

Vahab Yousofzadeh bioeng.yoosofzadeh at gmail.com
Tue Oct 16 22:12:06 CEST 2018


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



More information about the fieldtrip mailing list