Tutorial 10: Epoching

Authors: Francois Tadel, Elizabeth Bock, Sylvain Baillet

From continuous tutorials:

This tutorial fills the gap between the previous tutorial (review and clean continuous recordings), and the introduction tutorials (source analysis of evoked responses). It explains how to epoch the recordings, do some more pre-processing on the single trials, and then calculate their average. For this tutorial, we are going to use the protocol TutorialRaw created in the two previous tutorials: ?Review continuous recordings and edit markers and ?Artifact cleaning. If you have not followed these tutorials yet, please do it now.

Import in database

The raw file viewer provides a rapid access to the recordings, but most of operations cannot be performed directly on the continuous files: most of the pre-processing functions, averaging, time-frequency analysis and statistical tests can only be applied on blocks of data that are saved in the database (ie. "imported"). After reviewing the recordings and editing the event markers, you have to "import" the recordings in the database to go with further analysis.

Right-click on the file with power line correction: Raw | notch(60Hz 120Hz 180Hz) > Import in dabase

importMenu.gif

Warning: If you right-click on the subject node > Import EEG/MEG, and select the tutorial .ds dataset, you would be able to import blocks of the continuous file in the database, but you would not have access to the modified events list or the SSP operators. Therefore, you would not import data cleaned of ocular and cardiac artifacts. The modified events list and the signal space projectors are saved only in the "Link to raw file" in the Brainstorm database, not in the initial continuous file.

importOptions.gif

Set the import options as they are represented in this figure:

Click on Import and wait. At the end, you are asked whether you want to ignore one epoch that is shorter than the others. This happens because the acquisition of the MEG signals was stopped less than 300ms after the last stimulus trigger was sent. Therefore, the last epoch cannot have the full [-100,300]ms time definition. This shorter epoch would prevent us from averaging all the trials easily. As we already have enough repetitions in this experiment, we can just ignore it. Answer Yes to this question to discard the last epoch.

importShortEpoch.gif

Two new conditions containing two groups of trials appeared in the database. To expand a group of trials and get access to the individual epochs: double-click on it or click on the "+" next to it.

The SSP projectors calculated in the previous tutorial were applied on the fly when reading from the continuous file. Those epochs are clean from eye blinks and power line contamination.

All the files available in the (Common files) folder are also shared for those new folders "left" and "right".

Review the individual trials

Double-click on the first trial for the "left" condition. Then right-click on the figure > Next data file, or use the keyboard shortcut F3 to jump to the next trial. This way you can quickly review all the trials, to make sure that there is no obvious problem in the recordings. If you haven't reviewed manually all the recordings in the continuous mode, and marked all the bad segments, it is a good time to do it now.

To mark a trial as bad manually, you have three methods:

rejectManual.gif

When a trial is tagged as bad, its icon in the database explorer shows a red mark.

rejectTree.gif

All the bad trials are going to be ignored in the rest of the analysis, because they are ignored by the Process1 and Process2 tabs. If you drag and drop the 101 left trials in the Process1 list, with one trial marked as bad, the summary of the selected files on top of the tab would show only 100 data files.

rejectProcess.gif

To learn how to mark only individual channels as bad instead of the entire trial, please go back to the introduction tutorial Exploring the recordings.

The process "Artifacts > Detect bad channels: peak-to-peak" can help you detect automatically some bad trials based on a peak-to-peak amplitude threshold. Drag and drop all the trials from the left condition in the Process1 list, and select this process. For each trial, it detects the channels that have a peak-to-peak amplitude (maximum value - minimum value) that is above a rejection threshold (too noisy) or below a rejection threshold (no signal). You can define different thresholds for different channel types. The options are:

rejectOptions.gif

For this current dataset, the quality of the recordings is remarkably good, we don't need to mark any trial as bad. So right-click on the group of "left" trials > Accept trials, to set them all as good.








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


Tutorials/Epoching (last edited 2015-02-03 16:43:41 by FrancoisTadel)