Closed rmorgan10 closed 3 years ago
Linking issue #16
@erikzaborowski here is a work in progress version. So far this is just the function to do the scaling. I am now working on applying it to the image and psf data and packaging up the results.
Let me know here if you have any comments, but otherwise I'll add you as a reviewer when I've finished implementing this feature.
The resulting output file now looks like this:
>>> hdu = fits.open("testtile.fits")
>>> hdu.info()
Filename: testtile.fits
No. Name Ver Type Cards Dimensions Format
0 PRIMARY 1 PrimaryHDU 4 ()
1 CUTOUT_ID 1 BinTableHDU 11 10R x 1C [J]
2 IMAGE 1 ImageHDU 12 (45, 45, 5, 10) int16 (rescales to uint16)
3 PSF 1 ImageHDU 13 (25, 25, 5, 10) int16 (rescales to uint16)
4 IMG_MIN 1 ImageHDU 8 (5, 10) float64
5 IMG_SCALE 1 ImageHDU 8 (5, 10) float64
6 PSF_MIN 1 ImageHDU 8 (5, 10) float64
7 PSF_SCALE 1 ImageHDU 8 (5, 10) float64
>>> hdu.close()
Woohoo!
Starting the integration of functionality to scale pixel values to ints