towerpy.utils.unit_conversion#
Towerpy: an open-source toolbox for processing polarimetric radar data.
Functions#
Module Contents#
- towerpy.utils.unit_conversion.x2xdb(xls)[source]#
Convert linear-scale values to log scale (dB).
Parameters#
- xlsfloat or array
Values in linear scale.
Returns#
- xdbfloat or array
Values in dB scale.
Notes#
\[dBx = 10log_{10}x\]Examples#
>>> # Convert radar reflectivity in linear scale (mm^6 m^-3) to dBZ. >>> import towerpy as tp >>> zls = 39811 >>> zdbz = tp.utils.radutilities.x2xdb(zls) >>> print(zdbz) Out[0]: 46.000030866277406
- towerpy.utils.unit_conversion.xdb2x(xdb)[source]#
Convert log scale (dB) values to linear-scale.
Parameters#
- xdbfloat or array
Values in dB scale.
Returns#
- xlsfloat or array
Values in linear scale.
Notes#
\[x = 10^{0.1*dBx}\]Examples#
>>> # Convert radar reflectivity in dBZ to linear scale (mm^6 m^-3). >>> import towerpy as tp >>> dbz = 50 >>> zls = tp.utils.radutilities.xdb2x(dbz) >>> print(zls) Out[0]: 100000.0