pyphot.ezunits package#
Submodules#
pyphot.ezunits.pint module#
pint#
Pint is Python module/package to define, operate and manipulate physical quantities: the product of a numerical value and a unit of measurement. It allows arithmetic operations between them and conversions from and to different units.
- copyright:
2012 by Hernan E. Grecco.
- license:
BSD, see LICENSE for more details.
- exception DimensionalityError[source]#
Bases:
ValueError
Raised when trying to convert between incompatible units.
- exception UndefinedUnitError[source]#
Bases:
ValueError
Raised when the units are not defined in the unit registry.
- class UnitRegistry[source]#
Bases:
object
The unit registry stores the definitions and relationships between units.
- Parameters:
filename – path of the units definition file to load. Empty to load the default definition file. None to leave the UnitRegistry empty.
force_ndarray – convert any input, scalar or not to a numpy.ndarray.
Module contents#
pint#
Pint is Python module/package to define, operate and manipulate physical quantities: the product of a numerical value and a unit of measurement. It allows arithmetic operations between them and conversions from and to different units.
- copyright:
2012 by Hernan E. Grecco.
- license:
BSD, see LICENSE for more details.
- exception DimensionalityError[source]#
Bases:
ValueError
Raised when trying to convert between incompatible units.
- exception UndefinedUnitError[source]#
Bases:
ValueError
Raised when the units are not defined in the unit registry.
- class UnitRegistry[source]#
Bases:
object
The unit registry stores the definitions and relationships between units.
- Parameters:
filename – path of the units definition file to load. Empty to load the default definition file. None to leave the UnitRegistry empty.
force_ndarray – convert any input, scalar or not to a numpy.ndarray.