validate_unit

synphot.units.validate_unit(input_unit)[source]

Validate unit.

To be compatible with existing SYNPHOT data files:

  • ‘angstroms’ and ‘inversemicrons’ are accepted although unrecognized by astropy units

  • ‘transmission’, ‘extinction’, and ‘emissivity’ are converted to astropy dimensionless unit

Parameters
input_unitstr or Unit

Unit to validate.

Returns
output_unitUnit

Validated unit.

Raises
synphot.exceptions.SynphotError

Invalid unit.