我尝试使用 satrapy 和以下代码从 FITS 文件中读取世界坐标系(WCS):
from astropy.wcs import WCS
from astropy.io import fits
data = 'file.fits'
hdu = fits.open(data)
w = WCS(hdu[0].header)
我得到错误:
WARNING: FITSFixedWarning: RADECSYS= 'ICRS '
RADECSYS is non-standard, use RADESYSa. [astropy.wcs.wcs]
头文件是:
SIMPLE = T
BITPIX = -32
NAXIS = 2
NAXIS1 = 2048
NAXIS2 = 1489
RADECSYS= 'ICRS '
CTYPE1 = 'DEC--TAN'
CTYPE2 = 'RA---TAN'
CUNIT1 = 'deg '
CUNIT2 = 'deg '
CRPIX1 = 1.02500000000000E+03
CRPIX2 = 7.45000000000000E+02
CRVAL1 = 7.34210000000000E-01
CRVAL2 = 2.49604300000000E+01
CD1_1 = 1.09999999400000E-04
CD2_2 = 1.09999999400000E-04
CD1_2 = 0.00000000000000E+00
CD2_1 = 0.00000000000000E+00
COADD_0 = 'fpCs-002570-i5-0112.resamp.fits'
COADD_1 = 'fpCs-002570-i5-0113.resamp.fits'
COADD_2 = 'fpCs-002650-i5-0142.resamp.fits'
COADD_3 = 'fpCs-002650-i5-0143.resamp.fits'
COADD_4 = 'fpCs-002677-i5-0142.resamp.fits'
COADD_5 = 'fpCs-002677-i5-0143.resamp.fits'
COADD_6 = 'fpCs-002700-i5-0032.resamp.fits'
COADD_7 = 'fpCs-002700-i5-0033.resamp.fits'
COADD_8 = 'fpCs-002728-i5-0579.resamp.fits'
COADD_9 = 'fpCs-002728-i5-0580.resamp.fits'
COADD_10= 'fpCs-002738-i5-0084.resamp.fits'
COADD_11= 'fpCs-002738-i5-0085.resamp.fits'
COADD_12= 'fpCs-002820-i5-0032.resamp.fits'
COADD_13= 'fpCs-002820-i5-0033.resamp.fits'
COADD_14= 'fpCs-002855-i5-0038.resamp.fits'
COADD_15= 'fpCs-002855-i5-0039.resamp.fits'
COADD_16= 'fpCs-002873-i5-0075.resamp.fits'
COADD_17= 'fpCs-002873-i5-0076.resamp.fits'
COADD_18= 'fpCs-003362-i5-0033.resamp.fits'
COADD_19= 'fpCs-003362-i5-0034.resamp.fits'
COADD_20= 'fpCs-003362-i5-0035.resamp.fits'
COADD_21= 'fpCs-003384-i5-0535.resamp.fits'
COADD_22= 'fpCs-003384-i5-0536.resamp.fits'
COADD_23= 'fpCs-004128-i5-0289.resamp.fits'
COADD_24= 'fpCs-004128-i5-0290.resamp.fits'
COADD_25= 'fpCs-004157-i5-0042.resamp.fits'
COADD_26= 'fpCs-004157-i5-0043.resamp.fits'
COADD_27= 'fpCs-004198-i5-0528.resamp.fits'
COADD_28= 'fpCs-004198-i5-0529.resamp.fits'
COADD_29= 'fpCs-004207-i5-0538.resamp.fits'
COADD_30= 'fpCs-004207-i5-0539.resamp.fits'
COADD_31= 'fpCs-004868-i5-0374.resamp.fits'
COADD_32= 'fpCs-004868-i5-0375.resamp.fits'
COADD_33= 'fpCs-004874-i5-0587.resamp.fits'
COADD_34= 'fpCs-004874-i5-0588.resamp.fits'
COADD_35= 'fpCs-004895-i5-0202.resamp.fits'
COADD_36= 'fpCs-004895-i5-0203.resamp.fits'
COADD_37= 'fpCs-004905-i5-0168.resamp.fits'
COADD_38= 'fpCs-004905-i5-0169.resamp.fits'
COADD_39= 'fpCs-004933-i5-0529.resamp.fits'
COADD_40= 'fpCs-004933-i5-0530.resamp.fits'
COADD_41= 'fpCs-004948-i5-0109.resamp.fits'
COADD_42= 'fpCs-004948-i5-0110.resamp.fits'
COADD_43= 'fpCs-005566-i5-0395.resamp.fits'
COADD_44= 'fpCs-005566-i5-0396.resamp.fits'
COADD_45= 'fpCs-005603-i5-0614.resamp.fits'
COADD_46= 'fpCs-005603-i5-0615.resamp.fits'
COADD_47= 'fpCs-005633-i5-0582.resamp.fits'
COADD_48= 'fpCs-005633-i5-0583.resamp.fits'
COADD_49= 'fpCs-005642-i5-0242.resamp.fits'
COADD_50= 'fpCs-005642-i5-0243.resamp.fits'
COADD_51= 'fpCs-005658-i5-0069.resamp.fits'
COADD_52= 'fpCs-005658-i5-0070.resamp.fits'
COADD_53= 'fpCs-005765-i5-0161.resamp.fits'
COADD_54= 'fpCs-005765-i5-0162.resamp.fits'
COADD_55= 'fpCs-005770-i5-0548.resamp.fits'
COADD_56= 'fpCs-005770-i5-0549.resamp.fits'
COADD_57= 'fpCs-005777-i5-0013.resamp.fits'
COADD_58= 'fpCs-005777-i5-0014.resamp.fits'
COADD_59= 'fpCs-005781-i5-0546.resamp.fits'
COADD_60= 'fpCs-005781-i5-0547.resamp.fits'
COADD_61= 'fpCs-005792-i5-0587.resamp.fits'
COADD_62= 'fpCs-005792-i5-0588.resamp.fits'
COADD_63= 'fpCs-005792-i5-0589.resamp.fits'
COADD_64= 'fpCs-005800-i5-0568.resamp.fits'
COADD_65= 'fpCs-005800-i5-0569.resamp.fits'
COADD_66= 'fpCs-005813-i5-0605.resamp.fits'
COADD_67= 'fpCs-005813-i5-0606.resamp.fits'
COADD_68= 'fpCs-005823-i5-0572.resamp.fits'
COADD_69= 'fpCs-005823-i5-0573.resamp.fits'
COADD_70= 'fpCs-005898-i5-0610.resamp.fits'
COADD_71= 'fpCs-005898-i5-0611.resamp.fits'
COADD_72= 'fpCs-005918-i5-0587.resamp.fits'
COADD_73= 'fpCs-005918-i5-0588.resamp.fits'
我已经将它与头文件中的其他 WCS 进行了比较,它看起来确实不同,但我确定如何解决问题。我也不确定如何使用RADESYSa
而不是RADECSYS
. 我似乎找不到任何文档。任何帮助,将不胜感激。