pub fn single_bin_amplitude(
signal: &[f64],
freq_hz: f64,
sample_rate: f64,
) -> f64Expand description
Single-bin DFT amplitude (peak, in signal units) of the component at exactly
freq_hz.
Goertzel-style projection onto cos/sin at freq_hz. The DC offset is
removed first, so the result is the AC amplitude AT THE TEST FREQUENCY and is
immune to any DC pedestal (a device sitting at its bias point) or slow drift
baseline. This is the steady-state level measurement that
normalized_rms_error_db cannot provide.