读取fits文件后想要显示fits文件中的内容,主要的链接:http://www.astropy.org/astropy-tutorials/FITS-images.html
读取的fits中的数据:image_data
import matplotlib.pyplot as plt
plt.imshow(image_data, cmap='gray')
plt.colorbar()
plt.show()
结果:

本文介绍如何使用Python的matplotlib库来读取并显示FITS文件中的图像数据,通过简单的代码实现图像的灰度显示及颜色条辅助理解。
读取fits文件后想要显示fits文件中的内容,主要的链接:http://www.astropy.org/astropy-tutorials/FITS-images.html
读取的fits中的数据:image_data
import matplotlib.pyplot as plt
plt.imshow(image_data, cmap='gray')
plt.colorbar()
plt.show()
结果:

转载于:https://www.cnblogs.com/gegemu/p/9952541.html

被折叠的 条评论
为什么被折叠?