<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Cecile,
<div class=""><br class="">
</div>
<div class="">This sounds like a quasi serious flaw in your experimental setup. In general I would advice against the definition of the same event code for different events. In case one (or more) triggers are lost upon collection, it will be not trivial to
correctly reconstruct the events post-hoc (in which case you always need to rely on an extra source of data , e.g. a logfile written out by your stimulus presentation software, where you then have to assume that all went well). </div>
<div class="">Anyway, after this pedagogical note, the only thing I could come up with, is to write a custom ‘trialfun’ for your purposes, which selects every second equally valued event to be the ‘begin-of-trial’ trigger.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 10 May 2016, at 18:16, Cecile Issard <<a href="mailto:cecile.issard@etu.parisdescartes.fr" class="">cecile.issard@etu.parisdescartes.fr</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Tineke,
<div class=""><br class="">
</div>
<div class="">My problem is that the triggers for the onset and the offset of the stimulus are the same…</div>
<div class=""><br class="">
</div>
—
<div class="">Message: 6<br class="">
Date: Tue, 10 May 2016 08:55:39 +0000<br class="">
From: "Snijders, T.M. (Tineke)" <<a href="mailto:tineke.snijders@donders.ru.nl" class="">tineke.snijders@donders.ru.nl</a>><br class="">
To: FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>><br class="">
Subject: Re: [FieldTrip] two events per trial ?<br class="">
Message-ID:<br class="">
<span class="Apple-tab-span" style="white-space: pre;"></span><<a href="mailto:815A9820E75FBC4F96B7CD3A8089D11C378BF25F@exprd04.hosting.ru.nl" class="">815A9820E75FBC4F96B7CD3A8089D11C378BF25F@exprd04.hosting.ru.nl</a>><br class="">
Content-Type: text/plain; charset="Windows-1252"<br class="">
<div class=""><br class="">
</div>
<div class="">Hi Cecile,<br class="">
<br class="">
One option is to run ft_definetrial two times.<br class="">
<br class="">
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).<br class="">
Then you run<br class="">
cfg_begin=ft_definetrial(cfg)<br class="">
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).<br class="">
<br class="">
Now you specify only your offset triggers as cfg.trialdef.eventvalue, with cfg.trialdef.prestim=0.<br class="">
You run:<br class="">
cfg_offset=ft_definetrial(cfg)<br class="">
This gives you cfg_offset.trl, with the first column being the offset sample points in your data.<br class="">
<br class="">
Now you make your final trl, in which you replace the second column of cfg_begin with the first one of cfg_offset<br class="">
<br class="">
trl=cfg_begin.trl;<br class="">
for i=1:size(cfg_offset.trl)<br class="">
trl(i,2)=cfg_offset.trl(i,1);<br class="">
end<br class="">
<br class="">
For ft_preprocessing you then give cfg.trl=trl.<br class="">
<br class="">
Best,<br class="">
Tineke<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
________________________________________<br class="">
From: <a href="mailto:fieldtrip-bounces@science.ru.nl" class="">fieldtrip-bounces@science.ru.nl</a> [<a href="mailto:fieldtrip-bounces@science.ru.nl" class="">fieldtrip-bounces@science.ru.nl</a>] on behalf of Cecile Issard [<a href="mailto:cecile.issard@etu.parisdescartes.fr" class="">cecile.issard@etu.parisdescartes.fr</a>]<br class="">
Sent: Sunday, May 08, 2016 11:30 PM<br class="">
To: <a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a><br class="">
Subject: [FieldTrip] two events per trial ?<br class="">
<br class="">
Hello,<br class="">
<br class="">
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 ?<br class="">
<br class="">
Best,<br class="">
<br class="">
C?cile<br class="">
<br class="">
?<br class="">
C?cile Issard<br class="">
PhD student<br class="">
Laboratoire Psychologie de la Perception<br class="">
CNRS UMR8242 - Universit? Paris Descartes<br class="">
45 rue des Saints-P?res<br class="">
75006 Paris<br class="">
<div class="">
<div class="">Cécile Issard</div>
<div class="">Doctorante</div>
<div class="">01.42.86.43.20</div>
<div class="">Laboratoire Psychologie de la Perception - UMR8242</div>
<div class=""><span style="font-family: arial, sans-serif; font-size: 13px;" class="">45 rue des Sts Pères</span><br style="font-family: arial, sans-serif; font-size: 13px;" class="">
<span style="font-family: arial, sans-serif; font-size: 13px;" class="">75270 Paris cedex 06</span><br style="font-family: arial, sans-serif; font-size: 13px;" class="">
<a href="http://lpp.psycho.univ-paris5.fr/index.php" target="_blank" style="font-family: arial, sans-serif; font-size: 13px;" class="">http://lpp.psycho.univ-paris5.fr/index.php</a>
<div style="font-family: arial, sans-serif; font-size: 13px;" class="">Labo bébé : <a href="http://recherche.parisdescartes.fr/LBB" target="_blank" class="">http://recherche.parisdescartes.fr/LBB</a></div>
</div>
<div class=""><br class="">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>