OS (e.g. Win10): WIN10
PsychoPy version :2025.1.1
Standard Standalone Installation? (y) Notice the monitor runs at 120hz as tested by psychopy
Do you want it to also run online? (n)
What are you trying to achieve?: I want to know what is on the screen when a trigger is sent
What did you try to make it work?:
I have a stimulus (polygon) which is called “target“ which is the stimulus I want to synch my trigger with.
In order to do this I created a code component as you can see in the timeline, in the code component there is a flag which is set to false in the Begin Routine tab:
TriggerWasSent=False
and then in the Each Frame routine I put this
My understanding is that this should capture the screen (and eventually send the trigger if I put the DOET variable to True, but currently it is False) on the exact frame when the target polygon is presented.
In the end routine tab I have this command to save the captured frame as a TIF image:
win.saveMovieFrames(‘frame.tif’)
Link to the most relevant existing thread you have found:
What specifically went wrong when you tried that?:
When I look at the frame.tif image the target stimulus is not showing. It’s as if the stimulus was shown after the screen was captured. If this was the case it might also explain why when I compare the timing of the arrival time of the trigger on the Pupil Neon instrument I am trying to synch with the image of the screen captured by the scene camera, it appears that the stimulus is shown with some delay (a few tens of ms).
I guess my question is whether the “if target.status==STARTED” condition in the “every frame” tab is the right approach to execute a command exactly after the stimulus appears on the screen (or at least is in the visible buffer of the graphics card, I know monitors can add additional delays but I assume that shouldn’t affect the screen capture test).
Thank you in advance for any help you may provide!
Matteo