Skip to content

Commit

Permalink
Update the WCS API example
Browse files Browse the repository at this point in the history
  • Loading branch information
aMarcireau committed Feb 23, 2023
1 parent 154df7c commit 995b302
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 995b302

Please sign in to comment.