Bases: astropy.units.quantity.Quantity
A representation of a (scaled) function of a number with a unit.
Function quantities are quantities whose units are functions containing a physical unit, such as dB(mW). Most of the arithmetic operations on function quantities are defined in this base class.
While instantiation is also defined here, this class should not be instantiated directly. Rather, subclasses should be made which have _unit_class pointing back to the corresponding function unit class.
Parameters: | value : number, sequence of convertible items, Quantity, or FunctionQuantity
unit : string, UnitBase or FunctionUnitBase instance, optional
dtype : dtype, optional
copy : bool, optional
order : {‘C’, ‘F’, ‘A’}, optional
subok : bool, optional
ndmin : int, optional
|
---|---|
Raises: | TypeError
TypeError
|
Attributes Summary
cgs | Return a copy with the physical unit in CGS units. |
equivalencies | Equivalencies applied by default during unit conversions. |
physical | The physical quantity corresponding the function one. |
si | Return a copy with the physical unit in SI units. |
unit | Function unit of the quantity, containing the physical unit. |
Methods Summary
decompose([bases]) | Generate a new FunctionQuantity with the physical unit decomposed. |
to(unit[, equivalencies]) | Returns a new quantity with the specified units. |
Attributes Documentation
Return a copy with the physical unit in CGS units.
Equivalencies applied by default during unit conversions.
Contains the list to convert between function and physical unit, as set by the FunctionUnitBase unit.
The physical quantity corresponding the function one.
Return a copy with the physical unit in SI units.
Function unit of the quantity, containing the physical unit.
Represented by a FunctionUnitBase object.
Methods Documentation
Generate a new FunctionQuantity with the physical unit decomposed.
For details, see decompose.
Returns a new quantity with the specified units.
Parameters: | unit : UnitBase instance, str equivalencies : list of equivalence pairs, optional
|
---|