QuantityAttributeMixin

class lsst.validate.base.QuantityAttributeMixin[source]

Bases: object

Mixin with common attributes for classes that wrap an astropy.units.Quantity.

Subclasses must have a self._quantity attribute that is an astropy.units.Quantity, str, bool, or None (only numeric values are astropy quantities).

Attributes Summary

latex_unit Units as a LaTeX string, wrapped in $.
quantity Value of the datum (astropy.units.Quantity, str, bool, None).
unit Read-only astropy.units.Unit of the quantity.
unit_str Read-only astropy.units.Unit-compatible str indicating units of quantity.

Attributes Documentation

latex_unit

Units as a LaTeX string, wrapped in $.

quantity

Value of the datum (astropy.units.Quantity, str, bool, None).

unit

Read-only astropy.units.Unit of the quantity.

If the quantity is a str or bool, the unit is None.

unit_str

Read-only astropy.units.Unit-compatible str indicating units of quantity.