Skip to content

Commit

Permalink
Merge pull request #607 from lsst/tickets/DM-32682
Browse files Browse the repository at this point in the history
DM-32682: Use metadata[] rather than metadata.set()
  • Loading branch information
timj committed Nov 25, 2021
2 parents 6cddff1 + b05394d commit fb10e10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/lsst/pipe/tasks/registerImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def matchSources(self, inputSources, templateSources):
matches = afwTable.matchRaDec(templateSources, inputSources,
self.config.matchRadius*geom.arcseconds)
self.log.info("Matching within %.1f arcsec: %d matches", self.config.matchRadius, len(matches))
self.metadata.set("MATCH_NUM", len(matches))
self.metadata["MATCH_NUM"] = len(matches)
if len(matches) == 0:
raise RuntimeError("Unable to match source catalogs")
return matches
Expand Down Expand Up @@ -128,9 +128,9 @@ def fitWcs(self, matches, inputWcs, inputBBox):
sipFit = makeCreateWcsWithSip(copyMatches, inputWcs, self.config.sipOrder, inputBBox)
self.log.info("Registration WCS: final WCS RMS=%f pixels from %d matches",
sipFit.getScatterInPixels(), len(copyMatches))
self.metadata.set("SIP_RMS", sipFit.getScatterInPixels())
self.metadata.set("SIP_GOOD", len(copyMatches))
self.metadata.set("SIP_REJECTED", len(matches) - len(copyMatches))
self.metadata["SIP_RMS"] = sipFit.getScatterInPixels()
self.metadata["SIP_GOOD"] = len(copyMatches)
self.metadata["SIP_REJECTED"] = len(matches) - len(copyMatches)
wcs = sipFit.getNewWcs()
return wcs

Expand Down

0 comments on commit fb10e10

Please sign in to comment.