back to the MetroloPy documentation home page
MetroloPy built-in physical constants¶
Constants are accessed by passing the name or alias of a physical constant as a string to the constant
function. This function returns a GummyConstant
instance that can be used like a gummy
in calculations:
from metrolopy import constant
constant('G')
The constant definitions include correlations. So, for example, even though relative atomic masses are not in the constant library, dividing the mass of a particle by the atomic mass constant gives the particle mass in atomic units with the correct uncertainty.
The constants below are mostly based on the 2022 CODATA recommended values (though there are some differences in the last digit from the tabulated CODATA values for some constants due to rounding errors). See the .description
attribute of each constant for source information.
Most constants with exact values are stored as integers or the ratio of integers. However constants such as ℏ are exact in theory, but since the numerical value of π cannot be realized exactly on a computer, they may be listed with an uncertainty below.
To get a listing of all built-in constants use the search_constants
function with no argument:
from metrolopy import search_constants
search_constants()
- 1990 conventional value of Josephson constant KJ-90 = 4.835 979 × 1014 Hz/V, alias: K(J-90)
- 1990 conventional value of von Klitzing constant RK-90 = 25 812.807 Ω, alias: R(K-90)
- alpha particle mass mα = 6.644 657 345 0(20) × 10-27 kg, aliases: m(alpha), m(α)
- Angstrom star Å* = 1.000 014 95(90) × 10-10 m, aliases: A*, Å*
- atomic mass constant mu = 1.660 539 068 93(50) × 10-27 kg, alias: m(u)
- Avogadro constant NA = 6.022 140 76 × 1023 1/mol, alias: N(A)
- Bohr magneton μB = 9.274 010 065 6(28) × 10-24 J/T, aliases: mu(B), μ(B)
- Bohr radius a0 = 5.291 772 105 41(80) × 10-11 m, alias: a(0)
- Boltzmann constant k = 1.380 649 × 10-23 J/K, alias: k
- classical electron radius rr = 2.817 940 320 4(13) × 10-15 m, alias: r(e)
- Compton wavelength λC = 2.426 310 235 35(73) × 10-12 m, aliases: lambda(C), λ(C)
- conductance quantum G0 = 7.748 091 729 863 65 × 10-5 S, alias: G(0)
- copper x unit xu(CuKα1) = 1.002 076 97(28) × 10-13 m, aliases: xu(Cu), xu(CuKalpha1), xu(CuKα1)
- Coulomb constant ke = 8.987 551 786 1(14) × 109 N m2/C2, alias: k(e)
- deuteron g factor gd = 0.857 438 233 5(20), alias: g(d)
- deuteron magnetic moment μd = 4.330 735 087(10) × 10-27 J/T, aliases: mu(d), μ(d)
- deuteron mass md = 3.343 583 776 8(10) × 10-27 kg, alias: m(d)
- deuteron rms charge radius rd = 2.127 78(27) × 10-15 m, alias: r(d)
- electron g factor ge- = -2.002 319 304 360 92(36), alias: g(e-)
- electron gyromagnetic ratio γe = 1.760 859 627 82(53) × 1011 1/(T s), aliases: gamma(e), γ(e)
- electron magnetic moment μe = -9.284 764 691 6(28) × 10-24 J/T, aliases: mu(e), μ(e)
- electron magnetic moment anomaly ae = 0.001 159 652 180 46(18), alias: a(e)
- electron mass me = 9.109 383 714 0(27) × 10-31 kg, alias: m(e)
- elementary charge e = 1.602 176 634 × 10-19 C, alias: e
- Faraday constant F = 96 485.332 123 310 018 4 C/mol, alias: F
- Fermi coupling constant GF/(ℏc)3 = 1.166 378 70(60) × 10-5 1/GeV2, alias: G(F)/(hbar*c)**3
- fine-structure constant α = 0.007 297 352 564 3(11), alias: alpha
- first radiation constant c1 = 3.741 771 852 192 757 33(18) × 10-16 W m2, alias: c(1)
- first radiation constant for spectral radiance c1L = 1.191 042 972 397 19 × 10-16 W m2/sr, alias: c(1L)
- float64 representation of Euler's number e e = 2.718 281 828 459 045 09(13), aliases: Euler, euler, math e, math_e
- float64 representation of pi π = 3.141 592 653 589 793 12(15), aliases: pi, π
- float64 representation of sqrt(2) sqrt(2) = 1.414 213 562 373 095 145(66), alias: sqrt(2)
- Hartree energy Eh = 4.359 744 722 206 0(48) × 10-18 J, alias: E(h)
- helion g factor gh = -4.255 250 699 5(34), alias: g(h)
- helion magnetic moment μh = -1.074 617 551 96(92) × 10-26 J/T, aliases: mu(h), μ(h)
- helion mass mh = 5.006 412 786 2(15) × 10-27 kg, alias: m(h)
- helion shielding shift σh = 5.996 702 9(23) × 10-5, aliases: sigma(h), σ(h)
- hyperfine transition frequency of Cs-133 ΔνCs = 9.192 631 77 × 109 Hz, aliases: hf(Cs), Δν(Cs)
- Josephson constant KJ = 4.835 978 484 169 84 × 1014 Hz/V, alias: K(J)
- lattice parameter of silicon a = 5.431 020 511(89) × 10-10 m, alias: a
- lattice spacing of ideal Si (220) d220) = 1.920 155 716(31) × 10-10 m, alias: d(220)
- luminous efficacy Kcd = 683 lm/W, alias: K(cd)
- magnetic flux quantum Φ0 = 2.067 833 848 461 93 × 10-15 Wb, alias: Phi(0)
- mass of Jupiter MJ = 1.898 518(43) × 1027 kg, alias: M(J)
- mass of the earth ME = 5.972 17(13) × 1024 kg, alias: M(E)
- mass of the sun MS = 1.988 410(45) × 1030 kg, alias: M(S)
- molar gas constant R = 8.314 462 618 153 24 J/(K mol), alias: R
- molar mass constant Mu = 0.001 000 000 001 06(30) kg/mol, alias: M(u)
- molar mass of carbon-12 M(12C) = 0.012 000 000 012 7(36) kg/mol, alias: M(12C)
- molar volume of silicon Vm(Si) = 1.205 883 199(59) × 10-5 1/mol, alias: Vm(Si)
- molybdenum x unit xu(MoKα1) = 1.002 099 52(53) × 10-13 m, aliases: xu(Mo), xu(MoKalpha1), xu(MoKα1)
- muon Compton wavelength λμ = 1.173 444 110(26) × 10-14 m, aliases: lambda(mu), λ(μ)
- muon g factor gμ- = -2.002 331 841 24(82), aliases: g(mu-), g(μ-)
- muon magnetic moment μμ = -4.490 448 30(10) × 10-26 J/T, aliases: mu(mu), μ(μ)
- muon magnetic moment anomaly aμ = 0.001 165 920 62(41), aliases: a(mu), a(μ)
- muon mass mμ = 1.883 531 627(42) × 10-28 kg, aliases: m(mu), m(μ)
- neutron Compton wavelength λn = 1.319 590 903 81(66) × 10-15 m, aliases: lambda(n), λ(n)
- neutron g factor gn = -3.826 085 52(90), alias: g(n)
- neutron gyromagnetic ratio γn = 1.832 471 74(43) × 108 1/(T s), aliases: gamma(n), γ(n)
- neutron magnetic moment μn = -9.662 365 3(23) × 10-27 J/T, aliases: mu(n), μ(n)
- neutron mass mn = 1.674 927 500 58(83) × 10-27 kg, alias: m(n)
- Newtonian constant of gravitation G = 6.674 30(15) × 10-11 m3/(kg s2), aliases: constant of gravitation, G
- nuclear magneton μN = 5.050 783 739 2(15) × 10-27 J/T, aliases: mu(N), μ(N)
- Planck constant h = 6.626 070 15 × 10-34 J s, alias: h
- proton g factor gp = 5.585 694 689 3(16), alias: g(p)
- proton gyromagnetic ratio γp = 2.675 221 870 8(11) × 108 1/(T s), aliases: gamma(p), γ(p)
- proton magnetic moment μp = 1.410 606 795 44(59) × 10-26 J/T, aliases: mu(p), μ(p)
- proton magnetic shielding correction σ′p = 2.567 15(41) × 10-5, aliases: sigma'(p), σ′(p)
- proton mass mp = 1.672 621 925 97(50) × 10-27 kg, alias: m(p)
- reduced Planck constant ℏ = 1.054 571 817 646 156 472(49) × 10-34 J s, aliases: hbar, h-bar
- Rydberg constant R∞ = 10 973 731.568 157(12) 1/m, aliases: R(inf), R(∞)
- second radiation constant c2 = 0.014 387 768 775 039 338 021... m K, alias: c(2)
- speed of light in vacuum c = 2.997 924 58 × 108 m/s, alias: c
- standard atmosphere atm = 101 325 Pa, alias: atm
- standard-state pressure ssp = 100 000 Pa, alias: ssp
- Stefan-Boltzmann constant σ = 5.670 374 419 184 428 1(13) × 10-8 W/(m2 K4), aliases: sigma, σ
- Thomson cross section σe = 6.652 458 704 8(60) × 10-29 m2, aliases: sigma(e), σ(e)
- triton g factor gt = 5.957 924 930(12), alias: g(t)
- triton magnetic moment μt = 1.504 609 517 8(31) × 10-26 J/T, aliases: mu(t), μ(t)
- triton mass mt = 5.007 356 751 3(15) × 10-27 kg, alias: m(t)
- vacuum electric permittivity ε0 = 8.854 187 818 8(13) × 10-12 F/m, aliases: epsilon(0), ε(0)
- vacuum impedance Z0 = 376.730 313 410(57) Ω, alias: Z(0)
- vacuum magnetic permeability μ0 = 1.256 637 061 26(19) × 10-6 N/A2, aliases: mu(0), μ(0)
- von Klitzing constant RK = 25 812.807 459 304 506 660... J s/C2, alias: R(K)
- W to Z mass ratio mW/mZ = 0.881 45(13), alias: m(W)/m(Z)
- weak mixing angle sin2 ΘW = 0.223 05(23), aliases: sin2(Theta(W)), sin2(ϴ(W))