Skip to content

Studio Tutorial: Shifting Event Codes

David Railton Garrett edited this page Apr 18, 2024 · 3 revisions

There is often a constant delay between the event codes and the actual stimulus onsets in a given study. This is always true in visual studies using LCD displays. Virtually all LCD displays interpose a constant delay between the time that the video information arrives from the computer’s video card and the time that the image is presented on the screen. This delay cannot be detected by the computer and cannot be determined reliably from the manufacturer’s specifications. It must be measured with some kind of photosensor. This delay is often greater than 25 ms, so it must be accounted for.

In addition, almost all video displays (including CRTs and LCDs) have a delay that depends on the vertical position of the stimulus on the display. This delay is typically ~15 ms for the bottom of the display relative to the top (assuming a refresh rate of 60 Hz).

Delays may also occur for stimuli in other modalities. The delay should be measured and, if substantial, accounted for by shifting the event codes.

Once you have measured the delay, you can use the Shift Event Codes panel to shift the stimulus event codes by that amount of time. In the Event codes text box, you simply list the event codes to be shifted. Typically, you would shift the stimulus event codes but not the response event codes. In the ERP CORE N400 experiment, for example, we would shift event codes 111, 112, 121, 122, 201, 202, 211, and 212 (the stimulus event codes) but not codes 221 and 222 (the response event codes).

ERPsets Panel

You use the Timeshift text box to indicate the amount of time that the codes should be shifted (in milliseconds). A positive value shifts the event codes later in time (rightward), and a negative value shifts the event codes earlier in time (leftward). In the ERP CORE N400 experiment, for example, the stimuli appeared on the monitor 26 ms after the event code. We therefore shifted the event codes +26 ms later so that they occurred at the actual time of the stimulus after being shifted. [This shifting was already performed in the files we have been using for this tutorial.]

If you need to shift different event codes by different amounts, you can just run this routine multiple times, once for each set of event codes with a given shift amount.


Previous Page Next Page 🏠
◀️ Measurement Tool Epoch Continuous EEG ▶️ Home
Part 1 Part 2 Part 3 Part 4
General Overview Filtering EEG Plotting ERPs ➡️ Shifting Event Codes
Importing EEG Data The EventList ERP Information Epoch Continuous EEG
Example Experiment BINLISTER Grand Average Spectral Data Quality
Load and View Data Epoch and Baseline Bin Operations Channels and Locations
Artifact Detection Filtering ERPs Re-Sampling; Re-Epoching
Averaging (ERPs) Averaging (Channels) Converting to CSD
Artifact Correction Channel Operations
Interpolation Measurement Tool
Clone this wiki locally