preraulab / multitaper_toolbox

A multitaper spectral estimation toolbox implemented in Matlab, Python, and R
62 stars 24 forks source link
eeg matlab multitaper python r

Prerau Lab Multitaper Spectrogram Code

Matlab, Python, and R implementations


Table of Contents



General Information

This repository contains Matlab, Python, and R implementations of the multitaper spectrogram analysis described in the paper "Sleep Neurophysiological Dynamics Through the Lens of Multitaper Spectral Analysis"1. Multitaper spectral estimation was developed in the early 1980s by David Thomson2 and has been shown to have superior statistical properties compared with single-taper spectral estimates3,4. The multitaper method works by averaging together multiple independent spectra estimated from a single segment of data. The innovation of the multitaper method is that, instead of using a single-taper function to compute the spectrum, it uses multiple taper functions called discrete prolate spheroidal sequences (DPSS). Because DPSS tapers are uncorrelated with each other, they can be averaged together as if they were independent trials of the same condition, producing a spectrum with reduced variance compared to periodogram and single-taper estimation.

Find videos describing the theory of spectral estimation and demonstrating how multitaper spectral estimation works at http://sleepeeg.org/multitaper on the Prerau Lab website.


alt text

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. PubMed PMID: 27927806.



Matlab Implementation

Python Implementation


R Implementation


Parameters

The spectral parameters used in all implementations of the multitaper spectrogram are described here.


Numerical Differences Between Implementations


Matlab Requirements

For the toolbox we currently require:

For parallel (optional)

Citations

The code contained in this repository for multitaper spectral analysis is companion to the paper:

"Sleep Neurophysiological Dynamics Through the Lens of Multitaper Spectral Analysis"
Michael J. Prerau, Ritchie E. Brown, Matt T. Bianchi, Jeffrey M. Ellenbogen, Patrick L. Purdon
December 7, 2016 : 60-92
DOI: 10.1152/physiol.00062.2015

which should be cited for academic use of this code.

Status

All implementations are complete and functional but may receive updates occasionally

References

  1. 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. PubMed PMID: 27927806.
  2. Thomson DJ. Spectrum estimation and harmonic analysis. Proc IEEE 70: 1055–1096, 1982.
  3. Bronez T. On the performance advantage of multitaper spectral analysis. IEEE Trans Signal Proc 40: 2941–2946, 1992.
  4. Percival DB, Walden AT. Spectral Analysis for Physical Applications: Multitaper and Conventional Univariate Techniques. Cambridge, UK: Cambridge Univ. Press, 1993.
  5. Percival, Donald B., and Andrew T. Walden. Spectral Analysis for Physical Applications: Multitaper and Conventional Univariate Techniques. Cambridge; New York, NY, USA: Cambridge University Press, 1993.

Contact

For questions or suggestions please contact Habiba Noamany at hnoamany@bwh.harvard.edu