Temporal resolution using the psycho back-end seems too good
Hi all,
A lab I'm working with says they are having a timing issue with psycho-py (https://discourse.psychopy.org/t/strange-behavior-of-the-win-flip-function-with-144hz-lcd-monitor/4211/8). They want to know if an opensesame experiment that they are running with the psycho back-end will be affected. I have done an analysis of time stamps, and I'm hoping for some advice on the result.
My stimuli are contained in a coroutine, with an onset delay within the routine that is set randomly on a trial to trial basis. What I have done is examined the expected timing of stimuli versus the psychopy time stamps indicating when they were really presented:

This looks great to me, except for one thing. I am concerned that the timing is 'too good'. The monitor uses a 144hz refresh rate and vsync is enabled. My understanding is that timing should be no better than 1000/144/2 = 3.47 ms. Yet, the mean error I get is a little less, around 2.12ms. I have checked this over a couple of 220 trial pilot data sets, and the result is the same.
Any idea how the time stamps could correspond this precisely to the requested stimulus presentation time?
Thanks very much
Comments
Hi,
Without knowing the details, your graph is a little hard to interpret, but here are few general remarks to clear things up:
When using the psycho backend, OpenSesame will simply use PsychoPy, so everything that applies to PsychoPy then also applies to OpenSesame. So: yes.
Again, without details I cannot interpret this graph, but here's how things should work.
When you call
Canvas.show()(which uses the PsychoPyWindow.flip()function), the experiment should pause until the onset of a new display refresh cycle, and then return the timestamp of the moment that the display is actually shown. This is called a blocking flip.Therefore, the interval between consecutive presentation times should always be a multiple of refresh-cycle durations (e.g. a multiple of 16.67 ms on a 60 Hz monitor), with little to no jitter. If this is the case, then blocking flip works. If it's not, then blocking flip doesn't work.
See also:
My impression is that blocking flip becomes increasingly problematic, because modern operating systems don't allow you to access the video hardware as directly as they used to. So it's definitely worth checking whether things work as expected on lab computers.
Cheers,
Sebastiaan
PS. The following script will run a quick benchmark:
Check out SigmundAI.eu for our OpenSesame AI assistant!
Sorry the graph was confusing, thanks very much for the help!
Ok so on the 59hz monitor I have here I got the below, which seems about right. I'll pass this on to test!
49.98553242 50.07567327 49.99965447 50.03931647 50.08649017
49.99755119 50.04983291 50.05193618 50.02549483 50.04021787
50.04442442 50.08138221 50.01347605 50.05554185 50.03691267
50.03090331 50.04953244 50.03961694 50.03721314 50.05403952
50.05073425 50.02369208 50.04803004 50.04622729 50.05283759
50.06064981 50.00746663 50.05824607 50.03420846 50.02339155
50.06275309 50.02399255 50.05343852 50.03931647 50.04232115
50.04322255 50.07086578 50.01437746 50.04772963 50.03390799
50.04232115 50.04863103 50.0375136 50.07957941 50.00506289
50.03721319 50.05824601 50.03330711 50.06004882 50.01888453
50.04202068 50.04232115 50.05524139 50.03240565 50.06305355
50.02519436 50.03480939 50.05433998 50.0300019 50.05343852
50.03150424 50.04893144 50.00806763 50.0654573 50.19646214
50.04262162 50.03180471 50.03841501 50.05043384 50.04742916
50.03360752 50.04953244 50.04412396 50.04712869 50.02158874
50.05163571 50.06756057 50.02759816 50.03901594 50.02339161
50.05193618 50.04622723 50.03961694 50.0357108 50.03390805
50.04803004 50.04953244 50.05824607 50.01948541 50.04502542
50.0564432 50.03360752 50.04232115 50.03510992 50.04532583
50.06335402 50.02098781 50.04051834 50.06425543]
M = 50.04, SD = 0.02
Cheers
Yes, that's a perfect outcome. In other words, this system is fine.
Check out SigmundAI.eu for our OpenSesame AI assistant!