Implementation of wcs_to_celestial_frame