[FieldTrip] Error: requested samples occur twice in the data

Jörg Neuberg joerg.neuberg at tu-ilmenau.de
Wed May 1 20:42:25 CEST 2013


Hi FieldTrippers,

we are students using fieldtrip for a project at our university. Now, we have some trouble. We want to search for muscle artifacts and we receive an error message.
We started our signal processing with “ft_definetrial” to define the trials and “ft_preprocessing” to become our data. Then we cut out the stimulus artifact and interpolated the gaps. The data is saved as mat-file.

Now, we are looking for muscle artifacts with the following code:

---------- begin code --------
% channel selection, cutoff and padding
cfg.artfctdef.zvalue.channel = 'MEG*';
cfg.artfctdef.zvalue.cutoff      = 0.5;
cfg.artfctdef.zvalue.trlpadding  = 0;   
cfg.artfctdef.zvalue.fltpadding  = 0;
cfg.artfctdef.zvalue.artpadding  = 0.1;

cfg.artfctdef.muscle.bpfilter    = 'yes';
cfg.artfctdef.muscle.bpfreq      = [110 140];
cfg.artfctdef.muscle.bpfiltord   = 2;
cfg.artfctdef.muscle.bpfilttype  = 'but';
cfg.artfctdef.muscle.hilbert     = 'yes';
cfg.artfctdef.muscle.boxcar      = 0.2;

% make the process interactive
cfg.artfctdef.zvalue.interactive = 'yes';

[cfg, artifact_muscle] = ft_artifact_zvalue(cfg, data);
---------- end code --------

Unfortunately there is an error and we haven’t an idea where is the problem. Maybe the overlap of the trials is a reason for this. But we can’t change this for our data because we need this trial length. Example: trial 1 from 100 to 120, trial 2 from 115 to 135.

---------- begin error --------
searching for artifacts in 306 channel
searching trials.Error using ft_fetch_data (line 123)
some of the requested samples occur twice in the data

Error in ft_artifact_zvalue (line 260)
      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 muscle_artifacts (line 53)
[cfg, artifact_muscle] = ft_artifact_zvalue(cfg, data);”
---------- end error --------

Do you have any idea to help us? We would be grateful for any help.

Greetings,
Joerg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130501/2ab34fa4/attachment-0001.html>


More information about the fieldtrip mailing list