Skip to content

Commit

Permalink
Raise if catalog for source selection is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
leeskelvin committed May 16, 2024
1 parent 0603fd7 commit 62961ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/lsst/meas/algorithms/sourceSelector.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ def run(self, sourceCat, sourceSelectedField=None, matches=None, exposure=None):
if not sourceCat.isContiguous():
raise RuntimeError("Input catalogs for source selection must be contiguous.")

if len(sourceCat) == 0:
raise RuntimeError("Input catalog for source selection is empty.")

result = self.selectSources(sourceCat=sourceCat,
exposure=exposure,
matches=matches)
Expand Down

0 comments on commit 62961ba

Please sign in to comment.