Can I force Psychopy to run on a 30 Hz timing rather than the 60 Hz of my screen?


I am having consistent issues with dropping frames in a timing sensitive experiment. However, I do not ever need to update anything faster than at 30 Hz, and I am using a 60 Hz screen. As I understand it, psychopy will normally try and run in sync and at the same frequency as the screen, but in my case, I am often getting recorded experiment frame intervals of up to 20-25 ms, and as such dropping frames. My thinking is that if psychopy instead only try and export a new frame at 30 Hz, then my frame times just need to be < 33 ms to not drop frames and have consistent performance. Is this possible?

Hi Skjoldan,
Have you tried setting the window wait blank to false? I found that setting wait blank to false resolved the majority of my frame dropping issues at 144-200hz.
You can try adding this in a code component: win.waitBlanking = False
Or, you can add waitBlanking = False to the code initialising your window. (I am not sure if this is an ideal fix).

Regarding your 30hz question, I am not sure if you can set PsychoPY to 30hz, but you could write code where the attribute only changes every 2 frames like this:

if frameN % 2 == 0:
1 Like

Hi @TimCottier

Thanks for the reply!
I think the issue with this approach might be that I think Psychopy count the frames that it sends to the monitor and not simply 1/“refresh rate” of the monitor. Meaning that if I am usign a 60 Hz diplay, but it takes my pc 20 ms to prepare a frame, than Psychopy will count 50 frames and second, and not the 60 frames which I am looking for.
For now I managed to find a more powerful pc to run the exp off, which works for now.