我想知道是否有人知道如何使用 python 包 matplotlib.imshow 绘制适合图像,并使用相应的世界坐标系值,甚至可能是右升或赤纬作为 x 和 y 值而不是物理像素值,类似于底部本页图: http: //astroplotlib.stsci.edu/page_images.htm
不幸的是,提供的脚本在 IDL 中......我还不精通......
如果我概述了我的 gridspec 布局可能会有所帮助:
fig = pyplot.figure(figsize=(11,11))
gridspec_layout = gridspec.GridSpec(3,3)
gridspec_layout.update(hspace=0.0, wspace=0.0)
hdulist_org_M33_UVM2 = fits.open('myfits.fits')
wcs = WCS(hdulist_org_M33_UVM2[0].header)
pyplot_2 = fig.add_subplot(gridspec_layout[2])
ax = WCSAxes(fig, [0.1, 0.1, 0.8, 0.8], wcs=wcs)
pyplot_2.add_axes(ax)
但没有运气。
非常感谢。