Skip to content

Commit

Permalink
Do not include bands with no data in merge measurements
Browse files Browse the repository at this point in the history
  • Loading branch information
fred3m authored and Matthias Wittgen committed Oct 15, 2023
1 parent 3250fcc commit b5bc03e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions python/lsst/pipe/tasks/mergeMeasurements.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,13 @@ def run(self, catalogs):
if hasPseudoFilter:
break

isBad = any(inputRecord.get(flag) for flag in self.badFlags)
if isBad or inputRecord.get(self.fluxFlagKey) or inputRecord.get(self.instFluxErrKey) == 0:
isBad = (
any(inputRecord.get(flag) for flag in self.badFlags)
or inputRecord["deblend_dataCoverage"] == 0
or inputRecord.get(self.fluxFlagKey)
or inputRecord.get(self.instFluxErrKey) == 0
)
if isBad:
sn = 0.
else:
sn = inputRecord.get(self.instFluxKey)/inputRecord.get(self.instFluxErrKey)
Expand Down

0 comments on commit b5bc03e

Please sign in to comment.