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.

Documented delays

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

Delay #1: Production of the sound

Delay #2: Transmission of the sound

Delay #3: Recording of the signals


[ATTACH]


Evaluation of the delay

Let's display simultaneously the stimulus channel and the audio signal.

Detection of the analog triggers

Detecting the standard triggers

Run the detection of the "standard" audio triggers on channel UDIO001 for file AEF#01.

Explanation of the options (for future reference, you can skip this now):

Results of the detection

Detecting the deviant triggers

Some cleaning

Repeat on acquisition run #02

Repeat all the exact same operations on the link to file AEF#02:

Delays after this correction

We compensated for the jittered delays (delay #1), but not for the other ones (delays #2, #3). The final delay between the production of "standard_fix" triggers and the moment when the subject gets the stimulus is now: delay #2 + delay #3 + over-compensation.

Final constant delay: 4.9 + 1.7 - 3.3 = 3.3ms

We decide not to compensate for those delays because they do not introduce any jitter in the responses and they are not going to change anything in the interpretation of the data.

Detection of the button responses

As we described in the previous tutorial, the button markers are also incorrect. The subject presses a button with the right index finger when a deviant is presented. Because of some issues with the way this CTF system saves the triggers, some are doubled (49 markers for 40 button presses). We don't really need to correct this category of events because we will not use them in the introduction tutorials, this is documented here for future reference.

The digital channel Stim/UDIO001 contains the inputs from the response button box (optic device, negligeable delay). Each bit of the value on this channel corresponds to the activation of one button. We can read this channel directy to get accurate timing for the button presses.

Photodiode

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








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


Tutorials/StimDelays (last edited 2015-02-27 19:35:04 by FrancoisTadel)