maad.spl.psd2leq
- maad.spl.psd2leq(P, gain, Vadc=2, sensitivity=-35, dBref=94, pRef=2e-05)[source]
Convert Power spectral density (PSD, amplitude²) into Equivalent Continuous Sound pressure level (Leq [dB SPL])
- Parameters:
- Pndarray-like (1d)
ndarray-like containing the Power spectral density (PSD=amplitude²)
- gaininteger
Total gain applied to the sound (preamplifer + amplifier)
- Vadcscalar, optional, default is 2Vpp (=>+/-1V)
Maximal voltage (peak to peak) converted by the analog to digital convertor ADC
- sensitivityfloat, optional, default is -35 (dB/V)
Sensitivity of the microphone
- dBrefinteger, optional, default is 94 (dBSPL)
Pressure sound level used for the calibration of the microphone (usually 94dB, sometimes 114dB)
- pRefSound pressure reference in the medium (air:20e-6, water:1e-6 Pa)
- Returns:
- Leqfloat
Equivalent Continuous Sound pressure level (Leq [dB SPL])
Examples
>>> w, fs = maad.sound.load('../data/cold_forest_daylight.wav') >>> Sxx_power,tn,fn,_ = maad.sound.spectrogram (w, fs) >>> S_power_mean = maad.sound.avg_power_spectro(Sxx_power) >>> maad.spl.psd2leq(S_power_mean, gain=42) 53.55842473963429