TMS-PsychoPy-Parallel port : Delay between the builder and image display on the computer screen

Hello everyone !
I m using PsychoPy3. Builder to display a memory experiment with a visual stimuli along with TMS.
I am using a parallel port to send the pulses to the stimulator which works fine.
I wanted to check the time delay between sending the pulse ( at time = 0 at the onset of the image) , to track this I used a photodiode and recorder (photodiode to eeg amplifier to a screen recroder).

I can see an average delay of 12ms between the onset time of the image on the PsychoPy builder and the photodiode capturing the image onset on the computer screen(i.e to when the image is really displayed on the screen).
Is there anything I can do to avoid this delay?

PS : The delay is on average 12ms , sometimes vary from 9 to 12 ms)

Win10 (The computer ( screen delay etc… ) is not the issue**
**PsychoPy3 ** .
Thanks in advance!

Hello,

where did you place the diode on the monitor and what is the refresh rate of the monitor? Did you sync the timing of the parallel-port with screen-refresh?

Best wishes Jens

1 Like

Hello, Thank you for your answer.
1- The Photodiode is placed on the bottom left of the screen
( I also tried to put it in the middle)
2- The screen refresh rate is 240Hz
3- Yes I did,the parallel port and triggers are synchronized and both start at 0 sec
,the few MS delay concerns the images , that takes in average around 15ms to be displayed on the screen( compared to the 0s on PsychoPy script),

Is there a way to pre-load the images on PsychoPyscript so they will be displayed at 0.ms?

Or another possible solution to fix this ?
My excel file used contain=27pictures (JpG format)

427 pictures*

Hello,

I would place the diode at the position where the stimulus appears.

Do you need the high refresh rate? Otherwise reduce it to see whether the run becomes more stable.

Did you turn off unneeded services such as network, virus scanner aso.?

Look here Preloading all stimuli - #9 by Michael and here
https://groups.google.com/g/psychopy-users/c/fWSl36UFYUA (ignore the last message with win.flip() This is only relevant when you are using the Coder instead of the Builder.

Best wishes Jens

1 Like

Hi @Asma_Ben,

So I can help as best I can, would you mind clarifying the following:

  1. You’ve mentioned that your parallel port is syncronised to screen refresh, can I just check whether your image component is also?
  2. Can you check that your image component is at the top of your trial routine (if not, to do this just right click on the image component name and select ‘move to top’)?
  3. How many image components do you have per trial (as in, the actual components, not the 427 images you have in your Excel file)?
  4. Do you have an inter-trial interval that you could make use of to pre-load the next image using a static component (some general guidance on these here)?

Thanks!

Kim

2 Likes