[FieldTrip] Shift triggers

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Wed Mar 30 15:17:31 CEST 2016


Hi Sophia,

If you would like to stick to the default ft_trialfun_general, you could update the 3d column in your cfg_trl.trl matrix. This column contains the ‘offset’ for each trial, which specifies for the first sample in each trial the number of samples prior to what is defined as ‘time point zero’ for that trial. You should subtract or add round(0.015.*the-sampling-rate), depending on the intended direction of the shift. I leave it as exercise to you to determine whether to add or subtract.

Best,
Jan-Mathijs

On 30 Mar 2016, at 13:44, Irene Sophia Mayer <mi_mayer at gmx.de<mailto:mi_mayer at gmx.de>> wrote:

Dear Fieldtrippers,

I am defining my trials with the following code:

cfg                         = [];
cfg.dataset                 = infile;
cfg.trialdef.eventtype      = 'Stimulus';
cfg.trialdef.eventvalue     = 'S  1';
cfg.trialdef.prestim        = .1;
cfg.trialdef.poststim       = 2.2;
cfg_trl = ft_definetrial(cfg);

However, I have measured that my stimulus appeared 15ms late. Is there a way of shifting the triggers or the trials? Meaning, that trialdef does not take the actual time of the event but adds 15ms. Then this new value is considered for the prestimulus and poststimulus time as the new point zero.

Cheers,
Sophia
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160330/e8bf78d4/attachment-0002.html>


More information about the fieldtrip mailing list