pub fn fourier_power(efd: Efd, nyq: usize, threshold: f64) -> usize
Expand description

Compute the total Fourier power and find the minimum number of harmonics required to exceed the threshold fraction of the total power.

This function needs to use the full of coefficients, and the threshold usually used as 1.

use efd::{fourier_power, Efd};

// Nyquist Frequency
let nyq = curve.len() / 2;
let harmonic = fourier_power(Efd::from_curve(curve, Some(nyq)), nyq, 1.);