maad.util.dB2amplitude
- maad.util.dB2amplitude(x, db_gain=0)[source]
Transform data in dB scale into amplitude A gain (db_gain) could be added at the end.
- Parameters:
- xarray-like or scalar
data in dB to rescale in amplitude
- db_gainscalar, optional, default is 0
Gain that was added to the result –> 20*log10(x) + db_gain
- Returns:
- yarray-like or scalar
output in amplitude unit
Examples
>>> a = np.array([ 0. , 6.02059991, 9.54242509, 12.04119983, 13.97940009]) >>> maad.util.dB2amplitude(a) array([1., 2., 3., 4., 5.])