askap-vast / vast-pipeline

This repository holds the code of the Radio Transient detection pipeline for the VAST project.
https://vast-survey.org/vast-pipeline/
MIT License
7 stars 3 forks source link

Enable use of .fits.fz files #693

Closed ddobie closed 6 months ago

ddobie commented 11 months ago

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.