Commit 557baafb authored by Zhang Xin's avatar Zhang Xin
Browse files

fix header checksum issue; update straylight mode PSF file

parent b9ccff14
This diff is collapsed.
...@@ -82,17 +82,16 @@ def quantization_and_output(self, chip, filt, tel, pointing, catalog, obs_param) ...@@ -82,17 +82,16 @@ def quantization_and_output(self, chip, filt, tel, pointing, catalog, obs_param)
hdu1 = fits.PrimaryHDU(header=self.h_prim) hdu1 = fits.PrimaryHDU(header=self.h_prim)
hdu1.add_checksum()
hdu1.header.comments['CHECKSUM'] = 'HDU checksum' self.updateHeaderInfo(header_flag='ext', keys = ['DATASECT'], values = [str(chip.img.array.shape[1]) + 'x' + str(chip.img.array.shape[0])])
hdu1.header.comments['DATASUM'] = 'data unit checksum'
self.updateHeaderInfo(header_flag='ext', keys = ['DATASECT'], values = [str(chip.img.array.shape[1])+'x'+str(chip.img.array.shape[0])])
hdu2 = fits.ImageHDU(chip.img.array, header=self.h_ext) hdu2 = fits.ImageHDU(chip.img.array, header=self.h_ext)
hdu2.add_checksum()
hdu2.header.comments['XTENSION'] = 'extension type'
hdu2.header.comments['CHECKSUM'] = 'HDU checksum'
hdu2.header.comments['DATASUM'] = 'data unit checksum'
hdu2.header.comments["XTENSION"] = "image extension" hdu2.header.comments["XTENSION"] = "image extension"
hdu1 = fits.HDUList([hdu1, hdu2])
hdu1.writeto(fname, output_verify='ignore', overwrite=True) hdu = fits.HDUList([hdu1, hdu2])
hdu[0].add_datasum(when='data unit checksum')
hdu[0].add_checksum(when='HDU checksum', override_datasum=True)
hdu[1].add_datasum(when='data unit checksum')
hdu[1].add_checksum(when='HDU checksum', override_datasum=True)
hdu.writeto(fname, output_verify='ignore', overwrite=True)
return chip, filt, tel, pointing return chip, filt, tel, pointing
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment