bellini.units¶
Module that contains the internal uniting system used for computations. The internal units can be changed as necessary, although computations should be the same regardless of what internal units system chosen.
- bellini.units.ureg¶
The package-wide UnitRegistry used to specify units. Being from
pint, be careful not to createpint.quantity.Quantityinstead ofbellini.quantity.Quantity, as these do not behave the same:from bellini.units import ureg from bellini.quantity import Quantity as Q pint_quantity = 1 * ureg.mole # type(pint_quantity) = pint.quantity.Quantity bellini_quantity = Q(1, ureg.mole) # type(bellini_quantity) = bellini.quantity.Quantity
Functions
Given united quantity q, returns the internal units corresponding to the units of q |
|
Given united quantity q, returns q converted to its internal units |