Time logging discrepancy

Hello there,

I have an experiment in which I present a fixation cross (text_7) for 1s in between trials. However, in my logfile I get quite big differences from 1s from presentation of my items (e.g. numberline_2) to the fixation cross (see column fixation_time). Can anyone explain this?RT7_Bruchvergleich_NumPos_2019_Sep_04_1016.xlsx (11.5 KB)

Thanx

Hi @fragmag, if you mean that the times in the column “numberline_2.started_raw” seem a lot bigger than the times in “fixation_time”, this is because you have global time measurements for numberline_2 (time from when the task started), whereas “fixation_time” looks like actual presentation time from the start of the routine.

Hi @dvbridges, thanx for your reply. No, fixatio_time is a column I calculated myself by subtracting text7_started from numberline2_started (next routine), which should be exactly or very close to 1 second (as text7 is presented for 1s before the next numberline is presented).

Hello,
can anyone help me with this? The reason why I noticed the time differences is, that when I changed my mouse logging settings to “final state” (which I need) I didn’t get a mouse.time in my logfile anymore. So I thought I could get the mouse times by subtracting mouse onset time from onset time next routine?!?!
Any help much appreciated!

You can add the mouse.time to the data file, if it is not available. So, add a code component in the same routine as the mouse, and in the “End Routine” tab, add:

thisExp.addData("mouse.time", t)

Thank you, I think that would help with my problem of retrieving the mouse reaction time on each trial. Still that doesn’t explain the big time fluctuations I get for an object that should be presented for fixed time (1s in my case). Is there something wrong with the idea of calculating that time by subtracting onset times of consecutive routines?

I think your timing discrepancies are related to the fact that you are calculating your stimuli timing across trials. Instead, you want to record when your stimuli stop drawing, at the end of each routine. To do this, you can save the time at the end of the routine e.g., see attached. Further, to improve timing you can switch from using actual time to frames (see attached) to get more precise timing, lthough in the latest versions of PsychoPy, the timing accuracy using seconds has been improved… Test the attached experiment, let it run, and see what durations you are getting for e.g., “fix.stopTime”. If you still have timing issues, then it could either be related to coding problems if you coded your own experiment, or hardware limitations (see link)

durations.psyexp (9.0 KB)
https://www.psychopy.org/general/timing/timing.html

Thank you very much for your help! If I run your experiment I do not get any value for fix.stopped or targ.stopped in the excel output file, which I should due to the code components you added?!


Also adding the mouse.time code component into my experiment isn’t working so far:
grafik

You should get stop times with the ““fix.stopTime” column. Also, the code above throws the error because time is not a moiuse attribute, but also because “mouse_2.time” should be a column name, given as a string, so :


thisExp.addData("mouse_2.time", t); 

“mouse_2.time” is quite general and you may forget what time it refers to. I would use “stopTime” or something similar.