Created
September 13, 2017 15:32
-
-
Save astrofrog/5aedd7bf64b17e262419092d5adfb107 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from astropy.io import fits | |
hdulist = fits.open('JWST-NIRSpec-IFU-GAL2136_CLEAR_PRISM.fits') | |
for ihdu in [1, 2, 3]: | |
hdulist[ihdu].header['CTYPE1'] = 'RA---TAN' | |
hdulist[ihdu].header['CTYPE2'] = 'DEC--TAN' | |
hdulist[ihdu].header['CTYPE3'] = 'WAVE' | |
hdulist[ihdu].header['CRVAL1'] = 10.2 | |
hdulist[ihdu].header['CRVAL2'] = 33.1 | |
hdulist[ihdu].header['CDELT1'] = -0.05 / 3600. | |
hdulist[ihdu].header['CDELT2'] = 0.05 / 3600. | |
del hdulist[ihdu].header['BUNIT'] | |
hdulist.writeto('JWST-NIRSpec-IFU-GAL2136_CLEAR_PRISM_patched.fits', overwrite=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment