"TimeByFrames" script and quantisation error

Hi everyone,

I’m working on an EEG experiment at the moment, and I’m getting some issues with drifting stimulation phases. I suspect that my setup (mac mini OSX High Sierra on a 120Hz VPixx3D) is unable to keep up with 120Hz at 1920x1080. I decided to run the “TimeByFramesEx.py” script to investigate. At 120Hz 1080x I notice a bimodal distribution of frame times in the histogram. I just wanted to check - is this likely to be some kind of processor clock related quantisation error? The screen can only refresh at the set frequency, so it has to be measurement error, right?

I’ve attached the figures below.

Cranking down the resolution to 1024x576 (figures below) improves the timing variance a lot, but the distribution is still bimodal. I’m trying to figure out whether this is something real, or a measurement error, if anyone can help with that. It looks like the GPU is chugging at high resolutions nevertheless.

Cheers,

Martin

Any more developments on this topic?

I’m getting the same thing on multiple Macs running MacOS 13.2., using both the native and external displays.
Some of the Macs have “Promotion” (120Hz – though I’ve also set it to 60Hz), some have 60Hz natively.
Regardless, the distribution is bimodal at ~4.5ms and ~12ms. In theory, the mode should be 16.7ms

This may be related to the “triple buffering” on later MacOS’s (which is happening in addition, since flipping using win.flip(clearBuffer=False) causes the screen to alternate between the stimulus and a blank screen).

Would love some help on this!
Thanks,
Daniel