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], or [A s]

c

Speed of light [m/s]

h

Plancks constant [J s]

hbar

Reduced Plancks constant [J s]

m_e

Mass of electron [kg]

m_p

Mass of proton [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