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:
- N
int
Sequence length.
- half_nbw
float
Standardized half bandwidth corresponding to 2 * half_bw = BW*f0 = BW*N/dt but with dt taken as 1.
- Kmax
int
Number of DPSS windows to return is Kmax (orders 0 through Kmax-1).
- sym
bool
Whether to generate a symmetric window (
True
, for filter design) or a periodic window (False
, for spectral analysis). Default isTrue
.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 usingN**2/(N**2+half_nbw)
(“approximate”) or a FFT-based subsample shift (“subsample”).2
uses the L2 norm.None
(the default) uses"approximate"
whenKmax=None
and2
otherwise.New in version 1.3.
- low_bias
bool
Keep only tapers with eigenvalues > 0.9.
- N
- 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