smart.units#

Pint registry from SMART and related convenience function

Module Contents#

Functions#

unit_to_quantity(pint_unit)

Convert a pint.Unit to a pint.Quantity

quantity_to_unit(pint_quantity)

Get the unit of a pint.Quantity (has to have magnitude one).

Attributes#

smart.units.unit[source]#
smart.units.unit_to_quantity(pint_unit: pint.Unit)[source]#

Convert a pint.Unit to a pint.Quantity

smart.units.quantity_to_unit(pint_quantity: pint.Quantity)[source]#

Get the unit of a pint.Quantity (has to have magnitude one).