I am using pyfits to open, edit, and save fits images. The saved images will not open into Maxim DL, but they will open into SAO DS9.
So my question is, is there some formatting change the the images are undergoing when i open, and save them and if so what is it?
The code i use to open and save images:
import pyfits
data = pyfits.open("image1.fits")[0].data
hdr = pyfits.open("image1.fits")[0].header
hdu = pyfits.PrimaryHDU(data,hdr)
hdulist = pyfits.HDUList([hdu])
hdulist.writeto("image2.fits")
doing this creates a duplicate of the image with one difference, the image2 won't open into Maxim DL (image1 still does).
i would really appreciate any input anyone might have!!!