我必须使名为“exponential.fits”的拟合文件的标题与“empirical.fits”的标题相同。有没有办法用 writefits.pro 做到这一点?
1 回答
0
是的,你可以这样做,writefits.pro
但你最终会覆盖已经存在的文件,所以你可能想考虑用另一个程序来做。但是使用writefits
(假设您想要第 0 个扩展标头)的方法是:
; get the header you want and the data of the file you need
empirical_hdr = headfits('empirical.fits') ;header
exponential_data = readfits('exponential.fits') ;data
;overwrite the exponential.fits with what you want
writefits,'exponential.fits',exponential_data,header=empirical_hdr
于 2016-05-05T20:12:38.307 回答