Tutorial 11: Time-frequency

This tutorial introduces how to compute time-frequency decompositions of MEG recordings and cortical currents using complex Morlet wavelets. There are several ways to reach the same result, please read all the sections carefully and then chose the method that is best suited for your own data.

Introduction to complex 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 show 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 begining and end of the timeseries.

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

Time-frequency decomposition of MEG Recordings

We are going first to compute the time-frequency decomposition for the two averaged recordings we have in the protocol. Drag'n'drop the two ERF files from Right and Left in Process1. Select "Recordings".

fileSelection.gif

Click on Run. Select the process: Frequency > Time-frequency (Morlet wavelets).

Click on the "Edit" button to get access to the options specific to the time-frequency decomposition process.

processSelection.gif

Time-frequency option window. You may:

  1. define bands in time and frequency or analyze the data in all points,
  2. configure the time and frequency resolution of the wavelets,
  3. define the output type (complex coefficients or squared coefficients / power).

timeFreqOptionsBasic.gif

Description of the options

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

Time definition:

Frequency definition:

Morlet wavelet options:

Processing options:

Computation

Back to our evoked fields. Let's select the following options:

Start the computation:

Display time-frequency maps

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

Time-freq: One channel

Display tab

Time-frequency maps: Mouse and keyboard

Time-frequency maps (all the sensors)

Time-frequency 2D topography

Time-frequency 2D Layout

Contents of the "timefreq" files

Time and frequency bands

Frequency bands

Time bands

Time bands and frequency bands

TF: Clusters time series

TF: Cortical sources

TF: Scouts time series

Processing time-frequency files

Next

This is the last tutorial for Brainstorm introduction. You had an overview of most of the software features. Now you can go back to the main Tutorials page, and read tutorials that are closer to your area of interest.

Tutorials/TutTimefreq (last edited 2012-08-14 18:52:41 by wpa162099)