maad.spl.pressure2leq
- maad.spl.pressure2leq(p, fs, dt=1, pRef=2e-05)[source]
Convert pressure vector (p [Pa]) to Equivalent Continuous Sound Pressure level (Leq [dB SPL]).
- Parameters:
- pndarray-like
Array containing the sound pressure in Pa
- fsinteger
Sampling frequency in Hz
- dtfloat, optional, default is 1 (second)
Integration step to compute the Leq (Equivalent Continuous Sound level)
- 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') >>> p = maad.spl.wav2pressure(wave=w, gain=42) >>> Leq = maad.spl.pressure2leq (p, fs) >>> maad.util.mean_dB(Leq) 54.55488267086038