I am looking for a way to access the reaction time measures that are normally sent to the output data file, but during run time instead so that I can modify the experiment behaviour in relation to the average reaction time for a section of the experiment.
Can anyone suggest how this could be done?
In End Routine the reaction time for a keyboard response called key_resp is key_resp.rt. You could append the value to a list and then calculate the mean value using something like sum(rts)/len(rts)
Thank you for your response.
What would the syntax be for a mouse press?
Also is there a resource I can consult to see how I can access other data output that is being sent to the output file?
The value of t in End Routine will usually be about 1 frame longer than the length of the routine.
In general you can look at the column names in the data file and use them as the variables to access the data during the experiment.
Thank you again.
However, for the mouse component there does not seem to be any variable ending in .rt in the output file.
All I have in relation to time is mouse.started. The mouse component is configured to log the final state, and the mouse click results in the end of the routine. Does this mean that the .started variable is equivalent to the reaction time? There does not seems to be any other option.
You can save the value of t in End Routine using