Tutorial 24: Time-frequency

Authors: Francois Tadel, Dimitrios Pantazis, Sylvain Baillet

This tutorial introduces how to compute time-frequency decompositions of MEG/EEG recordings and cortical currents using complex Morlet wavelets and Hilbert transforms.

Introduction

Some of the MEG/EEG signal properties are difficult to access in time domain (graphs time/amplitude). A lot of the information of interest is carried by oscillations at certain frequencies, but the amplitude of these oscillations is sometimes a lot lower than the amplitude of the slower components of the signal, making them difficult to observe.

The averaging in time domain may also lead to a cancellation of these oscillations when they are not strictly locked in phase across trials. Averaging trials in time-frequency domain allows to extract the power of the oscillation regardless of the phase shifts. For a better understanding of this topic, we recommend the lecture of the following article: Bertrand O, Tallon-Baudry C (2000)
Oscillatory gamma activity in humans: a possible role for object representation

In Brainstorm we offer two approaches for computing time-frquency decompositions (TF): the first one is based on the convolution of the signal with series of complex Morlet wavelets, the second filters the signal in different frequency bands and extract the envelope of the filtered signals using the Hilbert transform.

Morlet wavelets

Complex Morlet wavelets are very popular in EEG/MEG data analysis for time-frequency decomposition. They have the shape of a sinusoid, weighted by a Gaussian kernel, and they can therefore capture local oscillatory components in the time series. An example of this wavelet is shown below, where the blue and red curves represent the real and imaginary part, respectively.

Contrary to the standard short-time Fourier transform, wavelets have variable resolution in time and frequency. When designing the wavelet, we basically decide a trade off between temporal and spectral resolution.

To design the wavelet, we first need to choose a central frequency, ie the frequency where we will define the mother wavelet. All other wavelets will be scaled and shifted versions of the mother wavelet. Unless interested in designing the wavelet at a particular frequency band, the default 1Hz should be fine.

Then, the desirable time resolution for the central frequency should be defined. For example, we may wish to have a temporal resolution of 3 seconds at frequency 1 Hz (default parameters). These two parameters, uniquely define the temporal and spectral resolution of the wavelet for all other frequencies, as shown in the plots below.

Resolution is given in units of Full Width Half Maximum of the Gaussian kernel, both in time and frequency. The relevant plots are given below.

waveletOptions.gif

Edge effects

Users should pay attention to edge effects when applying wavelet analysis. Wavelet coefficients are computed by convolving the wavelet kernel with the time series. Similarly to any convolution of signals, there is zero padding at the edges of the time series and therefore the wavelet coefficients are weaker at the beginning and end of the time series.

From the figure above, which designs the Morlet wavelet, we can see that the default wavelet (central frequency 1Hz, FWHM=3sec) has temporal resolution 0.25sec at 5Hz and 0.1sec at 10Hz. In such case, the edge effects are roughly half these times: 125ms in 5Hz and 50ms in 10Hz. Examples of such edge effects are given in the figures below.

edgeEffect5Hz.gif edgeEffect10Hz.gif

Simple example

Let's start with a simple example to explore the options of the time-frequency decomposition process.

Process options

Comment: String that will be displayed in the database explorer to represent the output file.

Time definition

Frequency definition: Frequencies for which the power will be estimated at each time instant

Morlet wavelet options

Compute the following measure:

Normalized time-frequency maps

Display time-frequency maps

Right-click on the TF file of the Left condition to see what are the possible display options

One channel

Display tab

Mouse and keyboard

Display multiple channels

Three menus display the same information (the TF maps of all the channels) with different spatial organizations.

What to do with these figures:

Power spectrum and time series

These two menus generate similar figures: they represent as a line the evolution of each sensor for one parameter (time or frequency) when the other parameter is fixed.

Open at the same time three figures for the Left/ERF file:

Then navigate in time and frequencies, and observe how each figure gets updated at each change.

2D topography

Right-click on the TF file in condition Left and select successively the first three topography menus. All these three windows represent the same information, in a slightly different way: a spatial map of the power of the current frequency, for all the sensors at the current time.

Try to move the time and frequency sliders and see what happens. You can open at the same time a "One channel" view, to keep track easily of the current time and frequency.

Keyboard shortcuts:

2D Layout

The last display mode available for these TF decomposition of recordings is this "2D Layout" topography menu. Right-click on the TF file for the Left condition and select "2D Layout".

This represents spatially the power of the current frequency for all the sensors and all the time points. Try to move the current frequency slider to see how the display changes when increasing the frequency. It is a good example to show that the time resolution increase with the frequency. Below: the "2D Layout" for f=8Hz and f=60Hz.

Useful operations for this window:

Advanced

Time and frequency bands

Frequency bands

Time bands

Time bands and frequency bands

Scouts time series

Cortical sources

Hilbert transform

On the hard drive

Right click one of the TF files, and select the menu File > View file contents, to have a look to what is the actual contents of these structures.

Document file tags

Additional discussions on the forum








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


Tutorials/TimeFrequency (last edited 2015-08-19 22:19:04 by FrancoisTadel)