Timing Test

*this is more specific to the butterfly room however it shouldn't be much different in the booth room

To ensure trigger codes are marking the onset of stimuli precisely we do something called a timing test to determine the length of any delay. To do this we use a photodiode which is a device that senses a change in light, consumes it, and uses that energy to elicit an electrical signal. In our case this electrical signal is sent to Pycorder where its onset is recorded. At the same time your stimulus presentation software will be sending trigger codes to Pycorder to mark stimulus onset. However there is usually a few hundredths of a millisecond delay between the trigger code and the stimulus onset. Using the timing of various stimulus onsets (the more the merrier) and trigger codes we can calculate the average delay time and shift our epochs backward by that amount to align with the trigger codes.

The process of a timing test is pretty easy, especially if you follow this protocol:

Stimulus Presentation Set-up

  1. Create a copy of your Psychopy script

  2. Set the background of your stimulus presentation to black if it isn’t already

  3. Edit the stimuli you’re presenting to be completely white

  4. Update the excel files so your Psychopy script is reading in the new white images

  5. Remove any breaks so your script runs faster

Photodiode Set-up

  1. Grab the photodiode from the storage cabinet straight ahead in the booth room

  2. From the white shelf in the butterfly room, grab the photodiode/acti-champ converter and attach it to the photodiode

  3. Tape the photodiode so that the sensor /is overtop one of your stimuli

  4. Plug the photodiode into the amplifier and turn it on

  5. Plug in the acti-champ battery

Full set-up:

Software Set-up

  1. Open Pycorder on the EEG recording computer

  2. Load the timing test configuration in your study folder /Configurations/timing_test_standard

  3. Click default mode

*You should see photodiode on the right and there should be no activity (just a straight line)

  1. Click record

  2. Start your stimulus presentation

You should see a trigger code followed by activity each time something is presented at the location of the photodiode on the screen

  1. Save the timing test data in your study folder /Data/Timetest_data

  2. Don't forget to turn the photodiode switch off and return it to it's home in the booth room

Analysis

  1. On the server, copy the timing test template folder (Templates/timingtest) over to your study folder on the server

  2. Copy your data off the EEG recording computer and into your version of the timingtest folder

  3. Go into the timing test analysis script and update it for your study (trigger codes, data location…)

  4. Run the script and at the bottom you’ll find by how much your stimulus presentation is delayed by

  5. In your BIDs config file under “epoch” assign the value to “tshift”

Last updated

Was this helpful?