我嘗試讀取世界座標系(WCS)從使用satrapy這個代碼FITS文件: from astropy.wcs import WCS
from astropy.io import fits
data = 'file.fits'
hdu = fits.open(data)
w = WCS(hdu[0].header)
我得到的錯誤: WARNING: FITSFixedWarning: R
我想用PyFITS在FITS文件中編寫一個布爾結構數組。 我有一些問題。這是一個簡單的例子。 我創建測試字典並將其轉換爲結構化數組。 In [241]: test = {'p':np.array([True]*10+[False]*10,dtype='b')}
In [242]: test = np.core.records.fromarrays(list(test.values()), nam
我遇到了一個問題,機智適合文件操作在astropy包中,我需要一些幫助。 我基本上想拍攝一張我適合文件格式的圖像,並創建一個新文件,我需要開始輸入校正因子,然後可以使用校正因子和原始圖像生成新圖像以生成修正圖像。每個這些將具有相同的尺寸。 與此開始: from astropy.io import fits
# Compute the size of the images (you can al
我試圖加載到內存中的幾個2 000 FITS利用astropy.io.fits: def readfits(filename):
with fits.open(filename) as ft:
# the fits contain a single HDU
data = ft[0].data
return data
data_sci = []
fo