Skip to content

units

Planned, wave 2: quantities with exact dimensions, conversion and dimensional analysis.

Status: planned (wave 2). No code exists. The package name is provisional.

What it will provide

  • A dimension vector of seven rational exponents, with a scale factor and an offset; the offset only for degC and degF.
  • Quantities and conversion between compatible units.
  • A parser for the UDUNITS grammar, which the CF conventions of NetCDF use, and a database of SI, US customary and derived units.
  • Dimensional analysis: compatibility checks and Buckingham’s pi theorem, from the null space of the exponent matrix.
  • In wave 4 (item 21), user-defined unit systems such as EMU, ESU and atomic units, as Maple’s Units package offers.

References

SubjectReference
the SIBIPM, The International System of Units (SI Brochure), 9th ed., normative
unit grammar and databaseUDUNITS-2; the licence is BSD-3-Clause text plus a patent-termination clause, to be read before the database is copied
unified codesUCUM, case-sensitive, used in health data
dimensional analysisBuckingham, Phys. Rev. 4 (1914) 345, doi:10.1103/PhysRev.4.345
representationHart, Multidimensional Analysis, Springer 1995, doi:10.1007/978-1-4612-4208-6

How it will be validated

AreaCriterion
dimensionsexact rational dimension vectors
conversionfactors within 1 ulp of the decimal value in the references; a table diff against NIST SP 811

Oracles and references: pint (its definitions file is data that may be ported), astropy’s astropy.units, and UDUNITS-2 itself. The corpus is NIST Special Publication 811 and pint’s test suite. Every item also needs unit tests at 100% coverage and a performance table against the reference.

Created on by tannevaled

Modified on by tannevaled