check_units

artpop.util.check_units(value, default_unit)[source]

Check if an object has units. If not, apply the default unit.

Parameters
valuefloat, list-like, or Quantity

Parameter that has units.

default_unitstr or astropy unit

The default unit to apply to value if it does not have units.

Returns
quantityQuantity

value with astropy units.