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):

PhysicalConstant(value, unit)

Class to create a physical constant with unit-conversion capability, works exactly like a float.

q

Unit of charge [C]

c

Speed of light in vacuum [m s^-1]

h

Planck constant [J Hz^-1]

hbar

Reduced Planck constant [J Hz^-1]

m_e

Electron mass [kg]

m_p

Proton mass [kg]

G0

Conductance quantum [S], or [m^2/s^2]

G

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