These tutorials are a companion to:

Prerau MJ, Bianchi MT, Brown RE, Ellenbogen JM, Patrick PL. Sleep Neurophysiological Dynamics Through the Lens of Multitaper Spectral Analysis. Physiology (Bethesda). 2017 Jan;32(1):60-92. Review. doi: 10.1152/physiol.00062.2015 PubMed PMID: 27927806.

Download the PDF


Get the multitaper code for Matlab or Python


Tutorial: Move Beyond the Hypnogram

In this set of online interactive tutorials, we will explain the theory of spectral estimation and demonstrate how a technique called multitaper spectral analysis can create clear, vibrant pictures of brain dynamics during sleep — rich with information beyond what can be seen in traditional clinical hypnogram analyses.


Sleep is a continuous, dynamic neural process involving the complex interaction of many different networks within the brain. Long-standing clinical practice, however, breaks up sleep into discrete sleep stages through time-consuming, subjective, visual inspection of 30-second segments of electroencephalogram (EEG) data. As a result, vital information about brain activity is lost. Multitaper spectral analysis is therefore a powerful tool for finding new insights into the physiological mechanisms underlying sleep and for developing new ways of diagnosing and tracking sleep and diagnosing related disorders.

Part 1: An Introduction to Spectral Analysis

In Part 1 of this tutorial you will be introduced to spectral estimation, a powerful mathematical tool for analysis of neural oscillations present in the EEG. You will learn the history of characterizing the sleep EEG and why spectral estimation provides an objective, flexible, high-resolution alternative to traditional sleep staging.

Part 2: Methods of Spectral Estimation

In Part 2 of this tutorial you will learn the theory behind spectral estimation and common problems that occur when it is not applied in a principled manner. You will then learn about multitaper spectral analysis, a method of spectral estimation that greatly reduces the inaccuracy and noise present in other approaches. Finally, you will learn how to estimate the multitaper spectrogram in a principled manner, based on assumptions about the data you are studying.

Part 3: Characterizing Sleep with the Multitaper Spectrogram

In Part 3 of this tutorial you will learn how to apply the multitaper spectrogram to the analysis of sleep EEG data. You will learn the different spectral motifs that are hallmarks of the major sleep stages, as well as the spectral signatures of microevents such as spindles and K-complexes. With this knowledge, you should be able to characterize the dynamics and architecture of an entire night of sleep from the multitaper sleep EEG spectrogram alone. You will then learn about potential clinical and experimental applications for the use of the multitaper spectrogram.

Coding Exercise: Implementing Multitaper in Matlab

In this video, we go over an example implementation of the multitaper spectrogram in Matlab. To follow along, download the teaching version of multitaper_spectrogram.m for MATLAB here.

For research, make sure to use our GitHub code repository, which provides a more efficient implementation for deployment.

Calculate Multitaper Spectral Parameters

Use this calculator to help you choose parameters for the multitaper spectrogram to fit a given specific application. Enter in pairs of parameters (N and TW, N and Δf, Δf and TW) and compute the missing values.


Selecting Multitaper Parameters

  • Set the window size N by determining the length of time over which the signal is thought to be stationary
  • Set the desired frequency resolution Δf, given the oscillatory structure of the data
  • Compute the time-half-bandwidth product as TW = NΔf/2
  • Compute the number of tapers as L ≪ ⌊2TW − 1⌋
    • Note: In practice, given a low TW, we set L = ⌊2TW − 1⌋

Spectral Scoring Manual

In order to facilitate sleep scoring using multitaper spectral analysis, in clinical practice we have developed a short Spectral Scoring Manual that provides a good overview of the principles of described in the tutorial above.

Download the Spectral Scoring Manual PDF