mudu

A Python package for unit and dimension handling, unit conversion, units arithemtic, with support for custom units definition.

Submodules

Attributes

LENGTH

MASS

TIME

PLANE_ANGLE

SOLID_ANGLE

THERMODYNAMIC_TEMPERATURE

ELECTRIC_CURRENT

AMOUNT_OF_SUBSTANCE

LUMINOUS_INTENSITY

FORCE

SPEED

ENERGY

DENSITY

GENERIC_DIMENSION

GENERIC_QUANTITY

GENERIC_UNIT

DIMENSIONLESS

DIMENSIONLESS_UNIT

GIGA

MEGA

KILO

CENTI

MILLI

MICRO

NANO

PICO

FEMTO

ATTO

OrderUnit

INCH

METER

KILOMETER

FEET

YARD

MILE

NAUTICAL_MILE

GRAM

KILOGRAM

POUND

SLUG

SHORT_TON

LONG_TON

METRIC_TON

SECOND

MINUTE

HOUR

KELVIN

RANKINE

CELSIUS

FARENHEIT

DEGREE

RADIAN

STERADIAN

AMPERE

MOLE

CANDELA

NEWTON

POUND_FORCE

POUNDAL

DYNE

PASCAL

PSI

mmHg

inHg

BAR

ATM

POUND_PER_SQUARE_FOOT

JOULE

BRITISH_THERMAL_UNIT

CALORIE

WATT_HOUR

ELECTRON_VOLT

KILOGRAM_PER_CUBIC_METER

GRAM_PER_CUBIC_CENTIMETER

GRAM_PER_CUBIC_MILLILITER

POUND_PER_CUBIC_FOOT

POUND_PER_CUBIC_INCH

SLUG_PER_CUBIC_FOOT

WATT

HORSEPOWER

BTU_PER_HOUR

VOLT

FARAD

HENRY

WEBER

OHMS

TESLA

SIEMENS

LUX

BECQUEREL

CURIE

GRAY

RAD

SIEVERT

REM

METER_PER_SECOND

MILE_PER_HOUR

KM_PER_HOUR

FOOT_PER_SECOND

KNOT

SolidAngle

ElectricCurrent

AmountOfSubstance

LuminousIntensity

Voltage

Capacitance

Inductance

MagneticFlux

Resistance

Conductance

MageneticFieldStrength

Illuminance

Exceptions

DimensionError

Base class for dimension errors.

ConversionError

Base class for conversion errors.

NotIterableError

Base class for iteration errors

SequenceOperationErrorr

Base class for sequence operation errors

OperationNotAvailable

Operation is not available in this version

Classes

_UnitType

Internal base class for units definition.

_DimensionUnitBase

Base class for all dimensions model.

_DimensionType

Base class for all fundamental quantities. As an example,

DerivedQuantity

Base class for all derived quantities. As an example,

GenericUnit

Base class for all fundamental quantities. As an example,

GenericUnit2

Base class for all derived quantities. As an example,

custom_unit

Custom units

Length

Base class for all fundamental quantities. As an example,

Mass

Base class for all fundamental quantities. As an example,

Time

Base class for all fundamental quantities. As an example,

Temperature

Base class for all fundamental quantities. As an example,

Angle

Base class for all fundamental quantities. As an example,

Force

Base class for all derived quantities. As an example,

Pressure

Base class for all derived quantities. As an example,

Energy

Base class for all derived quantities. As an example,

Density

Base class for all derived quantities. As an example,

Power

Base class for all derived quantities. As an example,

Radioactivity

Base class for all derived quantities. As an example,

AbsorbedDose

Base class for all derived quantities. As an example,

DoseEquivalent

Base class for all derived quantities. As an example,

Speed

Base class for all derived quantities. As an example,

Package Contents

mudu.LENGTH
mudu.MASS
mudu.TIME
mudu.PLANE_ANGLE
mudu.SOLID_ANGLE
mudu.THERMODYNAMIC_TEMPERATURE
mudu.ELECTRIC_CURRENT
mudu.AMOUNT_OF_SUBSTANCE
mudu.LUMINOUS_INTENSITY
mudu.FORCE = 'force'
mudu.SPEED = 'speed'
mudu.ENERGY = 'energy'
mudu.DENSITY = 'density'
mudu.GENERIC_DIMENSION = 'generic_dimension'
mudu.GENERIC_QUANTITY = 'generic_quantity'
mudu.GENERIC_UNIT = 'generic_unit'
mudu.DIMENSIONLESS = 'dimensionless'
mudu.DIMENSIONLESS_UNIT = 'dimensionless_unit'
mudu.GIGA
mudu.MEGA
mudu.KILO
mudu.CENTI
mudu.MILLI
mudu.MICRO
mudu.NANO
mudu.PICO
mudu.FEMTO
mudu.ATTO
class mudu._UnitType

Internal base class for units definition.

_dimension

The unit dimension, say, LENGTH, MASS, `TIME `

Type:

str

_unit_name

The unit name e.g. meter

Type:

str

_unit_symbol

Symbolic representation of the unit, usually passed as a string, then converted to a sympy.Symbol object

Type:

str

_order

Multiple prefix, if unit is a multiple prefix of a _UnitType.

Type:

_OrderType

_base

If a unit is a multiple prefix, then it has a base unit. e.g. CENTIMETER is composed of the multiple prefix CENTI and the base unit METER.

Type:

_UnitType

_quantity

The quantity the unit represents, say Force, Energy.

Type:

str

create_unit

Class method to create a _UnitType object.

Type:

_UnitType

is_unit_type

Internal method to validate that an object is an instance of _UnitType

Type:

bool

- **Usage example**
from mudu import Length, METER
from mudu.base import _UnitType

# define a new unit type
ME_UNIT = _UnitType(
    _dimension=LENGTH,
    _unit_name="me_unit",
    _unit_symbol="m_u",
    )

some_length = Length(12, ME_UNIT)
To create a conversion standard with another unit, read the documentation
on _ConversionTableType or read the full documentation at <https
Type:

//github.com/techkaduna/mudu>_.

_dimension: str
_unit_name: str
_unit_symbol: str | sympy.Symbol
_quantity: str = 'generic_quantity'
_order: _OrderType = None
_base: Self = None
classmethod create_unit(**kwargs)

Internal alternate _UnitType constructor.

Parameters:

__init__. (create_unit takes same parameters as the _UnitType)

__post_init__()
__repr__()
__mul__(x: Self)
__rmul__(x: Self)
__truediv__(x)
__rtruediv__(x)
__pow__(x)
mudu.OrderUnit
mudu.INCH
mudu.METER
mudu.KILOMETER
mudu.FEET
mudu.YARD
mudu.MILE
mudu.NAUTICAL_MILE
mudu.GRAM
mudu.KILOGRAM
mudu.POUND
mudu.SLUG
mudu.SHORT_TON
mudu.LONG_TON
mudu.METRIC_TON
mudu.SECOND
mudu.MINUTE
mudu.HOUR
mudu.KELVIN
mudu.RANKINE
mudu.CELSIUS
mudu.FARENHEIT
mudu.DEGREE
mudu.RADIAN
mudu.STERADIAN
mudu.AMPERE
mudu.MOLE
mudu.CANDELA
mudu.NEWTON
mudu.POUND_FORCE
mudu.POUNDAL
mudu.DYNE
mudu.PASCAL
mudu.PSI
mudu.mmHg
mudu.inHg
mudu.BAR
mudu.ATM
mudu.POUND_PER_SQUARE_FOOT
mudu.JOULE
mudu.BRITISH_THERMAL_UNIT
mudu.CALORIE
mudu.WATT_HOUR
mudu.ELECTRON_VOLT
mudu.KILOGRAM_PER_CUBIC_METER
mudu.GRAM_PER_CUBIC_CENTIMETER
mudu.GRAM_PER_CUBIC_MILLILITER
mudu.POUND_PER_CUBIC_FOOT
mudu.POUND_PER_CUBIC_INCH
mudu.SLUG_PER_CUBIC_FOOT
mudu.WATT
mudu.HORSEPOWER
mudu.BTU_PER_HOUR
mudu.VOLT
mudu.FARAD
mudu.HENRY
mudu.WEBER
mudu.OHMS
mudu.TESLA
mudu.SIEMENS
mudu.LUX
mudu.BECQUEREL
mudu.CURIE
mudu.GRAY
mudu.RAD
mudu.SIEVERT
mudu.REM
mudu.METER_PER_SECOND
mudu.MILE_PER_HOUR
mudu.KM_PER_HOUR
mudu.FOOT_PER_SECOND
mudu.KNOT
class mudu._DimensionUnitBase

Base class for all dimensions model.

_conversion_standards

Conversion table definition of conversion standards for converting from one unit to another provided that the units are of the same dimension.

Type:

_ConversionTableType

_dimension

The dimension represented by the dimension model e.g. METER, LENGTH, TIME

Type:

str

_check_and_convert

Performs an arithemetic or boolean operation on a _DimensionUnitBase child object. Makes sure of unit homogeniety by implicitly converting units where required before performing the operation.

Type:

_DimensionUnitBase | int | float | bool

convert_to

Converts from one unit to another, provided that there is a conversion standard defined for the units involved.

Type:

_DimensionUnitBase | bool

_conversion_standards: mudu.base._ConversionTableType = None
_dimension: str = None
__repr__()
__str__()
__int__()
__float__()
__add__(x)
__radd__(x)
__sub__(x)
__rsub__(x)
__mul__(x)
__rmul__(x)
__truediv__(x)
__rtruediv__(x)
__floordiv__(x)
__rfloordiv__(x)
__pow__(x)
__round__(y=0)
__lt__(x)
__gt__(x)
__le__(x)
__ge__(x)
__eq__(x)
_check_and_convert(x: Any, _operator: Callable) Self | bool | int | float

Performs an arithemetic or boolean operation on a _DimensionUnitBase child object. Makes sure of unit homogeniety by implicitly converting units where required before performing the operation.

Parameters:
  • x (Any) – Object to perform operation on.

  • _operator (Callable) – Operator representing operation to be performed

  • return (_DimensionUnitBase | bool | int | float)

convert_to(_to: mudu.base._UnitType)

Converts from one unit to another, provided that there is a conversion standard defined for the units involved.

Parameters:
  • unit_type (_UnitType) – The _UnitType instance to be converted to.

  • return (_DimensionUnitBase object with the unit_type as the unit.)

class mudu._DimensionType(unit: mudu.base._UnitType, value: int | float | collections.abc.Sequence)

Bases: _DimensionUnitBase

Base class for all fundamental quantities. As an example, Length class, Mass class and Time`class are child classes of `_DimensionType. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

_DimensiionType

_check_and_convert

same as the base class (_DimensionUnitBase)

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards: mudu.base._ConversionTableType = None
_dimension = None
_base_unit_standard = None
dimension
unit_type
unit
symbol
value
classmethod create_unit(**kwargs)
property __value_not_seq

value is not a sequence

__repr__()
__str__()
__len__()
__iter__()
__round__(y=0)
__mul__(x)
__truediv__(x)
__rtruediv__(x)
__pow__(x)
_check_and_convert(x, _operator: Callable) Self | bool

Performs an arithemetic or boolean operation on a _DimensionType object. Makes sure of unit homogeniety by implicitly converting units where required before performing the operation.

Parameters:
  • x (Any) – Object to perform operation on.

  • _operator (Callable) – Operator representing operation to be performed

  • return (_DimensionType | bool | int | float)

convert_to(_to) Self | None

Converts from one unit to another, provided that there is a conversion standard defined for the units involved.

Parameters:
  • unit_type (_UnitType) – The _UnitType instance to be converted to.

  • return (_DimensionType object with the unit_type as the unit.)

class mudu.DerivedQuantity(value: int | float, unit_definition: mudu.base._UnitType, quantity: str = GENERIC_QUANTITY)

Bases: _DimensionUnitBase

Base class for all derived quantities. As an example, Force class is a child class of DerivedQuantity. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

DerivedQuantity

_check_and_convert

same as the base class ((_DimensionUnitBase))

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards: mudu.base._ConversionTableType = None
value
unit_type
symbol
quantity: str
classmethod create_unit(**kwargs)

Internal class method to create a new DerivedQuantity object, the same argument signature as init.

dimension
property __value_not_seq

value is not a sequence

__repr__()
__str__()
__len__()
__iter__()
__round__(y=0)
__mul__(x)
__truediv__(x)
__rtruediv__(x)
__pow__(x)
_check_and_convert(x, _operator: Callable) Self

Performs an arithemetic or boolean operation on a DerivedQuantity child object. Makes sure of unit homogeniety by implicitly converting units where required before performing the operation.

Parameters:
  • x (Any) – Object to perform operation on.

  • _operator (Callable) – Operator representing operation to be performed

  • return (DerivedQuantity | bool | int | float)

convert_to(_to) Self | None

Converts from one unit to another, provided that there is a conversion standard defined for the units involved.

Parameters:
  • unit_type (_UnitType) – The _UnitType instance to be converted to.

  • return (_DimensionType object with the unit_type as the unit.)

class mudu.GenericUnit(value, unit)

Bases: _DimensionType

Base class for all fundamental quantities. As an example, Length class, Mass class and Time`class are child classes of `_DimensionType. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

_DimensiionType

_check_and_convert

same as the base class (_DimensionUnitBase)

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_dimension
class mudu.GenericUnit2(value, unit_definition)

Bases: DerivedQuantity

Base class for all derived quantities. As an example, Force class is a child class of DerivedQuantity. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

DerivedQuantity

_check_and_convert

same as the base class ((_DimensionUnitBase))

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

class mudu.custom_unit(value: int | float, *, num: collections.abc.Sequence[mudu.base._UnitType], per: collections.abc.Sequence[int] | collections.abc.Sequence[mudu.base._UnitType] = (1,), quantity=GENERIC_QUANTITY)

Bases: DerivedQuantity

Custom units

__numerator_unit = 1
__denominator_unit = 1
__numerator = []
__denominator = []
__unit_definition = 1.0
__check_condition(_from, allow_int=False)
__list2unit(_from: int | collections.abc.Sequence[mudu.base._UnitType], allow_int=False)
__repr_only_one_quantity(_from: collections.abc.Sequence, is_denum=False)

Ensure that each unit represent exclusively only one quanitity

abstractmethod convert_to(num: collections.abc.Sequence, per: collections.abc.Sequence)

Converts from one unit to another, provided that there is a conversion standard defined for the units involved.

Parameters:
  • unit_type (_UnitType) – The _UnitType instance to be converted to.

  • return (_DimensionType object with the unit_type as the unit.)

class mudu.Length(value, unit)

Bases: _DimensionType

Base class for all fundamental quantities. As an example, Length class, Mass class and Time`class are child classes of `_DimensionType. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

_DimensiionType

_check_and_convert

same as the base class (_DimensionUnitBase)

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
_dimension
_base_unit_standard
class mudu.Mass(value, unit)

Bases: _DimensionType

Base class for all fundamental quantities. As an example, Length class, Mass class and Time`class are child classes of `_DimensionType. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

_DimensiionType

_check_and_convert

same as the base class (_DimensionUnitBase)

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
_dimension
_base_unit_standard
class mudu.Time(value, unit)

Bases: _DimensionType

Base class for all fundamental quantities. As an example, Length class, Mass class and Time`class are child classes of `_DimensionType. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

_DimensiionType

_check_and_convert

same as the base class (_DimensionUnitBase)

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
_dimension
_base_unit_standard
class mudu.Temperature(value, unit)

Bases: _DimensionType

Base class for all fundamental quantities. As an example, Length class, Mass class and Time`class are child classes of `_DimensionType. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

_DimensiionType

_check_and_convert

same as the base class (_DimensionUnitBase)

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
_dimension
_base_unit_standard
class mudu.Angle(value, unit)

Bases: _DimensionType

Base class for all fundamental quantities. As an example, Length class, Mass class and Time`class are child classes of `_DimensionType. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

_DimensiionType

_check_and_convert

same as the base class (_DimensionUnitBase)

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
_dimension
mudu.SolidAngle
mudu.ElectricCurrent
mudu.AmountOfSubstance
mudu.LuminousIntensity
class mudu.Force(value, unit_definition)

Bases: DerivedQuantity

Base class for all derived quantities. As an example, Force class is a child class of DerivedQuantity. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

DerivedQuantity

_check_and_convert

same as the base class ((_DimensionUnitBase))

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
class mudu.Pressure(value, unit_definition)

Bases: DerivedQuantity

Base class for all derived quantities. As an example, Force class is a child class of DerivedQuantity. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

DerivedQuantity

_check_and_convert

same as the base class ((_DimensionUnitBase))

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
class mudu.Energy(value, unit_definition)

Bases: DerivedQuantity

Base class for all derived quantities. As an example, Force class is a child class of DerivedQuantity. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

DerivedQuantity

_check_and_convert

same as the base class ((_DimensionUnitBase))

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
class mudu.Density(value, unit_definition)

Bases: DerivedQuantity

Base class for all derived quantities. As an example, Force class is a child class of DerivedQuantity. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

DerivedQuantity

_check_and_convert

same as the base class ((_DimensionUnitBase))

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
class mudu.Power(value, unit_definition)

Bases: DerivedQuantity

Base class for all derived quantities. As an example, Force class is a child class of DerivedQuantity. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

DerivedQuantity

_check_and_convert

same as the base class ((_DimensionUnitBase))

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
mudu.Voltage
mudu.Capacitance
mudu.Inductance
mudu.MagneticFlux
mudu.Resistance
mudu.Conductance
mudu.MageneticFieldStrength
mudu.Illuminance
class mudu.Radioactivity(value, unit_definition)

Bases: DerivedQuantity

Base class for all derived quantities. As an example, Force class is a child class of DerivedQuantity. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

DerivedQuantity

_check_and_convert

same as the base class ((_DimensionUnitBase))

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
class mudu.AbsorbedDose(value, unit_definition)

Bases: DerivedQuantity

Base class for all derived quantities. As an example, Force class is a child class of DerivedQuantity. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

DerivedQuantity

_check_and_convert

same as the base class ((_DimensionUnitBase))

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
class mudu.DoseEquivalent(value, unit_definition)

Bases: DerivedQuantity

Base class for all derived quantities. As an example, Force class is a child class of DerivedQuantity. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

DerivedQuantity

_check_and_convert

same as the base class ((_DimensionUnitBase))

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
class mudu.Speed(value, unit_definition)

Bases: DerivedQuantity

Base class for all derived quantities. As an example, Force class is a child class of DerivedQuantity. Check the documenation at by running mudu –doc on the cli on how to extend this class.

_conversion_standards

Same as in _DimensionUnitBase

Type:

_ConversionTableType

_dimension

Same as in DimensionUnitBase

Type:

str

value

Scalar value of the quantity

Type:

_SetOnce[int | float]

unit_type

unit definition of the quantity

Type:

_UnitType

symbol

Symbolic representation of the quantity unit

Type:

sympy.Symbol

create_unit

Internal class method for creating a new DerivedQuantity object instance with the same argument signature as init.

Type:

DerivedQuantity

_check_and_convert

same as the base class ((_DimensionUnitBase))

Type:

x: Any, operator: Callable

convert_to

same as the base class (_DimensionUnitBase)

Type:

_to

_conversion_standards
exception mudu.DimensionError

Bases: ArithmeticError

Base class for dimension errors.

exception mudu.ConversionError

Bases: ArithmeticError

Base class for conversion errors.

exception mudu.NotIterableError

Bases: Exception

Base class for iteration errors

exception mudu.SequenceOperationErrorr

Bases: Exception

Base class for sequence operation errors

exception mudu.OperationNotAvailable

Bases: Exception

Operation is not available in this version