Scimath Units User Reference¶
Internal Representation¶
Internally, a scimath unit is a unit object:
-
class
unit
(value, derivation)¶ -
value
¶ a scalar quantity which holds the magnitude of the unit, relative to the derivation in SI units.
-
derivation
¶ a 7-tuple holding the power of each fundamental quantity in the unit: (length, mass, time, electrical current, temperature, amount of substance, luminous intensity). The labels of the fundamental quantities are given in the attribute _labels=(‘m’, ‘kg’, ‘s’, ‘A’, ‘K’, ‘mol’, ‘cd’)
-
label
¶ the display name of the unit.
-
For example, the predefined unit Newton has the following attributes:
>>> from scimath.units.force import newton, lbf
>>> newton.value
1.0
>>> newton.derivation
(1, 1, -2, 0, 0, 0, 0)
>>> newton.label
'newton'
>>> lbf.value
4.44822
>>> lbf.derivation
(1, 1, -2, 0, 0, 0, 0)