Tutorial 8: Stimulation delays

Authors: Francois Tadel, Elizabeth Bock

The event markers that are saved in the file might not accurate. In most cases, the stimulation triggers saved by the acquisition system indicate when the stimulation computer requested a stimulus to be presented. After this request, the equipment used to deliver the stimulus to the subject (projector, screen, sound card, electric or tactile device) always introduce some delays. Therefore, the stimulus triggers are saved before the instant when the subject actually receives the stimulus.

For accurate timing of the brain responses, it is very important to estimate those delays precisly and if possible to account for them in the analysis. This tutorial explains how to correct for the different types of delays in the case of an auditory study, if the output of the soundcard is saved together with the MEG/EEG recordings. A similar approach can be used in visual experiments using a photodiode.

Existing delays

The full description of this auditory dataset is available on this page: Introduction dataset.

The delays we can expect between the generation of the sim trigger and the delivery in the ears are:


[ATTACH]


Evaluation of the delay

Selecting files to process

First thing to do is to define the files you are going to process. This is done easily by picking files or folders in the database explorer and dropping them in the empty list of the Process1 tab.

  1. Drag and drop the following nodes in the Process1 list: Right/ERF (recordings), Right (condition), and Subject01 (subject)
    • files1.gif

    • The number in the brackets next to each node represents the number of data files that where found in each of them. The node ERF "contains" only itself (1), Subject01/Right contains ERF and Std files (2), and Subject01 contains 2 conditions x 2 recordings (4).
    • The total number of files, ie. the sum of all those values, appears in the title of the panel "Files to process [7]".
  2. The buttons on the left side allow you to select what type of file you want to process: Recordings, sources, time-frequency, other. Now select the second button "Sources". All the counts are updated and now reflect the number of sources files that are found for each node.
    • files2.gif

  3. If you select the third button "Time-frequency", you would see "0" everywhere because there are no time-frequency decompositions in the database yet.
    • files3.gif

  4. Now clear the list from all the files. You may either right-click on the list (popup menu Clear list), or select all the nodes (holding Shift or Crtl key) and then press the Delete key.

  5. Select both files Left/ERF and Right/ERF in the tree (holding Ctrl key), and put the in Process list. We are going to apply some functions on those two files. You cannot distinguish them after they are dropped in the list, because they are both referred as "ERP". If at some point you need to know what is in the list, just leave you mouse over a node for a few seconds, and a tooltip would give you information about it. Just like in the database explorer.

    • files4.gif

Correction

Sort analog events into event categories

Typically the analog channel contains events (like a photodiode signal) that do not contain information about which event is occurring. This can be rectified by matching the event marker from the acquisition with the events detected on the analog channel:

Run > Events > Combine stim/response

ignore ; B_AB ; A ; B

substitute ‘B’ with the photodiode event name

substitute ‘A’ with the event name of interest

Button responses

Same thing with button responses: re-detect from Stim/UDIO001

You can do similar things with a photodiode in the case of a visual experiment.

How to








Feedback: Comments, bug reports, suggestions, questions
Email address (if you expect an answer):


Tutorials/StimDelays (last edited 2015-02-26 21:12:51 by FrancoisTadel)