def _update_hdr_wcs(self, hdr, wcs_hdr):
"""Update a header with WCS parameters
:param hdr: A pyfits.Header() instance
:param wcs_header: A pyfits.Header() instance containing the
new WCS parameters.
"""
hdr.extend(wcs_hdr, strip=True,
update=True, end=True)
# delete unused keywords created by pywcs
if 'RESTFRQ' in hdr:
del hdr['RESTFRQ']
if 'RESTWAV' in hdr:
del hdr['RESTWAV']
if 'LONPOLE' in hdr:
del hdr['LONPOLE']
if 'LATPOLE' in hdr:
del hdr['LATPOLE']
return hdr
评论列表
文章目录