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 18, 2023
1 parent 714d807 commit 4d81e82
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 @@ -330,8 +330,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 4d81e82

Please sign in to comment.