def compute_field_coord(header): """Compute galactocentric radius for this ACS field as well as the central RA, Dec. """ wcs = WCS(header) footprint = wcs.calcFootprint() ra0 = np.array([v[0] for v in footprint]).mean() dec0 = np.array([v[1] for v in footprint]).mean() coord = ICRS(ra=ra0, dec=dec0, unit=(u.degree, u.degree)) return ra0, dec0, correct_rgc(coord)
def make_polygon(header): """Get footprint polygons, with (RA,Dec) vertices, from the given extensions in the in the reference FITS file. """ wcs = WCS(header) return wcs.calcFootprint().tolist()