From b05394db8d810cfa026b3e8a52b180eb47d32078 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Tue, 23 Nov 2021 13:44:58 -0700 Subject: [PATCH] Use metadata[] rather than metadata.set() This is more general form. --- python/lsst/pipe/tasks/registerImage.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/lsst/pipe/tasks/registerImage.py b/python/lsst/pipe/tasks/registerImage.py index 896e323bc..5778c5d58 100644 --- a/python/lsst/pipe/tasks/registerImage.py +++ b/python/lsst/pipe/tasks/registerImage.py @@ -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 @@ -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