Skip to contents

The Slepian tapers are the eigenvectors of the symmetric tridiagonal matrix with diagonal ((M - 1 - 2i) / 2)^2 cos(2 pi W) and off-diagonal i (M - i) / 2, W = NW / M (Percival and Walden 1993, Ch. 8); the k-th taper belongs to the k-th largest eigenvalue. Signs follow scipy.signal.windows.dpss: symmetric tapers sum positive and antisymmetric tapers start with a positive lobe. The concentration ratio lambda_k = v' S v is the fraction of the taper's energy inside \([-W, W]\).

Usage

morie_dpss(M, NW, Kmax = NULL, return_ratios = FALSE)

Arguments

M

Integer taper length.

NW

Time-bandwidth product.

Kmax

Number of tapers; NULL returns one taper peak normalised as scipy's norm = "approximate".

return_ratios

Logical; also return the concentration ratios.

Value

A Kmax x M matrix of unit-energy tapers (a vector when Kmax is NULL), or a list with tapers and ratios when return_ratios = TRUE.

Examples

w <- morie_dpss(64, 3, Kmax = 4, return_ratios = TRUE)
round(w$ratios, 6)
#> [1] 1.000000 0.999991 0.999723 0.995005