[FieldTrip] requested data segment extends over a discontinuous trial boundary

Paul Dhami pdhami06 at gmail.com
Tue May 8 11:05:54 CEST 2018

Hi FieldTrip,

my name is Paul, and I'm a student studying response inhibition in
psychiatric disorders, as well as working with corresponding TMS-EEG data.

I was able to go through the analysis pipeline just fine with some ERP data
(preprocessed before imported to FieldTrip), but when using essentially the
same steps for some TMS-EEG data (also preprocessed before being imported
into FieldTrip), I ran into the following error at the
ft_preprocessing(cfg) command:

Error using ft_read_data (line 270)
> requested data segment extends over a discontinuous trial boundary
> Error in ft_preprocessing (line 582)
>       dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample',
> begsample, 'endsample',
>       endsample, 'chanindx', rawindx, 'checkboundary',
> strcmp(cfg.continuous, 'no'),
>       'dataformat', cfg.dataformat);

 My cfg that I entered with ft_preprocessing looked like this (altered the
filename just for this email):

      dataset: 'subject1.set'
>       trialdef: [1×1 struct]
>       trackusage: 'B8F919AB'
>       trackconfig: 'off'
>       checkconfig: 'loose'
>       checksize: 100000
>       showcallinfo: 'yes'
>       debug: 'no'
>       outputfilepresent: 'overwrite'
>       trackcallinfo: 'yes'
>       trackdatainfo: 'no'
>       toolbox: [1×1 struct]
>       notification: [1×1 struct]
>       progress: [1×1 struct]
>       callinfo: [1×1 struct]
>       version: [1×1 struct]
>       datafile: 'subject1.set'
>       headerfile: 'subject1.set'
>       dataformat: 'eeglab_set'
>       headerformat: 'eeglab_set'
>       trialfun: @ft_trialfun_general
>       event: [1×151 struct]
>       trl: [75×4 double]

Prior code to ft_preprocessing was:

cfg                         = [];
> % adding dataset field to configuration file
> cfg.dataset                 = [myfilepath '/' myfilename];
> %cfg.dataset = 'filename.set'
> % adding trialdef information to configuration file
> cfg.trialdef.eventtype      = 'trigger';
> cfg.trialdef.eventvalue     = 128; % TMS trigger
>  cfg.trialdef.prestim        = 1;
> cfg.trialdef.poststim       = 0.999;

Is there something that I am doing wrong as to why the ERP files were able
to be preprocessed just fine where as I am running into this error for the
TMS-EEG data? Is this likely related to the TMS-EEG data having been
collected in a "pseudo-continuous" manner, and in that case, is it as easy
as including the cfg.continuous = 'yes' option (which I noted in a couple
similar forum posts)?

Any help would be greatly appreciated.

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180508/9afc35a5/attachment-0001.html>

More information about the fieldtrip mailing list