parse_unit

sofia_redux.visualization.utils.unit_conversion.parse_unit(unit_string)[source]

Parse a unit string into a unit object.

Parameters:
unit_stringstr

Unit to be parsed. Generally, any unit understood by the astropy.units module is supported. Additionally, ‘cm-1’ is supported as an alias for the ‘kayser’ unit.

Returns:
astropy.units.Unit
Raises:
ValueError

If the unit is not recognized.