Skip to content

Commit 995b302

Browse files
committed
Update the WCS API example
1 parent 154df7c commit 995b302

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,12 @@ solver = ...
151151
solution = ...
152152

153153
if solution.has_match():
154-
wcs = astropy.wcs.WCS(solution.best_match().wcs_fields)
154+
wcs = astropy.wcs.WCS(
155+
astropy.io.fits.Header(
156+
astropy.io.fits.Card(key, value[0], value[1])
157+
for key, value in wcs_fields.items()
158+
)
159+
)
155160
pixels = wcs.all_world2pix(
156161
[[star.ra_deg, star.dec_deg] for star in solution.best_match().stars],
157162
0,

0 commit comments

Comments
 (0)