
Coherence spectrum (alias to morie_dsp_coherence)
Source:R/dsp_detection.R
morie_dsp_coherence_spectrum.RdConvenience pass-through so detection-side callers can stay within
the dsp_detection namespace.
Examples
set.seed(1)
t <- seq(0, 4, by = 1 / 128)
x <- sin(2 * pi * 5 * t) + rnorm(length(t), 0, 0.2)
y <- sin(2 * pi * 5 * t + 0.5) + rnorm(length(t), 0, 0.2)
str(morie_dsp_coherence_spectrum(x, y, fs = 128, nperseg = 128L),
max.level = 1)
#> List of 2
#> $ freqs: num [1:65] 0 1 2 3 4 5 6 7 8 9 ...
#> $ coh : num [1:65] 0.0959 0.1831 0.2142 0.1173 0.9955 ...