我想知道是否有人知道如何用python包绘制fits图像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)
但运气不好。在
非常感谢。在
一种解决方案可能是使用^{} parameter to ^{} ,并从gridspec获取边界。在
大致如下:
不是很漂亮,但会有用的。如果我遇到了一种更简单的方法来将
FITSFigure
直接附加到一个轴上,我将修改这个答案或提出一个新的答案。在相关问题 更多 >
编程相关推荐