Computes the FFT power spectrum (single-sided), optional 1/f correction, and returns the frequency of the highest peak within bounds.
Arguments
- data
numeric vector.
- fs
sampling rate (Hz).
- flim
optional length-2 frequency bounds
c(fmin, fmax)in Hz.- fcor
logical; apply crude 1/f correction.
- pad_to
optional integer length for zero-padding before the FFT. When
NULL, no zero-padding is applied.- spectrum
spectrum scaling.
"amplitude"returns the current normalized single-sided amplitude spectrum."raw_power"returns raw FFT power|FFT(x)|^2on the retained positive-frequency bins.- taper
taper to apply; one of
"none","hann","hanning".