compose_mas_units#
- compose_mas_units(quantity)[source]#
Express a quantity in the preferred MAS CGS units basis.
Calls
astropy.units.UnitBase.compose()withFAVORED_UNITSas the allowed unit set. The first (simplest) composed unit that astropy returns is used.- Parameters:
- quantity
u.Quantity Input quantity in any unit system.
- quantity
- Returns:
- out
u.Quantity Equivalent quantity expressed in the MAS-preferred CGS units basis (erg, cm, s, K, Gauss, g, rad).
- out
See also
decompose_mas_unitsDecomposes to CGS base unit rather than composing.
Examples
>>> import astropy.units as u >>> from psi_io._units import compose_mas_units, FN_P >>> compose_mas_units(1.0 * u.Pa) <Quantity ... erg / cm3>