[FieldTrip] two events per trial

Cecile Issard cecile.issard at etu.parisdescartes.fr
Tue May 10 18:16:48 CEST 2016

Hi Tineke,

My problem is that the triggers for the onset and the offset of the stimulus are the same…

Message: 6
Date: Tue, 10 May 2016 08:55:39 +0000
From: "Snijders, T.M. (Tineke)" <tineke.snijders at donders.ru.nl<mailto:tineke.snijders at donders.ru.nl>>
To: FieldTrip discussion list <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>>
Subject: Re: [FieldTrip] two events per trial ?
<815A9820E75FBC4F96B7CD3A8089D11C378BF25F at exprd04.hosting.ru.nl<mailto:815A9820E75FBC4F96B7CD3A8089D11C378BF25F at exprd04.hosting.ru.nl>>
Content-Type: text/plain; charset="Windows-1252"

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<mailto:fieldtrip-bounces at science.ru.nl> [fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>] on behalf of Cecile Issard [cecile.issard at etu.parisdescartes.fr<mailto:cecile.issard at etu.parisdescartes.fr>]
Sent: Sunday, May 08, 2016 11:30 PM
To: fieldtrip at science.ru.nl<mailto: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
Cécile Issard
Laboratoire Psychologie de la Perception - UMR8242
45 rue des Sts Pères
75270 Paris cedex 06
Labo bébé : http://recherche.parisdescartes.fr/LBB

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160510/26741268/attachment-0001.html>

More information about the fieldtrip mailing list