def wcs_to_celestial_frame(wcs):
 for mapping_set in WCS_FRAME_MAPPINGS:
  for func in mapping_set:
   frame = func(wcs)
   if (frame is not None):
    return frame
 raise ValueError(u'Could not determine celestial frame corresponding to the specified WCS object')

def wcs_to_celestial_frame ( wcs ) : for mapping_set in WCS_FRAME_MAPPINGS : for func in mapping_set : frame = func ( wcs ) if ( frame is not None ) : return frame raise ValueError ( u'Could not determine celestial frame corresponding to the specified WCS object' )
for a given wcs .