Thanks, I will make a more clear detailed example.
Now, my goal is to use the log file to obtain the reaction time of a participant on a trial, assuming that we want the reaction time from approximately the onset of the stimuli in the trial, and I marked the “Sync to Screen Timing” to ensure that is what the program does.
We have this in the .csv output and here are the reaction times in milliseconds for the first three trials based on the csv: 587.175, 464.94, 286.35000000000000.
Now, I will go into the log file and find that we can get almost the exact same reaction time values by using the log outputs. Here is an example of a snippet of the log file for the first trial, with some marked code denoting when we call the screen to render:
|132.98521499999333|EXP|monster2_pre: size = [0.4,0.4]|
|---|---|---|
|132.98521499999333|EXP|keyboard_im_pre: autoDraw = true|
|132.98521499999333|EXP|monster3_pre: autoDraw = true|
|132.98521499999333|EXP|monster4_pre: autoDraw = true|
|132.98521499999333|EXP|monster1_pre: autoDraw = true|
|132.98521499999333|EXP|monster2_pre: autoDraw = true|
|132.98521499999333|EXP|monster2_pre: size = [0.42511363636363636,0.42511363636363636]|
|132.98521499999333|EXP|fake_text_to_keep_images_on_screen: autoDraw = true|
return Scheduler.Event.FLIP_REPEAT; is called after the above commands. All of the above commands took place in the RoutineBegin and RoutineEachFrame code before we render the screen.
|133.00683000002755|EXP|monster2_pre: size = [0.4502272727272727,0.4502272727272727]|
|133.01615500001935|EXP|monster2_pre: size = [0.47534090909090904,0.47534090909090904]|
|133.03105500002857|EXP|monster2_pre: size = [0.5004545454545454,0.5004545454545454]|
|133.04909500002395|EXP|monster2_pre: size = [0.5255681818181818,0.5255681818181818]|
|133.06635000003735|EXP|monster2_pre: size = [0.5506818181818182,0.5506818181818182]|
|133.08125500002643|EXP|monster2_pre: size = [0.5757954545454546,0.5757954545454546]|
|133.44989500002703|DATA|Keydown: f|
In this line right here^, the participant makes a keypress.
Using the above snippet of the log file for the first trial, I can recompute the reaction time by using the timestamp where the key is pressed and the EXP output lines of the function calls that were made right before render. Therefore, I substract the timestamp of this line, |133.44989500002703|DATA|Keydown: f|
from this line, |132.98521499999333|EXP|fake_text_to_keep_images_on_screen: autoDraw = true|
. The result is 587.015 ms, which is almost exactly what the csv computed.
Now, I will repeat this process for the second and third trial and I get 464.68 and 286.21 milliseconds respectively from the log file. These values are slightly smaller but almost identical to the output csv reaction times, suggesting that the timestamps at the EXP line of the log file are approx. the time right after the frame flip. Further, I used this to aproximate the RSI by taking the response timestamp of the previous trial and the timestamp from the line, |132.98521499999333|EXP|fake_text_to_keep_images_on_screen: autoDraw = true|
, of the current trial.
Does that make more sense? I will try another way of explaining if not.
Thanks for your help!