LogoLogo
  • Start Here
    • Introduction to NCIL
      • Welcome
      • Mission Statement
      • Getting Started
      • Make this handbook better!
  • Policies & Expectations
    • Working in NCIL
      • Aaron's Philosophy on Supervision
      • General Policies
      • Roles & Expectations
        • Interpersonal and Working Relationships
        • Lab Director: Aaron Newman
        • Lab Manager: Cindy Hamon-Hill
        • Collaborators
        • Postdocs
        • Lab Research Assistants
        • Graduate Students
        • Undergraduate Students
      • Work Ethic
        • Vacations & Absences
      • Money
        • Employment
        • Undergraduate Research Awards
        • Graduate Student Funding
    • Communication
      • Basecamp
      • Lab Meetings
      • Communication Among Lab Members
      • Communicating with Research Participants
      • Website & Social Media
      • Meetings with Supervisor
      • Response Times
    • Lab Space and Resources
      • Hours of Operation
        • After-Hours Research
      • Safety
    • Intellectual Property
      • Data
      • Authorship
      • Publishing: Where and When
  • Data Management & Analysis
    • Data Science Tools
      • Jupyter
        • JupyterLab
      • Python
      • R
      • How to set up your computer for NCIL data science
    • Servers & Computers
      • Accounts
      • File Server (NCILNAS)
        • Accessing NCILNAS
      • Compute Server
        • Jupyter
        • VS Code - Setup
        • VS Code - Everyday Use
      • GitHub Copilot
    • Data Analysis
      • Behavioural Data
      • EEG Analysis
      • fMRI Analysis
        • Processing fMRI Data with SPM
        • fMRI Analysis in SPM
      • Power analysis with simR in R
    • Data Management
      • Github
      • Open Science
    • Learn Some Coding
  • How To Run Experiments
    • How to Get a Research Study Started
      • Research Ethics
      • Your Research Protocol
        • Components of a Research Protocol
      • Pilot Testing
    • Running a Participant
      • Communicating With Participants
      • Recruiting
      • Before Each Participant Arrives
      • When a Participant is in the Lab
    • Experiment Programming
      • Stimulus Presentation Programs
      • Brain-Computer Interface Programs (BCI)
      • EEG Trigger Codes
        • Lab Streaming Layer
        • Trigger Code Hardware Setup
        • Timing Test
    • Data Storage & Protection
    • Word Similarity Measures
  • Communicating Science
    • Submitting papers to Aaron for review
    • Lab Meeting Talks
    • Independent Study Course
    • Honours Thesis
      • Getting Started
    • Master's Thesis
    • 😓PhD Dissertation
    • PhD Comps
    • Conferences
    • Publications
    • Reviewing Journal Manuscripts
  • Old
    • VS Code on NCIL server
Powered by GitBook
On this page

Was this helpful?

  1. How To Run Experiments
  2. Experiment Programming
  3. EEG Trigger Codes

Timing Test

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

PreviousTrigger Code Hardware SetupNextData Storage & Protection

Last updated 3 months ago

Was this helpful?

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”