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

Casting to integers #16

Closed rmorgan10 closed 3 years ago

rmorgan10 commented 3 years ago

To save disk space, we'll cast the pixel values to 16-bit integers instead of 64-bit floats. The casting will involve scaling the pixel values for both the IMAGE and PSF arrays to between 0 and 65535 and rounding to the nearest integer.

The current plan is to scale each image individually to set the min = 0 and the max = 65535. To preserve the original pixel values, the previous max and min will be stored as 64-bit floats in an additional HDU in case a user wants to reconstruct (a slightly rounded version) of the original pixel values.

Therefore, we store a 16-bit integer for each pixel + 2 64-bit floats for each image, which is a factor of 3.999 improvement in disk space for 45x45 cutouts and 3.997 for 25x25 PSF cutouts.