Millisecond Forums

latency in the data base does not reflect trial duration

https://forums.millisecond.com/Topic29763.aspx

By dnaber - 9/24/2020

Hi, in my trials I put a trial duration of 5 seconds but I noticed that in the data base in the variable latency the duration is not 5000 but 4867. This is the case throughout all my trials. I tried both "/ trialduration = 5000" and "/ timeout = 5000" but none of them solves the problem. Can anybody give me a hint what to do? Thanks in advance.
By Dave - 9/24/2020

dnaber - 9/24/2020
Hi, in my trials I put a trial duration of 5 seconds but I noticed that in the data base in the variable latency the duration is not 5000 but 4867. This is the case throughout all my trials. I tried both "/ trialduration = 5000" and "/ timeout = 5000" but none of them solves the problem. Can anybody give me a hint what to do? Thanks in advance.

Latency isn't necessarily equal to trialduration. It depends on when the given trial *begins* listening to responses, which is -- by default -- when that trial's stimulus presentation sequence has finished. I.e. with

<trial example>
/ stimulustimes = [0=fixation; 133=stimulus]
/ validresponse = (anyresponse)
/ trialduration = 5000
</trial>

you'll get a latency of ~4867 if no response occurs.

Similarly, both /trialduration and /timeout *include* any /pretrialpause, so if you have

<trial example>
/ pretrialpause = 133
/ stimulusframes = [1=text.fixation]
/ validresponse = (noresponse)
/ trialduration = 5000
</trial>

<text fixation>
/ items = ("+")
</text>

<text stimulus>
/ items = ("stim")
</text>

you'll again see a latency of 4867. And that's exactly the way it should be.