pub fn fundamental(frequency: &[f64], magnitude: &[f64]) -> Option<usize>Expand description
The bin of the fundamental: the strongest peak that is not DC.
Peaks, not raw magnitudes, and that is the whole point. A taper leaks DC into the bins beside it hard enough that the leakage can out-measure the signal — but leakage decays away from DC and so is never a local maximum, while the signal is. Anything within half a bin of DC is skipped outright.