Background
Natural unit systems (#228–#232) are now implemented as numeric-1 systems: the base units are chosen so the defining constants (ħ, c, G, k_B, m_e, e, 4πε₀) evaluate to 1.0, while the full dimensional structure is preserved. This mirrors DynamicalSimUSysFlag and is enough to make q.decompose(usys) yield natural-unit values.
What it deliberately does not do: it does not let you convert between dimensions that natural units identify. In HEP units (ħ = c = 1) a mass and an energy are physically the same thing, but in unxt a Quantity in MeV is still an energy — e.g. you can't hand 0.511 MeV to something expecting a mass, or uconvert("g", energy, usys=hep).
Proposal
Add opt-in equivalencies attached to (or derivable from) a natural unit system, so conversions across the dimensions a system identifies are allowed:
- HEP / particle (
ħ = c = 1): mass ↔ energy ↔ momentum ↔ 1/length ↔ 1/time
- Geometrized (
c = G = 1): mass ↔ length ↔ time
- Planck / atomic similarly
This is essentially integrating astropy-style equivalencies (mass_energy(), etc.) with the unit-system abstraction and threading them through uconvert / ustrip.
Scope / open questions
- Where do the equivalencies live — on the
AbstractUnitSystem, or a separate object passed to uconvert?
- Should they be automatic when a
usys is supplied, or explicit opt-in (to avoid surprising silent mass→energy conversions)?
- Interaction with dimension checking /
plum dispatch on dimension-parametric quantities.
This is a larger feature than the numeric-1 systems and was intentionally split out. See #228 and the "Working in Natural Units" guide for the current behavior.
Background
Natural unit systems (#228–#232) are now implemented as numeric-1 systems: the base units are chosen so the defining constants (
ħ,c,G,k_B,m_e,e,4πε₀) evaluate to1.0, while the full dimensional structure is preserved. This mirrorsDynamicalSimUSysFlagand is enough to makeq.decompose(usys)yield natural-unit values.What it deliberately does not do: it does not let you convert between dimensions that natural units identify. In HEP units (
ħ = c = 1) a mass and an energy are physically the same thing, but inunxtaQuantityinMeVis still an energy — e.g. you can't hand0.511 MeVto something expecting a mass, oruconvert("g", energy, usys=hep).Proposal
Add opt-in equivalencies attached to (or derivable from) a natural unit system, so conversions across the dimensions a system identifies are allowed:
ħ = c = 1): mass ↔ energy ↔ momentum ↔ 1/length ↔ 1/timec = G = 1): mass ↔ length ↔ timeThis is essentially integrating astropy-style equivalencies (
mass_energy(), etc.) with the unit-system abstraction and threading them throughuconvert/ustrip.Scope / open questions
AbstractUnitSystem, or a separate object passed touconvert?usysis supplied, or explicit opt-in (to avoid surprising silent mass→energy conversions)?plumdispatch on dimension-parametric quantities.This is a larger feature than the numeric-1 systems and was intentionally split out. See #228 and the "Working in Natural Units" guide for the current behavior.