rubin-dp0 / tutorial-notebooks

Tutorial Jupyter Notebooks for Data Preview 0, created and maintained by the Rubin Observatory Community Science Team.
Apache License 2.0
33 stars 17 forks source link

add extent S.4.1 #63

Closed MelissaGraham closed 2 years ago

MelissaGraham commented 2 years ago

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

kadrlica commented 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.

kadrlica commented 2 years ago

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.