maad.spl.dBSPL2pressure

maad.spl.dBSPL2pressure(L, pRef=2e-05)[source]

Convert sound pressure level (L [dB]) to sound pressure (p [Pa]).

Parameters:
Lndarray-like or scalar

Array or scalar containing the sound pressure level (L [dB])

pRefSound pressure reference in the medium (air:20e-6 Pa, water:1e-6 Pa)
Returns:
pndarray-like or scalar

Array or scalar containing the sound pressure in Pa

Examples

>>> w, fs = maad.sound.load('../data/cold_forest_daylight.wav') 
>>> p = maad.spl.wav2pressure(wave=w, gain=42)
>>> p_rms = maad.util.rms(p)
>>> print(p_rms)
    0.010660425378341332
>>> L = maad.spl.pressure2dBSPL(p_rms)  
>>> maad.spl.dBSPL2pressure(L)
    0.010660425378341332