Skip to content

Commit

Permalink
Move matchMeta to just before return
Browse files Browse the repository at this point in the history
It is not used elsewhere, so no need for it until we're done.
  • Loading branch information
parejkoj committed Apr 19, 2024
1 parent 660ecfa commit de20ba4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions python/lsst/meas/astrom/astrometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,6 @@ def solve(self, exposure, sourceCat):

refSelection = self.referenceSelector.run(loadResult.refCat)

matchMeta = self.refObjLoader.getMetadataBox(
bbox=exposure.getBBox(),
wcs=exposure.wcs,
filterName=exposure.filter.bandLabel,
epoch=epoch,
)

if debug.display:
frame = int(debug.frame)
displayAstrometry(
Expand Down Expand Up @@ -346,6 +339,13 @@ def solve(self, exposure, sourceCat):
md['SFM_ASTROM_OFFSET_MEAN'] = result.stats.distMean.asArcseconds()
md['SFM_ASTROM_OFFSET_STD'] = result.stats.distStdDev.asArcseconds()

matchMeta = self.refObjLoader.getMetadataBox(
bbox=exposure.getBBox(),
wcs=exposure.wcs,
filterName=exposure.filter.bandLabel,
epoch=epoch,
)

return pipeBase.Struct(
refCat=refSelection.sourceCat,
matches=result.matches,
Expand Down Expand Up @@ -376,7 +376,7 @@ def _matchAndFitWcs(self, refCat, sourceCat, goodSourceCat, refFluxField, bbox,
a MatchTolerance object (or None) specifying
internal tolerances to the matcher. See the MatchTolerance
definition in the respective matcher for the class definition.
exposure : `lsst.afw.image.Exposure`
exposure : `lsst.afw.image.Exposure`, optional
exposure whose WCS is to be fit, or None; used only for the debug
display.
Expand Down

0 comments on commit de20ba4

Please sign in to comment.