maad.spl.volt2pressure

maad.spl.volt2pressure(volt, gain, sensitivity=-35, dBref=94)[source]

Convert Volts to instantaneous sound pressure (p [Pa]).

Parameters:
voltndarray-like or scalar

ndarray-like or scalar containing the sound waveform in volt

gaininteger

Total gain applied to the sound (preamplifer + amplifier)

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)

Returns:
pndarray-like or scalar

ndarray-like or scalar containing the sound waveform in pressure (Pa)

Examples

>>> w, fs = maad.sound.load('../data/cold_forest_daylight.wav') 
>>> v = maad.spl.wav2volt(wave=w)
>>> maad.spl.volt2pressure(volt=v, gain=42) 
    array([ 0.00962983,  0.01148374,  0.01153826, ..., -0.00370198,
   -0.00195712, -0.00337482])      

Same result with the function wav2pressure

>>> maad.spl.wav2pressure(wave=w, gain=42)
    array([ 0.00962983,  0.01148374,  0.01153826, ..., -0.00370198,
   -0.00195712, -0.00337482])