Skip to main content
Skip table of contents

Using Pixel Sync for Stimulus-Accurate Timing

In another VOCAL we introduced the concept of register writing, and how this is a powerful tool for sending multiple commands to our VPixx device register for simultaneous execution.

With Register Write on Pixel Sync, that execution can be delayed until a specific sequence of pixels is detected in the video signal that passes through our hardware.

Register write on pixel sync

This, in practice, allows simultaneous execution of your hardware commands mere milliseconds before your stimulus physically appears onscreen. We can use a photodiode to measure the pixel illumination profile of the display, and see that on VPixx displays, there is a microsecond-precise, fully deterministic delay between tasks executed by register write pixel sync and physical illumination.

PROPixx projector (at 120Hz)

VIEWPixx CRT replacements

Third party display

Pixel Sync temporal offset from pixel sequence illumination

1 frame (8.33ms) deterministic

6 ms deterministic

Unknown, variable

This offset could theoretically also be measured for a third party display, and accounted for during an experiment, though a deterministic latency is unlikely on a commercial monitor.

Why not simply wait for the next screen refresh, using RegWrVsync? In some cases, video frames can be delayed by one or more refreshes of a screen (called “frame dropping”), which would create small amounts of temporal jitter. This is more common with older graphics cards and cases with high PC workload/GPU demands. If a delay of +/- 1 frame is tolerable for your experiment, you can use register write on vysnc without issue. With a register write on Pixel Sync, you can guarantee your signals and recordings will execute at a consistent, precise moment with respect to your visual stimulus, regardless of jitter in your video signal.

The rest of this VOCAL will focus on how to implement pixel sync, using examples in MATLAB and Python.

Using PsychDatapixx in Psychtoolbox? Many of these commands use Pixel Sync “under the hood” in order to align PTB and Datapixx hardware clocks and take advantage of our microsecond precise hardware.

Navigation

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.