spectral_connectivity.transforms.dpss_windows#
- dpss_windows(n_time_samples_per_window: int, time_halfbandwidth_product: float, n_tapers: int, is_low_bias: bool = True) tuple[ndarray[tuple[int, ...], dtype[floating]], ndarray[tuple[int, ...], dtype[floating]]][source]#
Compute Discrete Prolate Spheroidal Sequences.
Returns the DPSS (Slepian) tapers of orders [0, n_tapers-1] for a given time-halfbandwidth product NW and window length
n_time_samples_per_window, together with their spectral-concentration ratios (eigenvalues).Delegates to
scipy.signal.windows.dpss(), which solves the same symmetric tridiagonal eigenproblem (Percival & Walden 1993) via LAPACK. Thesym=True/norm=2options reproduce the symmetric, unit-L2-norm convention used here, matching the previous vendored NiTime/MNE implementation to floating-point tolerance. It is CPU-only (banded linear algebra); the result is moved to the active array namespace afterward, as before.- Parameters:
- Returns:
tapers, eigenvalues –
tapershas shape (n_tapers, n_time_samples_per_window);eigenvalueshas shape (n_tapers,).- Return type:
Notes
Tridiagonal form of DPSS calculation from: Slepian, D. Prolate spheroidal wave functions, Fourier analysis, and uncertainty V: The discrete case. Bell System Technical Journal, Volume 57 (1978), 1371430