Skip to content

Commit

Permalink
Do not normalize an empty Defects() object.
Browse files Browse the repository at this point in the history
  • Loading branch information
czwa committed Apr 6, 2021
1 parent 88e411d commit f05a3d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/lsst/ip/isr/defects.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ def _normalize(self):
if self._bulk_update:
return

# If we have no defects, there is nothing to normalize.
if len(self) == 0:
return

# work out the minimum and maximum bounds from all defect regions.
minX, minY, maxX, maxY = float('inf'), float('inf'), float('-inf'), float('-inf')
for defect in self:
Expand Down

0 comments on commit f05a3d0

Please sign in to comment.