From d86ce426cc8112487dd54487f6debc6906063e2f Mon Sep 17 00:00:00 2001 From: Lee Kelvin Date: Thu, 16 May 2024 14:49:01 -0700 Subject: [PATCH] Raise if catalog for source selection is empty --- python/lsst/meas/algorithms/objectSizeStarSelector.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/lsst/meas/algorithms/objectSizeStarSelector.py b/python/lsst/meas/algorithms/objectSizeStarSelector.py index 7fbc756b4..65e61713f 100644 --- a/python/lsst/meas/algorithms/objectSizeStarSelector.py +++ b/python/lsst/meas/algorithms/objectSizeStarSelector.py @@ -352,6 +352,9 @@ def selectSources(self, sourceCat, matches=None, exposure=None): Boolean array of sources that were selected, same length as sourceCat. (`numpy.ndarray` of `bool`) """ + if len(sourceCat) == 0: + raise RuntimeError("Input catalog for source selection is empty.") + import lsstDebug display = lsstDebug.Info(__name__).display displayExposure = lsstDebug.Info(__name__).displayExposure # display the Exposure + spatialCells