Opening a .fits.fz file in astropy results in a two-element HDUList with the first element being a small header card with information about the compression. The pipeline has multiple functions where there is a fits.open(filename)[0] hardcoded, while the ForcedPhot package has similar.
I propose a new utils function open_fits that can correctly handle both compressed and uncompressed HDU files.
I also propose changing the handling of forced photometry such that we initialise the ForcedPhot objects with HDULists rather than paths to fits files.
Opening a
.fits.fz
file in astropy results in a two-element HDUList with the first element being a small header card with information about the compression. The pipeline has multiple functions where there is afits.open(filename)[0]
hardcoded, while theForcedPhot
package has similar.I propose a new utils function
open_fits
that can correctly handle both compressed and uncompressed HDU files.I also propose changing the handling of forced photometry such that we initialise the
ForcedPhot
objects with HDULists rather than paths to fits files.