Tutorial 21: Noise and data covariance matrices

Authors: Francois Tadel, Elizabeth Bock, John C Mosher, Richard Leahy, Sylvain Baillet

Modeling and measuring certain charateristics of the noise contaminating the data is beneficial to source estimation. For instance, minimum norm estimators can integrate second-order sample statistics of sensor noise (summarized into a noise covariance matrix, see below). Beamformers further require similar sample statistics for the data portion of interest (summarized into a data covariance matrix). This first section of this tutorial explains how to obtain a noise covariance estimate from MEG empty room recordings.

Noise covariance

Instrumental noise ("sensor noise") can be readily captured in MEG using two or more minutes of empty room measurements. We encourage the use of noise recordings collected the same day as the subject's recordings (if possible just before the session) and pre-processed in the same manner (with same sampling rate and same frequency filters applied) as the participant data. In this study we have already prepared a 2-min segment of noise recordings that we will use to estimate noise covariance sample statistics.

Right-click on the entry for noise recordings > Noise covariance. Available menus:

Select the menu Noise covariance > Compute from recordings. Available options:

For this tutorial, keep the default options and click on [OK].

Right-click on the the noise covariance file > Copy to other folders: We need this file in the two folders where the epochs were imported before we compute the respective source models.

Advanced

Variations on how to estimate sample noise covariance

The sample noise covariance matrix is straightforward to otbain. Brainstorm's interface features a lot of flexibility to select the files and time windows used to calculate the sample statistics. You need to have a clear understanding of the concept of "noise" to pick the best possible option. We support the notion that noise covariance accounts for contaminants that remain present in the data after pre-processing is complete. Hence it is not meant to account for eye blinks, heartbeats, muscle artifacts, flat or bad channels and noisy segments: all these the above need to be taken care of during previous preprocessing steps, as show in previous tutorial sections. The noise covariance entry is to account for remaining and stationnary instrumental, sensor and environmental noise components. For this reason, the ideal scenario is to use segments of recordings that contain exclusively this type of contaminant, or segments of recordings deemed not to contain any of brain signals of interest. This section is advanced reading material that can be used as a reference in a different experimental context.

The case of MEG

Empty room: actual noise measurements (due to the instrument, environment) using empty-room conditions (no subject under the MEG helmet) are possible in MEG. We recommend you obtain 2 to more minutes of empty-room data right before bringing the subject in the MEG room, or right after the experiment is finished. .
You can verify quatitatively how stable and reproducible is the noise covariance estimated (e.g., during the day/week). You may be in a "quiet environment" allowing that you re-use the same noise recordings and therfore, noise covariance matrix, for all runs and subjects acquired on the same day.

Resting baseline: Alternatively, when studying evoked responses (aka event-related responses), you can use a few minutes of recordings where the subject is resting, ie. not performing the task. Record those resting segments before or after the experiment, or before/after each run. This approach considers the resting brain activity as "noise", the sources estimated for the evoked response are going to be preferentially the ones that were not activated during the resting period.

Pre-stimulation baseline: It can also be a valid approach to use the pre-stimulation baseline of the individual trials to estimate the noise covariance. But keep in mind that in this case, everything in your pre-stimulation baseline is going to be attenuated in the source reconstruction, noise and brain activity. Therefore, your stimuli have to be distant enough in time so that the response to a stimulus is not recorded in the "baseline" of the following one. For repetitive stimuli, randomized delays between stimuli can help avoiding expectation effects in the baseline.

EEG

The EEG case is typically more complicated. It is not possible to estimate the noise of the sensors only. Only the two other approaches described for the MEG are still valid:
resting baseline and pre-stimulation baseline.

The noise level of the electrode recordings depends primarily on the quality of the connection with the skin, which varies a lot from a subject to another, or even during the acquisition of one single subject. The conductive gel or solution used on the electrodes tends to dry, and the electrode cap can move. Therefore, it is very important to use one channel file per subject, hence one noise covariance per subject. In some specific cases, if the quality of the recordings varies a lot over the time, it can be interesting to split long recordings in different runs, with different noise covariance matrices too.

EEG and resting state

When studying the resting brain, you cannot use resting recordings as a noise baseline. For MEG the best choice is to use empty room measurements. For EEG, you can chose between two different approaches: using the sensors variance, or not using any noise information.
Option #1: Calculate the covariance over a long segment of the resting recordings, but save only the diagonal, ie. the variance of the sensors. This option is available in the advanced options of the source computation: select the option "Diagonal noise covariance".
Option #2: Select "No noise modeling" in the popup menu. This would use an identity matrix instead of a noise covariance matrix (equal, unit variance of noise on every sensor). In the inverse modeling, this is equivalent to the assumption that the noise in the recordings is homoskedastic, and equivalent for all the sensors. The problem with this approach is that an electrode with a higher level of noise is going to be interpreted as a lot of activity in its region of the brain.

Noise and epilepsy

Analyzing a single interictal spike, using either EEG and MEG data, we are faced with a similar problem in defining what is noise. Even the brain activity before and after the spike can be very informative about the spike's generation, particularly if it is part of a sequence of interictal activity that precedes ictal (seizure) onset. Defining a segment of time adjacent the spike as "background" may not be practical. In practice, however, we can often find a period of time of spontaneous brain activity in the recordings that appears adequate for declaring as background, even in the epileptic patient. As discussed above, MEG has the additional option of using empty room data as a baseline, an option not available in EEG.

We thus have the same options as above:
Option #1a: Compute the noise covariance statistics from blocks of recordings away from the peak of any identified interictal spike, and keep only the diagonal (the variance of the sensors).
Option #1b: If a large period of time is available, calculate the full noise covariance.
Option #2(MEG): Use empty room data as the baseline.
Option #3: Select "No noise modeling" in the popup menu (identity matrix, unit variance of noise on every sensor).

Advanced

Recommendations

Advanced

Data covariance

The beamforming approach to source localization requires a data covariance in input. The computation of a data covariance matrix is very similar to a noise covariance matrix, except that you need to target the segments of recordings of interest instead of the noise. In the case of an event-related study, you can consider all the recordings in a range of latencies after the stimulation corresponding to the effect you want to localize in the brain.

Advanced

On the hard drive

Right-click on any noise covariance file > File > View file contents:

Structure of the noise/data covariance files: noisecov_*.mat / ndatacov_*.mat

Related functions

Advanced

Additional documentation








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


Tutorials/NoiseCovariance (last edited 2016-06-08 19:00:09 by SylvainBaillet)