# Time is NOT accurate when it comes to image components

**URL:** <https://discourse.psychopy.org/t/time-is-not-accurate-when-it-comes-to-image-components/35317>\
**Category:** Builder\
**Tags:** timing, screen\
**Created:** [June 9, 2023, 10:52am UTC](https://discourse.psychopy.org/t/time-is-not-accurate-when-it-comes-to-image-components/35317 "2023-06-09T10:52:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Changlin](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@Changlin](https://discourse.psychopy.org/u/Changlin)\
**Post date:** [June 9, 2023, 10:52am UTC](https://discourse.psychopy.org/t/time-is-not-accurate-when-it-comes-to-image-components/35317/1 "2023-06-09T10:52:42Z")

</div>

**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. 🤯 😱

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/f/0/f0f6cec45beab36b60cb73b5cfacea0ec0ec7873.png)  
↑↑the image components. it is 1 second

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/f/8/f881189ebd8bcd847a9603ccf086360f126e3f2c.png)  
↑↑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.

---

<div class="post-metadata">

**Author:** ![JensBoelte](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jensboelte/32/9060_2.png) [@JensBoelte](https://discourse.psychopy.org/u/JensBoelte)\
**Post date:** [June 9, 2023, 12:46pm UTC](https://discourse.psychopy.org/t/time-is-not-accurate-when-it-comes-to-image-components/35317/2 "2023-06-09T12:46:27Z")

</div>

Hello,

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

Best wishes Jens

---

<div class="post-metadata">

**Author:** ![Changlin](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@Changlin](https://discourse.psychopy.org/u/Changlin)\
**Post date:** [June 10, 2023, 5:20am UTC](https://discourse.psychopy.org/t/time-is-not-accurate-when-it-comes-to-image-components/35317/3 "2023-06-10T05:20:32Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/c/1/c187c08a05513523cc69c967b46269620ca35891.png)  
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!

---

<div class="post-metadata">

**Author:** ![JensBoelte](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jensboelte/32/9060_2.png) [@JensBoelte](https://discourse.psychopy.org/u/JensBoelte)\
**Post date:** [June 10, 2023, 7:00pm UTC](https://discourse.psychopy.org/t/time-is-not-accurate-when-it-comes-to-image-components/35317/4 "2023-06-10T19:00:39Z")

</div>

Hello,

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

Best wishes Jens

---

<div class="post-metadata">

**Author:** ![Changlin](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@Changlin](https://discourse.psychopy.org/u/Changlin)\
**Post date:** [June 11, 2023, 5:31am UTC](https://discourse.psychopy.org/t/time-is-not-accurate-when-it-comes-to-image-components/35317/5 "2023-06-11T05:31:44Z")

</div>

Found that! It’s perfect!  
thank you 😄  
[Static Component — PsychoPy v2023.1.2](https://www.psychopy.org/builder/components/static.html)
