mne.time_frequency.dpss_windows#

mne.time_frequency.dpss_windows(N, half_nbw, Kmax, low_bias=True, interp_from=None, interp_kind='linear')[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).

low_biasbool

Keep only tapers with eigenvalues > 0.9.

interp_fromint (optional)

The dpss can be calculated using interpolation from a set of dpss with the same NW and Kmax, but shorter N. This is the length of this shorter set of dpss windows.

Note

If SciPy 1.1 or greater is available, interpolating is likely not necessary as DPSS computations should be sufficiently fast.

interp_kindstr (optional)

This input variable is passed to scipy.interpolate.interp1d and specifies the kind of interpolation as a string (‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic, ‘cubic’) or as an integer specifying the order of the spline interpolator to use.

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

1

David S. Slepian. Prolate spheroidal wave functions, fourier analysis, and uncertainty-V: the discrete case. Bell System Technical Journal, 57(5):1371–1430, 1978. doi:10.1002/j.1538-7305.1978.tb02104.x.