<div dir="ltr"><div>Hi FieldTrip,</div><div><br></div><div>my name is Paul, and I'm a student studying response inhibition in psychiatric disorders, as well as working with corresponding TMS-EEG data.</div><div><br></div><div>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:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Error using ft_read_data (line 270)<br>requested data segment extends over a discontinuous trial boundary<br>Error in ft_preprocessing (line 582)<br> dat = ft_read_data(cfg.datafile, 'header', hdr, 'begsample', begsample, 'endsample',<br> endsample, 'chanindx', rawindx, 'checkboundary', strcmp(cfg.continuous, 'no'),<br> 'dataformat', cfg.dataformat);</blockquote><div><br></div><div> My cfg that I entered with ft_preprocessing looked like this (altered the filename just for this email):</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="text-align:left"> dataset: 'subject1.set'</div><div style="text-align:left"> trialdef: [1×1 struct]</div><div style="text-align:left"> trackusage: 'B8F919AB'</div><div style="text-align:left"> trackconfig: 'off'</div><div style="text-align:left"> checkconfig: 'loose'</div><div style="text-align:left"> checksize: 100000</div><div style="text-align:left"> showcallinfo: 'yes'</div><div style="text-align:left"> debug: 'no'</div><div style="text-align:left"> outputfilepresent: 'overwrite'</div><div style="text-align:left"> trackcallinfo: 'yes'</div><div style="text-align:left"> trackdatainfo: 'no'</div><div style="text-align:left"> toolbox: [1×1 struct]</div><div style="text-align:left"> notification: [1×1 struct]</div><div style="text-align:left"> progress: [1×1 struct]</div><div style="text-align:left"> callinfo: [1×1 struct]</div><div style="text-align:left"> version: [1×1 struct]</div><div style="text-align:left"> datafile: 'subject1.set'</div><div style="text-align:left"> headerfile: 'subject1.set'</div><div style="text-align:left"> dataformat: 'eeglab_set'</div><div style="text-align:left"> headerformat: 'eeglab_set'</div><div style="text-align:left"> trialfun: @ft_trialfun_general</div><div style="text-align:left"> event: [1×151 struct]</div><div style="text-align:left"> trl: [75×4 double]</div></blockquote><div><br></div><div>Prior code to ft_preprocessing was:</div><div><br></div><div>
<span></span>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">cfg <span class="gmail-Apple-converted-space"> </span>= [];<br><span class="gmail-Apple-converted-space"> <br></span>% adding dataset field to configuration file<br>cfg.dataset <span class="gmail-Apple-converted-space"> </span>= [myfilepath <span class="gmail-s1" style="color:rgb(178,69,243)">'/'</span> myfilename];<br>%cfg.dataset = 'filename.set'<br>% adding trialdef information to configuration file<br>cfg.trialdef.eventtype<span class="gmail-Apple-converted-space"> </span>= <span class="gmail-s1" style="color:rgb(178,69,243)">'trigger'</span>;<br>cfg.trialdef.eventvalue <span class="gmail-Apple-converted-space"> </span>= 128; <span class="gmail-s2" style="color:rgb(37,153,45)">% TMS trigger<br></span><span class="gmail-Apple-converted-space"> </span>cfg.trialdef.prestim<span class="gmail-Apple-converted-space"> </span>= 1;<br>cfg.trialdef.poststim <span class="gmail-Apple-converted-space"> </span>= 0.999;</blockquote><div><br></div><div>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)? </div><div><br></div><div>Any help would be greatly appreciated.</div><div><br></div><div>Thank you.</div><div>Paul</div>
</div></div></div>