[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
cfg_begin=ft_definetrial(cfg)
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:
cfg_offset=ft_definetrial(cfg)
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
   
trl=cfg_begin.trl;
for i=1:size(cfg_offset.trl)
   trl(i,2)=cfg_offset.trl(i,1);
end

For ft_preprocessing you then give cfg.trl=trl.

Best,
Tineke




________________________________________
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 ?

Hello,

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 ?

Best,

Cécile

—
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
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




More information about the fieldtrip mailing list