is_K#

mufasa.UltraCube.is_K(data_unit)[source]#

Check if a given unit is equivalent to Kelvin (K).

Parameters:

data_unit (astropy.units.Unit or str) – The unit to be checked. It can be an astropy.units.Unit instance or a string representation of the unit.

Returns:

True if the provided unit is equivalent to Kelvin (K), otherwise False.

Return type:

bool

Examples

>>> from astropy import units as u
>>> is_K(u.K)
True
>>> is_K('K')
True
>>> is_K(u.Jy)
False