MultitaperSpectrum.compute#

MultitaperSpectrum.compute()[source]#

Estimate the density matrix.

Builds the \(K\) Slepian tapers for the sample length, forms each taper’s cross-periodogram on the Fourier grid, and averages them with concentration weights.

Return type:

SpectrumEstimate

Returns:

The SpectrumEstimate on nobs // 2 + 1 Fourier frequencies, with degrees_of_freedom = 2 K and bandwidth = 2 pi NW / nobs.

Example

>>> rng = np.random.default_rng(0)
>>> est = MultitaperSpectrum(rng.standard_normal((256, 2)), bandwidth=3).compute()
>>> est.method, est.frequencies.shape, est.degrees_of_freedom, est.nobs
('multitaper', (129,), 10.0, 256)