Skip to contents

Thomson's multitaper estimate: the eigenvalue-weighted average of the periodograms of the signal tapered by the first K Slepian sequences, sum_k lambda_k |X_k(f)|^2 / (fs sum_k lambda_k), returned as a one-sided density (every bin except DC, and Nyquist for even nfft, doubled, as in scipy.signal.periodogram) so that it integrates to the variance of the signal.

Usage

morie_psdmt(x, fs = 1, nw = 4, n_tapers = NULL, nfft = NULL)

Arguments

x

Numeric signal.

fs

Sampling frequency in Hz.

nw

Time-bandwidth product.

n_tapers

Number of tapers; 2 nw - 1 by default.

nfft

FFT length; length(x) by default.

Value

List with value (the integrated power), frequencies, psd, n_tapers, concentrations.

Examples

x <- sin(2 * pi * 10 * (0:255) / 100)
r <- morie_psdmt(x, fs = 100)
r$frequencies[which.max(r$psd)]
#> [1] 10.15625