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.0)
 elif ((ctype[:4] in ['DEC-', 'HPLT']) or (ctype[1:4] == 'LAT')):
  return ('latitude', None)
 else:
  return ('scalar', None)

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.0 ) 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 coordinate .