Closed MelissaGraham closed 2 years ago
Thanks, I'll take a look at this. Your extent
solution seems reasonable, but there may be a cleaner way to do it with the WCS itself.
I dug around a bit. It looks like afw.display also deals with the WCS, but doesn't have grid lines implemented (however, in an interactive plot it will give you mouse coordinates in a world coordinate system). I think that afw.display is dealing with the CRPIX offset in a similar way to what you are doing, but in this case setting an origin and bbox based on the image.PARENT (some display_matplotlib
code here).
This PR looks good to me, though we may eventually get some push back that we should be using afw.display instead of imshow directly.
A demonstration of why we must pass extent to imshow is provided in this NB: https://github.com/rubin-dp0/cet-dev/blob/main/MLG_sandbox/plot_RaDec_Coadd_DP01.ipynb