Hello!
I’m having issues with plotting things on top of images (using imshow, and SkyCoord). When I try plotting on top of an image with a SkyCoord object, I have to use ax.get_transform(‘fk5’) to get it to line up, but I don’t understand why if the coordinates are in ICRS and the image should be in ICRS.
I have a point I want to plot as a SkyCoord object (In this case it’s the known center of the source):
center = SkyCoord('18:57:25.59555586 ', ‘+16:24:55.8404388’, unit=(un.hourangle, un.deg));
When I go to plot it, I try:
ax.plot(center.ra.degree, center.dec.degree, markersize=15, marker=‘*’, color=‘white’);
Now, using the ax.get_transform, with different arguments passed I get a variety of different plots I don’t understand.
Using ax.get_transform(‘icrs’), which means it would transform the passed coordinates (which are in ICRS as it’s the SkyCoord default, right?) that are in ICRS, to the WCS (or the image’s coordinates), right? However, it seems that doesn’t work exactly… As I get the orange star.
Now, if I try ax.get_transform(‘fk5’), it works (albeit some error)! Which is the black star (under the white dot).
However, this would mean the coordinates should be in FK5 (they’re not), and/or the image would be in FK5 (which I find hard to believe).
Also, just to try it I did ax.get_transform(‘world’), which also works?! This is the white dot (which is on top of the black star).
I tried looking around in the documentation, and what I came up with was: in ax.get_transform(‘frame’) the frame and the frame of the coordinates should be the same, even the documentation uses ax.get_transform(‘fk5’), but if ICRS is the standard why would the example use FK5.