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