mne.time_frequency.dpss_windows#

mne.time_frequency.dpss_windows(N, half_nbw, Kmax, *, sym=True, norm=None, low_bias=True)[source]#

Compute Discrete Prolate Spheroidal Sequences.

Will give of orders [0,Kmax-1] for a given frequency-spacing multiple NW and sequence length N.

Note

Copied from NiTime.

Parameters:
Nint

Sequence length.

half_nbwfloat

Standardized half bandwidth corresponding to 2 * half_bw = BW*f0 = BW*N/dt but with dt taken as 1.

Kmaxint

Number of DPSS windows to return is Kmax (orders 0 through Kmax-1).

symbool

Whether to generate a symmetric window (True, for filter design) or a periodic window (False, for spectral analysis). Default is True.

New in version 1.3.

norm2 | 'approximate' | 'subsample' | None

Window normalization method. If 'approximate' or 'subsample', windows are normalized by the maximum, and a correction scale-factor for even-length windows is applied either using N**2/(N**2+half_nbw) (“approximate”) or a FFT-based subsample shift (“subsample”). 2 uses the L2 norm. None (the default) uses "approximate" when Kmax=None and 2 otherwise.

New in version 1.3.

low_biasbool

Keep only tapers with eigenvalues > 0.9.

Returns:
v, etuple,

The v array contains DPSS windows shaped (Kmax, N). e are the eigenvalues.

Notes

Tridiagonal form of DPSS calculation from [1].

References