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 precisely 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 sound card 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, negligible 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.

Another example: visual experiments

We have discussed here how we could compensate for the delays introduced in an auditory experiment using a copy of the audio signal saved in the recordings. A similar approach can be used for other types of experiments. Another typical example is the use a photodiode in visual experiments.

When sending images to the subject using a screen or a projector, we usually have jittered delays coming from the stimulation computer (software and hardware) and due to the refresh rate of the device. Those delays a difficult to account for in the analysis.

To detect accurately when the stimulus is presented to the subject, we can place a photodiode in the MEG room that produces a higher voltage when the image is displayed on the screen. The signal coming from this photo diode can be recorded together with the MEG/EEG signals, just like we did here for the audio signal. Then we can detect the triggers on the photodiode output channel using the menu "detect analog triggers".








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


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