github ↗
docs menu

Module Ymir_units.Codata

CODATA releases of the measured constants.

A release is one CODATA adjustment of the measured constants, as NIST publishes it. A release is a value, and a function that needs measured constants takes one, so a program states which adjustment it computes with:

ocaml
let bohr codata = Constant.quantity Nx.float64 (Codata.bohr_radius codata)
let a0 = bohr Codata.v2022

A release holds every measured quantity of NIST's table for its adjustment, named as the table names it, with the value and uncertainty the table gives. The table's exact rows are left out: the SI fixes those constants, so they are units (Exact constants). So are the rows that restate another row in other units: the energy equivalents and relationships, and the values given again in MeV, eV, u, Hz, K or m-1. Ratios and dimensionless quantities are kept.

A quantity has the table's unit, with one change: the table writes the radian as 1, and a unit here carries it where the quantity is, by its definition, an angle per something or something per angle. A gyromagnetic ratio is an angular frequency per tesla, rad s-1 T-1, and a reduced Compton wavelength is a wavelength per radian, m rad-1. Every other quantity, the atomic, natural and Planck units included, has the table's unit.

The releases start at 2018, the first adjustment under the 2019 SI's exact constants. The accessors below name the quantities the formulas of physics and astronomy most often take as inputs; every other quantity of a release is in constants. Both releases hold every accessor's constant. An accessor for a constant a release lacks raises Invalid_argument naming the accessor, the release's year and NIST's name for the constant, as in "Codata.tau_mass: CODATA 2030 has no tau mass"; accessors let a later release add constants without breaking a program.

#type t

The type for CODATA releases.

#val v2018 : t

v2018 is the 2018 adjustment.

#val v2022 : t

v2022 is the 2022 adjustment.

#val year : t -> int

year r is the year of r's adjustment.

#val constants : t -> Constant.t list

constants r is every constant of r, in the order of NIST's table.

Gravitation and electromagnetism

#val newtonian_gravitation : t -> Constant.t

newtonian_gravitation r is G, the Newtonian constant of gravitation, in m3 kg-1 s-2.

#val fine_structure : t -> Constant.t

fine_structure r is α, the fine-structure constant, dimensionless.

#val vacuum_permeability : t -> Constant.t

vacuum_permeability r is μ0, the vacuum magnetic permeability, in N A-2.

#val vacuum_permittivity : t -> Constant.t

vacuum_permittivity r is ε0, the vacuum electric permittivity, in F m-1.

Masses

#val dalton : t -> Constant.t

dalton r is mu, the atomic mass constant, which is the dalton, in kg.

#val electron_mass : t -> Constant.t

electron_mass r is me in kg.

#val muon_mass : t -> Constant.t

muon_mass r is mμ in kg.

#val tau_mass : t -> Constant.t

tau_mass r is mτ in kg.

#val proton_mass : t -> Constant.t

proton_mass r is mp in kg.

#val neutron_mass : t -> Constant.t

neutron_mass r is mn in kg.

#val deuteron_mass : t -> Constant.t

deuteron_mass r is md in kg.

#val triton_mass : t -> Constant.t

triton_mass r is mt in kg.

#val helion_mass : t -> Constant.t

helion_mass r is mh, the mass of the helium-3 nucleus, in kg.

#val alpha_particle_mass : t -> Constant.t

alpha_particle_mass r is mα, the mass of the helium-4 nucleus, in kg.

Atomic physics

#val rydberg : t -> Constant.t

rydberg r is R∞, the Rydberg constant, in m-1.

#val bohr_radius : t -> Constant.t

bohr_radius r is a0 in m.

#val classical_electron_radius : t -> Constant.t

classical_electron_radius r is re in m.

#val compton_wavelength : t -> Constant.t

compton_wavelength r is λC, the electron's Compton wavelength, in m.

#val thomson_cross_section : t -> Constant.t

thomson_cross_section r is σe in m2.

#val hartree_energy : t -> Constant.t

hartree_energy r is Eh in J.

#val bohr_magneton : t -> Constant.t

bohr_magneton r is μB in J T-1.

#val nuclear_magneton : t -> Constant.t

nuclear_magneton r is μN in J T-1.

#val electron_magnetic_moment : t -> Constant.t

electron_magnetic_moment r is μe, negative, in J T-1.

#val proton_magnetic_moment : t -> Constant.t

proton_magnetic_moment r is μp in J T-1.

#val electron_g_factor : t -> Constant.t

electron_g_factor r is ge, negative, dimensionless.