FAVORED_UNITS

Contents

FAVORED_UNITS#

FAVORED_UNITS = (Unit("erg"), Unit("cm"), Unit("s"), Unit("K"), Unit("G"), Unit("g"), Unit("rad"))#

Tuple of CGS units preferred when composing or decomposing MAS quantities.

Used by compose_mas_units() and decompose_mas_units() to express results in the most physically intuitive CGS basis: erg, cm, s, K, Gauss, g, rad. Gauss is included explicitly because astropy.units.compose() would otherwise resolve magnetic field to mixed electromagnetic CGS units.

A tuple (not a set) is used so that Sphinx’s autodoc renderer does not call sorted() on the elements — astropy unit raise UnitConversionError when compared across incompatible physical dimensions (e.g. g vs K), and Sphinx 9+ does not catch that exception type.