Time is NOT accurate when it comes to image components

OS : Win10
PsychoPy version : 2023

What specifically went wrong when you tried that?:
I’m running an EEG experiment, which, as is known, requires high Temporal accuracy. However, I found the image component appears for less than 1000 ms when I set it to appear 1 s. :exploding_head: :scream:

↑↑the image components. it is 1 second

↑↑the outcome data.
The greens are the start time of this image component, orange ones are the start time of the next component from the nest routing ‘interval’ . the blues is the differences between orange and green, which should be 1.
other routines without image components have correct timing. When I disable these two image components, the ‘faces’ routine’ start time become correct. and the bias varies with the numbers of image components, not the size or pixels of the images.
my screen is 60Hz, 0.16s.

What I want is to send a Mark through a serial port exactly when the image appears, and make sure the image appears for 1s . what can I do?

thanks a lot for any idea.


What happens if you don’t divide the trial into two routines and have all the stimuli in one routine?

Best wishes Jens

I don’t think it’s the separation caused this bias, since the time is shorter rather than longer.

I have tried to put a text component before the image component in the same routine. It turned out that the image component appeared for enough time that I set, however, the text component didn’t.

Thus, I think, psychopy need time to load the image component at the beginning of one routine, and it might occupy the first component’s time, which make the start time that the psychopy recorded delay a little bit(0.1~0.2s, I assume).
yet I don’t know whether it’s just the time number in Excel or both number and actual presentation time got shorter.

However, I managed to achieve my goal. I put a short fixation before my image component, and use “each frame” code, instead of “begin routine” code, to monitor whether the image component starts and send Mark if it does. Like this:

by which I can sure that Mark is send at right time and present for enough time.

Still, if you got any news or ideas about the loading time, I’d like to hear it.

Many thanks!


You could use a static component no preload the images in this period.

Best wishes Jens

Found that! It’s perfect!
thank you :smile:
Static Component — PsychoPy v2023.1.2