Quantities¶
BaseQuantity¶
- class infrasys.base_quantity.BaseQuantity(value, units=None)¶
Interface for base quantity.
- to_dict() dict[str, Any] ¶
Convert a quantity to a dictionary for serialization.
- classmethod from_dict(data: dict) BaseQuantity ¶
Construct the quantity from a serialized dictionary.
infrasys.quantities¶
This module defines basic unit quantities.
To create new Quantities for a given base unit, we just need to specify the base unit as the second argument of ureg.check.
- class infrasys.quantities.Distance(value, units=None)¶
- class infrasys.quantities.Voltage(value, units=None)¶
- class infrasys.quantities.Current(value, units=None)¶
- class infrasys.quantities.Angle(value, units=None)¶
- class infrasys.quantities.ActivePower(value, units=None)¶
- class infrasys.quantities.Energy(value, units=None)¶
- class infrasys.quantities.Time(value, units=None)¶
- class infrasys.quantities.Resistance(value, units=None)¶