maad.spl.dBSPL_per_bin
- maad.spl.dBSPL_per_bin(L, f)[source]
Function to spread the sound pressure level (Energy in dB) along a frequency vector (bins).
- Parameters:
- Lscalar
Sound Pressure Level in dB
- f: array-like (vector (1D))
frequency vector in Hz
- Returns:
- L_per_binarray-like (vector (1D))
sound pressure level in dB with values corresponding to the frequency’s number of bins
Examples
Spread 80dB SPL from 2kHz to 5kHz with 1kHz step
>>> maad.spl.dBSPL_per_bin(80,[2000,3000,4000,5000]) array([73.97940009, 73.97940009, 73.97940009, 73.97940009])
Spread 80dB SPL from 2kHz to 10kHz with 1kHz step
>>> maad.spl.dBSPL_per_bin(80,[2000,3000,4000,5000,6000,7000,8000,9000,10000]) array([70.45757491, 70.45757491, 70.45757491, 70.45757491, 70.45757491, 70.45757491, 70.45757491, 70.45757491, 70.45757491])
Spread 80dB SPL from 2kHz to 5kHz with 0.5kHz step
>>> maad.spl.dBSPL_per_bin(80,[2000,2500,3000,3500,4000,4500,5000]) array([71.5490196, 71.5490196, 71.5490196, 71.5490196, 71.5490196, 71.5490196, 71.5490196])