[FieldTrip] two events per trial ?

Snijders, T.M. (Tineke) tineke.snijders at donders.ru.nl
Tue May 10 10:55:39 CEST 2016

Hi Cecile,

One option is to run ft_definetrial two times.

First you specify only your onset triggers as cfg.trialdef.eventvalue, with the correct cfg.trialdef.prestim, and a random cfg.trialdef.poststim (e.g. 1).
Then you run
This gives you cfg_begin.trl which specifies the onset sample points of the trial in the first column, and the offset sample points of the trial in the second column (e.g. 1 second later, but you'll overwrite this later).

Now you specify only your offset triggers as cfg.trialdef.eventvalue, with cfg.trialdef.prestim=0.
You run:
This gives you cfg_offset.trl, with the first column being the offset sample points in your data.

Now you make your final trl, in which you replace the second column of cfg_begin with the first one of cfg_offset
for i=1:size(cfg_offset.trl)

For ft_preprocessing you then give cfg.trl=trl.


From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Cecile Issard [cecile.issard at etu.parisdescartes.fr]
Sent: Sunday, May 08, 2016 11:30 PM
To: fieldtrip at science.ru.nl
Subject: [FieldTrip] two events per trial ?


How can I specify that I have two events per trial (one for the onset and one for the offset of the stimulus) so that ft_definetrial finds the right (two times less) number of trials ?



Cécile Issard
PhD student
Laboratoire Psychologie de la Perception
CNRS UMR8242 - Université Paris Descartes
45 rue des Saints-Pères
75006 Paris

fieldtrip mailing list
fieldtrip at donders.ru.nl

More information about the fieldtrip mailing list