NuRadioReco.utilities.units module
Standard system of units
You should use the units defined here whenever you have a dimensional quantity in your code. The usage is simple: For every input, the number is multiplied by its units, for every output divide by it.
For example, write:
s = 1.5 * units.km
instead of:
s = 1.5 # don't forget this is in km!
To then output data in an arbitrary unit, divide:
print("s = " , s / units.mm, " mm")
Internally, this ensures that all dimensional quantities in the code are in a single system of units. The user does not need to worry about (or even know) what the internal unit system is: as long as all inputs and outputs are multiplied and divided by the correct units, things will stay consistent.
Base units
The base units are:
meter (meter)
nanosecond (nanosecond)
electron Volt (eV)
positron charge (eplus)
degree Kelvin (kelvin)
the amount of substance (mole)
luminous intensity (candela)
radian (radian)
steradian (steradian)
The SI numerical value of the positron charge is defined here, as it is needed for conversion factor : positron charge = eSI (coulomb)
Adapted from Offline, the reconstruction Framework of the Pierre Auger Collaboration. This is a slightly modified version of the units definitions written by the Geant4 collaboration