units_manager

File Purpose: handle unit conversions

Functions

_get_symbol_and_exponent(unit_string)

Extract the unit symbol and the exponent from the unit string :param unit_string: string of units (e.g. "m-1") :return: unit symbol, exponent (e.g. "m", -1).

units_string_to_si_bases(string_of_units, *)

convert string of any units to string of SI base units.

Classes

UnitsManager([units, M, l, t, q, K, ...])

Manages units, including conversion factors and physical constants in different unit systems.

UnitsStringManager

manages string of units; keys are unit symbol bases, values are exponents.