Function radiorust::metering::rescale_energy
source · pub fn rescale_energy<Flt>(
output: &mut Vec<Flt>,
resolution: usize,
input: &[Complex<Flt>]
)where
Flt: Float,
Expand description
Converts a slice of complex numbers (e.g. a Fourier transformed chunk) into
a given count (resolution
) of real numbers reflecting the energy
Note that this function expects there to be no wraparound in the middle of
the input, e.g. the output of a Fourier transform should be shifted such
that the center frequency is in the middle of input
before this function
is called.