Physical Constants

AtomicAndPhysicalConstants.jl exports a flat set of const values drawn from the active CODATA release. All values are Float64 scalars in the units shown below.

The active release is selected at package-load time via a Preferences.jl setting (default: the most recent release the package ships, currently 2022). See CODATA Releases for how to change it.

The tables below give two names for each quantity. The CODATA Name is the field of the CODATA_release struct that holds the published value, as in CODATA2022.MU_PROTON_SI; the APC Name is the exported constant, as in MU_PROTON. The two differ wherever APC converts the published value before exporting it. A dash in the CODATA Name column marks a constant APC derives from other constants rather than reading from a published table.


Particle masses

APC Units: eV/c²

CODATA NameAPC NameParticleCODATA availability
M_ELECTRONM_ELECTRONelectronall releases
M_PROTONM_PROTONprotonall releases
M_NEUTRONM_NEUTRONneutronall releases
M_MUONM_MUONmuonall releases
M_DEUTERONM_DEUTERONdeuteronall releases
M_HELIONM_HELIONhelion (³He nucleus)all releases
M_TRITONM_TRITONtriton (³H nucleus)2006 and later
M_PION_0 †M_PION_0neutral pionfrom PDG
M_PION_CHARGED †M_PION_CHARGEDcharged pionfrom PDG

† Taken from the Particle Data Group (PDG) and not from CODATA so technically there is no CODATA name but these parameters are carried in the release structs. A release struct carries the PDG value of the corresponding CODATA year.

NIST tabulates particle masses in MeV/c². A quantity a release does not tabulate has a value of NaN in the release struct. For example, M_TRITON before 2006.


Magnetic dipole moments

APC Units: eV/T

Each is the release's MU_*_SI field — the CODATA value in J/T — converted to eV/T. The _SI suffix names the unit the published value is in; see Constants that differ from the tabulated release value.

CODATA NameAPC NameParticleCODATA availability
MU_ELECTRON_SIMU_ELECTRONelectronall releases
MU_PROTON_SIMU_PROTONprotonall releases
MU_NEUTRON_SIMU_NEUTRONneutronall releases
MU_MUON_SIMU_MUONmuonall releases
MU_DEUTERON_SIMU_DEUTERONdeuteronall releases
MU_HELION_SIMU_HELIONhelion2010 and later ‖
MU_TRITON_SIMU_TRITONtriton2006 and later ‖

‖ For the releases not listed the field is NaN; the earlier tables give only the shielded helion moment, which is a different quantity. See Quantities missing from a release.


Spin g-factors

Units: dimensionless

CODATA NameAPC NameParticleCODATA availability
G_ELECTRONG_ELECTRONelectronall releases
G_PROTONG_PROTONprotonall releases
G_NEUTRON_NUCLEAR_MAGNETONG_NEUTRONneutronall releases
G_MUONG_MUONmuonall releases
G_DEUTERON_NUCLEAR_MAGNETONG_DEUTERONdeuteron2006 and later
G_HELION_NUCLEAR_MAGNETONG_HELIONhelion2010 and later
G_TRITON_NUCLEAR_MAGNETONG_TRITONtriton2006 and later

CODATA/NIST tabulates the neutron, deuteron, helion, and triton g-factors relative to the nuclear magneton $\mu_N = e\hbar / 2m_p$. That is, the published number is

\[g_\text{NIST} = \frac{\mu}{I\,\mu_N}\]

so the proton mass — not the particle's own mass — sets the scale. This means that the equation $a = (g_q-2)/2$ is not valid for these quantities. For this reason, to make code using g-factors cleaner, the APC values of the g-factor are computed from $\boldsymbol{\mu} = g\,\frac{e}{2m}\,\mathbf{S}$, where the particle's own mass sets the scale

\[g_\text{APC} = g_\text{NIST}\,\frac{m_\text{particle}}{m_{\text{proton}}}\]


Gyromagnetic anomalies

Units: dimensionless

The gyromagnetic anomaly is defined as

\[a = \frac{g_q - 2}{2}, \qquad g_q = g\,\frac{e}{q},\]

where $g$ is the signed g-factor in the convention $\boldsymbol{\mu} = g\,\frac{e}{2m}\,\mathbf{S}$ and $g_q$ the g-factor normalized to the particle's own charge q, as in the Thomas–BMT equation. Dividing by q gives the electron ($g<0$, $q=-e$) and the positron ($g>0$, $q=+e$) the same positive anomaly, and the doubly charged helion $a = -4.1841537…$. gyromagnetic_anomaly returns NaN for neutral particles, for which $g_q$ is undefined.

CODATA NameAPC NameParticleCODATA availability
ANOMALY_ELECTRONANOMALY_ELECTRONelectronall releases
ANOMALY_MUONANOMALY_MUONmuonall releases

Other physical constants

CODATA NameAPC NameDescriptionAPC Units
E_CHARGEE_CHARGEelementary chargeC
C_LIGHTC_LIGHTspeed of lightm/s
H_PLANCKH_PLANCKPlanck's constant heV·s
H_BARH_BARreduced Planck constant ħeV·s
R_ELECTRONR_ELECTRONclassical electron radiusm
— †R_PROTONclassical proton radiusm
— †CLASSICAL_RADIUS_FACTOR$e^2 / (4\pi\varepsilon_0)$eV·m
K_BOLTZMANNK_BOLTZMANNBoltzmann's constant $k_B$eV/K
EPS_0_SIEPS_0permittivity of free space1/(eV·m)
MU_0_SIMU_0vacuum permeabilityeV·s²/m
AVOGADROAVOGADROAvogadro's constantmol⁻¹
FINE_STRUCTUREFINE_STRUCTUREfine-structure constantdimensionless
RELEASE_YEARRELEASE_YEARactive CODATA release year—

† Not a tabulated CODATA value.


Unit-conversion constants

CODATA NameAPC NameAPC Units
G_PER_AMUKG_PER_AMUkg/dalton
EV_PER_AMUEV_PER_AMUeV/(c²·dalton)
J_PER_EVJ_PER_EVjoules/eV
EV_PER_JEV_PER_JeV/joule
G_PER_EVG_PER_EVgrams·c²/eV
G_PER_EVKG_PER_MEV_C2kg·c²/MeV