def coord_type_from_ctype(ctype):
    if ctype[:4] in ['RA--'] or ctype[1:4] == 'LON':
        return 'longitude', None
    elif ctype[:4] in ['HPLN']:
        return 'longitude', 180.
    elif ctype[:4] in ['DEC-', 'HPLT'] or ctype[1:4] == 'LAT':
        return 'latitude', None
    else:
        return 'scalar', None
Determine whether a particular WCS ctype corresponds to an angle or scalar
dataset/ETHPy150Open glue-viz/glue/glue/external/wcsaxes/utils.py/coord_type_from_ctype