Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

resample_fft_rcpp

Resample an fft using varying numbers of sine tapers


Description

Produce an un-normalized psd based on an fft and a vector of optimal sine tapers

Usage

resample_fft_rcpp(fftz, tapers, verbose = TRUE, dbl = TRUE, tapcap = 1000L)

Arguments

fftz

complex; a vector representing the dual-length fft; see also the dbl argument

tapers

integer; a vector of tapers

verbose

logical; should messages be given?

dbl

logical; should the code assume fftz is dual-length or single-length?

tapcap

integer; the maximum number of tapers which can be applied; note that the length is automatically limited by the length of the series.

Details

To produce a psd estimate with our adaptive spectrum estimation method, we need only make one fft calculation initially and then apply the weighting factors given by parabolic_weights_rcpp, which this function does.

See Also

Examples

fftz <- complex(real=1:8, imaginary = 1:8)
taps <- 1:4
try(resample_fft_rcpp(fftz, taps))

psd

Adaptive, Sine-Multitaper Power Spectral Density and Cross Spectrum Estimation

v2.1.0
GPL (>= 2)
Authors
Andrew J. Barbour [aut, cre] (<https://orcid.org/0000-0002-6890-2452>), Jonathan Kennel [aut] (<https://orcid.org/0000-0003-4474-6886>), Robert L. Parker [aut]
Initial release
2020-06-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.