DES-SL / Y6_Bulk_Coadd_Cutouts

Codebase for large-scale cutout production from DES co-added images on the FNAL cluster
MIT License
0 stars 2 forks source link

Integers #17

Closed rmorgan10 closed 3 years ago

rmorgan10 commented 3 years ago

Starting the integration of functionality to scale pixel values to ints

rmorgan10 commented 3 years ago

Linking issue #16

rmorgan10 commented 3 years ago

@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.

rmorgan10 commented 3 years ago

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()
rmorgan10 commented 3 years ago

Woohoo!