validate_quantity¶
- synphot.units.validate_quantity(input_value, output_unit, equivalencies=[])[source]¶
Validate quantity (value and unit).
Note
For flux conversion, use
convert_flux()
instead.- Parameters:
- input_valuenumber, array-like, or
Quantity
Quantity to validate. If not a Quantity, assumed to be already in output unit.
- output_unitstr or
Unit
Output quantity unit.
- equivalencieslist of equivalence pairs, optional
See
astropy.units
.
- input_valuenumber, array-like, or
- Returns:
- output_value
Quantity
Validated quantity in given unit.
- output_value