def solar_coord_type_from_ctype(ctype):
    """
    Determine whether a particular WCS ctype corresponds to an angle or scalar
    coordinate.
    """

    if ctype[2:4] == 'LN':
        if ctype[:4] in ['HPLN', 'HGLN']:
            return 'longitude', 180.

        return 'longitude', None

    elif ctype[2:4] == 'LT':
        return 'latitude', None

    else:
        return 'scalar', None