pub fn dpss(m: usize, nw: f64) -> FerrayResult<Array<f64, Ix1>>Expand description
Discrete prolate spheroidal sequence (Slepian taper) (#745).
Returns the dominant DPSS — the eigenvector of the canonical
time–frequency concentration tridiagonal matrix corresponding
to the largest eigenvalue. Equivalent to
scipy.signal.windows.dpss(m, NW) with the default Kmax=None
(single window, sym=True, no ratios).
nw is the standardised half bandwidth (NW = M·W), typically
in the range 2..=4 for spectral analysis.
Computed via power iteration on the symmetric tridiagonal concentration matrix
d[i] = ((M-1)/2 − i)² · cos(2π · NW / M)
e[i] = (i+1)(M−i−1) / 2Power iteration converges to the dominant eigenvector since the
concentration eigenvalues are well-separated for the typical
NW = 2..4 regime. The result is sign-flipped if needed so the
centre value is positive, and normalised to unit ℓ² norm
(matching scipy’s default norm=2).
Multiple Slepian sequences (Kmax > 1) need orthogonal
power-iteration / deflation; tracked as a future extension.
§Errors
FerrayError::InvalidValue if nw is non-finite, nw <= 0,
or nw >= m / 2 (the band would degenerate).