[FieldTrip] some of the requested samples occur twice

Robin robince at gmail.com
Fri May 31 18:14:15 CEST 2013

I have a problem in preprocessing where I am getting this error:

some of the requested samples occur twice in the data

Error in ft_artifact_zvalue (line 262)
      dat{trlop} = ft_fetch_data(data,        'header', hdr, 'begsample',
      trl(trlop,1)-fltpadding, 'endsample', trl(trlop,2)+fltpadding,
      'chanindx', sgnind, 'checkboundary', strcmp(cfg.continuous,'no
Error in ft_artifact_muscle (line 158)
    [tmpcfg, artifact] = ft_artifact_zvalue(tmpcfg, data);

I think this is because I am manually adding some extra padding to the
trials so that the artifact filtering can use that padding (I am doing
the artifact filtering on data in memory which is output from
ft_denoise_pca). So in this case it is not a problem if consecutive
trials overlap a bit.

I would therefore like to disable this error and wondered what is the
best way to do it. I am a bit confused because ft_artifact_zvalue
calls ft_fetch data with a "checkboundary" option which looks like it
might be what I want (and set correctly), but ft_fetch_data doesn't
seem to use that option. Instead it has an allowoverlap option.

So for now I will manually add the allowoverlap option to the call in
ft_artifact_zvalue, but I wondered what checkboundary doesn't appear
in ft_fetch_data or if this might be a bug.



More information about the fieldtrip mailing list