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 by warm-up power iteration followed by Rayleigh-quotient inverse iteration (RQI) 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 alone converges only linearly with rate
λ₂/λ₁, which is far too slow for the nearly-degenerate
dominant DPSS eigenvalues; RQI achieves cubic local convergence
near the dominant eigenpair via tridiagonal LU (Thomas
algorithm) solves of (T - σI) w = v. The result is
sign-flipped if needed so the centre value is positive, and
peak-normalised (matching scipy’s default norm='approximate').
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).