Analytic-signal magnitude via the Hilbert transform. Delegates to the native FFT construction (module 20).
Examples
if (requireNamespace("ranger", quietly = TRUE)) {
fs <- 1024
t <- seq.int(0, 1023) / fs
x <- 2 * sin(2 * pi * 64 * t)
env <- morie_dsp_hilbert_envelope(x)
mean(env[20:1004]) # ~2 (the amplitude)
}
#> [1] 2
