// --------------------------------------------------------------------------- // helpers, used below // --------------------------------------------------------------------------- static double accumPeakSquaredAmps( double init, const SpectralPeak & pk ) { return init + (pk.amplitude() * pk.amplitude()); }
// --------------------------------------------------------------------------- // associate // --------------------------------------------------------------------------- // Associate bandwidth with a single SpectralPeak. // void AssociateBandwidth::associate( SpectralPeak & pk ) { pk.setBandwidth(0); pk.addNoiseEnergy( computeNoiseEnergy( pk.frequency(), pk.amplitude() ) ); }