freq_band_synthesis#
- freq_band_synthesis(spectrum, freqs, fmin, fmax)[source]#
Adapt input spectrum to frequency band levels
Convert the input spectrum to frequency band spectrum between “fmin” and “fmax”.
- Parameters:
spectrum (numpy.ndarray) – One-sided spectrum of the signal in [dB], size (nperseg, nseg).
freqs (list) – List of input frequency , size (nperseg) or (nperseg, nseg).
fmin (float) – Min frequency band [Hz].
fmax (float) – Max frequency band [Hz].
n (int) – Number of bands pr octave.
G (int) – System for specifying the exact geometric mean frequencies. Can be base 2 or base 10.
fr (int) – Reference frequency. Shall be set to 1 kHz for audible frequency range, to 1 Hz for infrasonic range (f < 20 Hz) and to 1 MHz for ultrasonic range (f > 31.5 kHz).
Outputs
-------
spec (numpy.ndarray) – Third octave band spectrum of signal sig [dB re.2e-5 Pa], size (nbands, nseg).
fpref (numpy.ndarray) – Corresponding preferred third octave band center frequencies, size (nbands).