kwutil.util_units module

This is effectively an interface to pint. These are scattered throughout different codebases, and it might make sense to consolidate them here.

Currently we are using pint for units, we might consider other libraries that handle units like:

  • pint

  • quantities

  • astropy

  • unyt

See [UnitTableComparison] for a table comparing some unit / quantity packages.

References

kwutil.util_units.unit_registry()[source]

A memoized unit registry

Returns:

pint.UnitRegistry