From 995b30248da47bef9aa611abd66b0e14420e0925 Mon Sep 17 00:00:00 2001 From: Alexandre Marcireau Date: Fri, 24 Feb 2023 09:29:59 +1100 Subject: [PATCH] Update the WCS API example --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index addae91..45e0236 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,12 @@ solver = ... solution = ... if solution.has_match(): - wcs = astropy.wcs.WCS(solution.best_match().wcs_fields) + wcs = astropy.wcs.WCS( + astropy.io.fits.Header( + astropy.io.fits.Card(key, value[0], value[1]) + for key, value in wcs_fields.items() + ) + ) pixels = wcs.all_world2pix( [[star.ra_deg, star.dec_deg] for star in solution.best_match().stars], 0,