askap-vast / vast-tools

A collection of tools that are useful for the VAST project and for exploration of results from the VAST Pipeline.
https://vast-survey.org/vast-tools/
MIT License
8 stars 0 forks source link

_gen_all_source products breaks when images shared between sources #442

Closed ddobie closed 1 year ago

ddobie commented 1 year ago

Currently the code does not precisely check whether a source lies in the actual footprint of an image - we only check whether the source is within some distance of a beam (currently 1.5 deg) and assume that if that is the case, then it is within the image.

Creating a fits cutout that uses coordinates outside of an image throws an astropy.nddata.utils.NoOverlapError. We currently get around this by wrapping the cutout dataframe generation (inside Query._grouped_fetch_cutouts) in a try/except statement. However, this means that if multiple sources are associated with an image, but one is not inside the image footprint (and therefore throws a NoOverlapError rows in the cutout_df are not generated for all sources associated with that image.

ddobie commented 1 year ago

This problem seems to go back to December 2020 (https://github.com/askap-vast/vast-tools/commit/8d1d876b4313039bf4ffbd1870f77c65ed694e0d), so I am absolutely flabbergasted that nobody has run into it previously