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
- quantity
Quantity value with astropy units.