Welcome! Log In Create A New Profile


rt (reaction time)

Posted by Jaewon 
rt (reaction time)
June 26, 2019 05:11PM
At the end of each trial, the value assigned to a variable, 'rt', is used to update the default reaction time graph in the control screen. The value is also stored in TrialRecord.ReactionTimes and the data file (*.bhv2) for online and offline reference, respectively.

In the original ML, the reaction time that eyejoytrack() returns is calculated from the beginning of eyejoytrack(). Since stimuli are presented by toggleobject() before eyejoytrack() starts, this produces a number slightly shorter than the time measured from the stimulus onset, although the difference is small.
[ontarget, rt] = eyejoytrack('acquirefix',1,3,1000);  % rt is the time from the start of eyejoytrack()

NIMH ML still supports the above method and also provides a way to calculate the reaction time from the stimulus onset.
t_flip = toggleobject(1);
[ontarget, ~, t_resp] = eyejoytrack('acquirefix',1,3,1000);  % Only NIMH ML returns the 3rd output
rt = t_resp - t_flip;

In the scene framework, you can check the RT property of the following adapters after the scene ends.

WaitThenHold, FreeThenHold, MultiTarget, OnsetDetector

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.