Hi folks,
A lot of people have noticed, especially on mac, that it takes a long time to measure the frame rate. Part of the reason we decided to add the message to the timing test was to make more clear to people what’s going on and make issues like this more visible.
So what’s going on to make this test so slow?
During the timing test PsychoPy tries to find a reliable frame rate, defined as having a standard deviation of inter-frame-intervals < 1ms. This is used to detect whether the monitor is going to be reliable and whether to help detect when a frame is dropped. The problem is that on macs we often now see frame intervals that are not at all consistent from one frame to the next, and so the sd never approaches this threshold. PsychoPy tries for a while and eventually gives up.
Here’s the output from the timeByFrames.py Coder demo, on my Macbook Pro 2022 with an M2 processor:
You can see the reported flip time is perfectly alternating between around 5 ms and around 12 ms. SD never goes below 4 ms. I haven’t actually looked with an oscilloscope to see if the genuine screen frame time is this variable (I suspect it isn’t) rather than the time that gets reported, which is affected by internal mechanics beyond our control. I’ll do some more testing on this to see what the physical stimulus is doing.
So, what do we do about it? As Mario from psychtoolbox has been saying for a long time, you probably shouldn’t be using macos for precisely-timed experiments.
You could take the option in your studies that you already know that the reported frame timing is unreliable and turn off the timing test on macs (you can do this in the Experiment Settings). There are options to change/remove the message, or turn off the check altogether:
As always, our strongest recommendation is that you test the timing with hardware - if timing matters to you then base your stimulus onset time on the output of a photodiode rather than the reported time of the screen flip from the operating system.
Most importantly, be aware that this is an issue (for all stimulus-presentation platforms)
Best wishes,
Jon