Closed rhsharpe closed 1 year ago
Would you please share your code?
Yes, here is a zip file with my python notebook and the two files I am plotting: skymap.zip
Oh, I see. You have to reproject the image data for the zoomed in axes. I suggest using https://reproject.readthedocs.io/en/stable/.
Hi!
I am trying to display a fits skymap within an inset on a contour plot (similar to what is shown here: https://lscsoft.docs.ligo.org/ligo.skymap/ but with just the Gemini+F2 plot in the inset). I am having trouble getting the coordinate transforms within the inset to work properly.
If I don't include a transform within the ax_inset.imshow() command, it appears to only show a small corner of the skymap in the inset, which makes sense.
If I use the same transform I used for the skymap plotted in the larger figure (from the header of the fits file) within the ax_inset.imshow() command, the inset is completely blank.
The only way I can get any data to appear in the inset is to use ax.get_transform('pixel'), but then I have the issue of the scale being off.
I've attached examples of the three situations I mentioned. Do you have any suggestions for plotting a fits image, with the correct scaling, as an inset of a healpix contour plot?