This documentation is for development version 0.18.dev0.

mne.time_frequency.psd_multitaper

mne.time_frequency.psd_multitaper(inst, fmin=0, fmax=inf, tmin=None, tmax=None, bandwidth=None, adaptive=False, low_bias=True, normalization='length', picks=None, proj=False, n_jobs=1, verbose=None)[source]

Compute the power spectral density (PSD) using multitapers.

Calculates spectral density for orthogonal tapers, then averages them together for each channel/epoch. See [1] for a description of the tapers and [2] for the general method.

Parameters:
inst : instance of Epochs or Raw or Evoked

The data for PSD calculation.

fmin : float

Min frequency of interest

fmax : float

Max frequency of interest

tmin : float | None

Min time of interest

tmax : float | None

Max time of interest

bandwidth : float

The bandwidth of the multi taper windowing function in Hz. The default value is a window half-bandwidth of 4.

adaptive : bool

Use adaptive weights to combine the tapered spectra into PSD (slow, use n_jobs >> 1 to speed up computation).

low_bias : bool

Only use tapers with more than 90{‘verbose’: ‘n verbose : bool, str, int, or Nonen If not None, override default verbose level (see mne.verbose()n and Logging documentation for more).’, ‘verbose_meth’: ‘n verbose : bool, str, int, or Nonen If not None, override default verbose level (see mne.verbose()n and Logging documentation for more). Defaults to self.verbose.’, ‘picks_header’: ‘picks : str | list | slice | None’, ‘picks_base’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick ‘, ‘picks_all’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick all channels.’, ‘picks_all_data’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick all data channels.’, ‘picks_all_data_noref’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick all data channels(excluding reference MEG channels).’, ‘picks_good_data’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick good data channels.’, ‘picks_good_data_noref’: ‘picks : str | list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. In lists, channel type stringsn (e.g., [\'meg\', \'eeg\']) will pick channels of thosen types, channel name strings (e.g., [\'MEG0111\', \'MEG2623\']n will pick the given channels. Can also be the string valuesn “all” to pick all channels, or “data” to pick data channels.n None (default) will pick good data channels(excluding reference MEG channels).’, ‘picks_nostr’: ‘n picks : list | slice | Nonen Channels to include. Slices and lists of integers will ben interpreted as channel indices. None (default) will pick all channels.’}pectral concentration within bandwidth.

normalization : str

Either “full” or “length” (default). If “full”, the PSD will be normalized by the sampling rate as well as the length of the signal (as in nitime).

picks : str | list | slice | None

Channels to include. Slices and lists of integers will be interpreted as channel indices. In lists, channel type strings (e.g., ['meg', 'eeg']) will pick channels of those types, channel name strings (e.g., ['MEG0111', 'MEG2623'] will pick the given channels. Can also be the string values “all” to pick all channels, or “data” to pick data channels. None (default) will pick good data channels(excluding reference MEG channels).

proj : bool

Apply SSP projection vectors. If inst is ndarray this is not used.

n_jobs : int

Number of CPUs to use in the computation.

verbose : bool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

Returns:
psds : ndarray, shape (…, n_freqs)

The power spectral densities. If input is of type Raw, then psds will be shape (n_channels, n_freqs), if input is type Epochs then psds will be shape (n_epochs, n_channels, n_freqs).

freqs : ndarray, shape (n_freqs,)

The frequencies.

Notes

New in version 0.12.0.

References

[1]Slepian, D. “Prolate spheroidal wave functions, Fourier analysis, and uncertainty V: The discrete case.” Bell System Technical Journal, vol. 57, 1978.
[2]Percival D.B. and Walden A.T. “Spectral Analysis for Physical Applications: Multitaper and Conventional Univariate Techniques.” Cambridge University Press, 1993.