Fork me on GitHub

Units and physical constants, in pure Go.
Planned: nothing is released yet.

go-units is the organisation the go-scikit plan names for what MATLAB's symunit and physconst and Mathematica's Quantity offer: quantities with exact dimensions, conversion and dimensional analysis, and the CODATA constants. It is wave 2 of the plan; no library and no code exist yet.

planned wave 22 packages in the plan0 releases
status
state    planned (wave 2)
library  none yet
plan     github.com/go-scikit/roadmap
         PLAN.md, STATUS.md
2 planned packages โ€” no library released: see the plan's status
What it will cover

Units, exact where the definition is exact.

Every item starts from the roadmap's bibliography, is validated against the tool that is the reference in its domain, and lands with tests at 100% coverage and a performance table: no slower than the reference on one core.

๐Ÿ“

Quantities

A dimension vector of rational exponents with a scale factor and an offset, so that degC and degF are units like the others.

โ‡„

Conversion

SI, US customary and derived units, and a parser for the UDUNITS grammar that NetCDF's CF conventions use.

ฯ€

Dimensional analysis

Compatibility checks and Buckingham's pi theorem, from the null space of the exponent matrix.

h

Constants

The CODATA 2022 values, generated from NIST's ASCII table with the edition recorded.

๐Ÿงญ

Unit systems

User-defined systems such as EMU, ESU and atomic units, in wave 4.

๐Ÿšซ

No existing Go package

None of the Go unit packages is a dimensional-analysis engine, so none is a dependency. Dates and time scales stay with go-datetime.

๐Ÿ“ฆ

Pure Go, CGO=0

On every architecture the fleet's CI tests.

โš–๏ธ

BSD-3-Clause

Every repository of the organization.

What will be checked

3 kinds of check, each against a reference.

These are the measures the plan holds the work to. None has been run: there is no code yet.

Exact dimensions

Dimension vectors are exact rationals, compared for equality, never within a tolerance.

Conversion factors

Every conversion factor within 1 ulp of the decimal value in CODATA and NIST SP 811.

Constants table

A table diff against NIST’s allascii.txt, with the CODATA edition recorded.

Planned packages

What will be here.

The names are provisional. None of these repositories exists yet.

units

planned (wave 2)

A dimension vector of rational exponents, quantities and conversion, a parser for the UDUNITS grammar, SI, US customary and derived units, offset units (degC, degF) and dimensional analysis. User-defined unit systems (EMU, ESU, atomic) follow in wave 4. Validated against pint, astropy and NIST SP 811.

constants

planned (wave 2)

The CODATA 2022 recommended values, generated from NIST's ASCII table by a reproducible tool that records the edition. Validated by a table diff against allascii.txt and against scipy.constants.

Repositories

What is here.

docs

site

The documentation (Hugo + Hextra): the scope of the organisation, the plan and one page per planned package. Source โ†’

brand

assets

Logos and icons for the organization, in SVG / PNG / JPG / ICO / ICNS across colour, white and black variants.

Units for Go.

go-units is planned, wave 2 of the go-scikit roadmap. The plan says what it will cover and in what order, and its status says where each item stands. The documentation repeats the scope and the references.

Read the source on GitHub โ†’