Constants
A pre-set set of physical constants. The SI units are following the new convention that takes effect on 20 May 2019.
The currently stored constants are (all are given in SI units):
|
Class to create a physical constant with unit-conversion capability, works exactly like a float. |
Unit of charge [C] |
|
Speed of light in vacuum [m s^-1] |
|
Planck constant [J Hz^-1] |
|
Reduced Planck constant [J Hz^-1] |
|
Electron mass [kg] |
|
Proton mass [kg] |
|
Conductance quantum [S], or [m^2/s^2] |
|
Gravitational constant [m^3/kg/s^2] |
All constants may be used like an ordinary float (which converts it to a float):
>>> c
299792458.0 m/s
>>> c * 2
599584916
while one can just as easily convert the units (which ensures thay stay like another PhysicalConstant
):
>>> c('Ang/ps')
2997924.58 Ang/ps