AFL.automation.shared.units#

Functions

enforce_units(value, unit_type)

Ensure that a number has units and convert to the default_units

get_unit_type(value)

has_units(value)

is_concentration(value)

is_density(value)

is_dimensionless(value)

is_mass(value)

is_molarity(value)

is_volume(value)

to_quantity(value)

Convert a string to a pint quantity

AFL.automation.shared.units.has_units(value: Quantity) bool[source]#
AFL.automation.shared.units.is_volume(value: Quantity) bool[source]#
AFL.automation.shared.units.is_molarity(value: Quantity) bool[source]#
AFL.automation.shared.units.is_mass(value: Quantity) bool[source]#
AFL.automation.shared.units.is_density(value: Quantity) bool[source]#
AFL.automation.shared.units.is_concentration(value: Quantity) bool[source]#
AFL.automation.shared.units.is_dimensionless(value: Quantity) bool[source]#
AFL.automation.shared.units.get_unit_type(value: Quantity) str[source]#
AFL.automation.shared.units.to_quantity(value: str | Quantity) Quantity[source]#

Convert a string to a pint quantity

AFL.automation.shared.units.enforce_units(value: None | str | Quantity, unit_type: str) Quantity[source]#

Ensure that a number has units and convert to the default_units