Tutorial 10: Power spectrum and frequency filters

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

We are now going to process our continuous recordings to remove the main sources of noise. Typically, we can expect contaminations coming from the environment (power lines, stimulation equipment, building vibrations) and from the subject (movements, blinks, heartbeats, breathing, teeth clenching, muscle tension, metal in the mouth or the body). In this tutorial, we will focus first on the noise patterns that occur continuously, at specific frequencies.

We can correct for these artifacts using frequency filters. Usually we prefer to run these notch and band-pass filters before any other type of correction, on the continuous files. They can be applied to the recordings without much supervision, but they may create important artifacts at the beginning and the end of the signals. Processing the entire continuous recordings at once instead of the imported epochs avoids adding these edge effects to all the trials.

Evaluation of the noise level

Before running any type of cleaning procedure on MEG/EEG recordings, we always recommend to start with a quick evaluation of the noise level. An easy way to do this is to estimate the power spectrum of all the signals over the entire recordings.

Interpretation of the PSD

File: AEF#01

File: AEF#02

File: Noise recordings

What filters to apply?

When to apply them? Continuous files, before SSP for easier processing.

Important: Frequency filters are operations that you should apply at very early stages of the analysis, before epoching the recordings. These operations do not perform well next to the beginning and the end of the signals, they may generate important artifacts. It is therefore much more efficient to filter the entire recordings from the original continuous file at once, rather than filtering small epochs after importing them in the database.

It is not always recommended to use filters to remove the 50/60Hz frequencies, it depends on what you are expecting to do with your recordings. In the case of an ERP analysis, the averaging of multiple trials will get rid of the power line frequencies because they are not time-locked to the stimulus. If you are going to filter the recordings below 40Hz or if you do all your analysis in the time-frequency domain, you don't need this either. Avoid any pre-processing step that you don't really need.

Alternatives to the notch

If the notch filter is not giving satisfying result, you can use two other processes.

Why do we need to process the empty room measurements?
All the filters that are applied to the experiment data also need to be applied to the noise recordings. In the source estimation process, we will need all the files to have similar levels of noise, especially for the calculation of the noise covariance matrix.

Notch filter

For illustration purposes, we will now run a frequency filter to remove the 60Hz+harmonics from the continuous files. Notch filters are adapted for removing well identified contaminations from systems oscillating at very stable frequencies.

Evaluation of the filter

Some cleaning

To avoid the confusion later, delete the links to the original files:

Advanced

Filters specifications

Notch filter

Band-stop filter

Band-pass filter

Advanced

On the hard drive

The names of the files generated by the process "Power spectrum density" start with the tag timefreq_psd, they share the same structure as all the files that include a frequency dimension.

To explore the contents of a PSD file created in this tutorial, right-click on it and use the popup menus File > View file contents or File > Export to Matlab.

psd_contents.gif

Structure of the time-frequency files: timefreq_*.mat








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


Tutorials/ArtifactsFilter (last edited 2016-03-16 20:18:25 by FrancoisTadel)