我必须使名为'exponential.fits'的拟合文件的标题与'empirical.fits'的标题相同。有什么办法可以用writefits.pro吗?
答案 0 :(得分: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