Skip to content

Commit

Permalink
Merge pull request #185 from lsst/tickets/DM-39796
Browse files Browse the repository at this point in the history
DM-39796: Update task config defaults to LSST values
  • Loading branch information
parejkoj committed Sep 21, 2023
2 parents f36cf20 + 29fd858 commit 0d499ea
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/lsst/meas/astrom/matchOptimisticB.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct MatchOptimisticBControl {
MatchOptimisticBControl()
: refFluxField("r_flux"),
sourceFluxField("slot_ApFlux_instFlux"),
numBrightStars(100),
numBrightStars(150),
minMatchedPairs(50),
matchingAllowancePix(10.0),
maxOffsetPix(300),
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/meas/astrom/astrometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class AstrometryConfig(RefMatchConfig):
dtype=bool,
doc=("If True then a rough zeropoint will be computed from matched sources "
"and outliers will be rejected in the iterations."),
default=False,
default=True,
)
magnitudeOutlierRejectionNSigma = pexConfig.Field(
dtype=float,
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/meas/astrom/fitTanSipWcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def fitWcs(self, matches, initWcs, bbox=None, refCat=None, sourceCat=None, expos
if rejected.sum() == len(rejected):
raise RuntimeError("All matches rejected in iteration %d" % (rej + 1,))
self.log.debug(
"Iteration %d of astrometry fitting: rejected %f outliers, out of %d total matches.",
"Iteration %d of astrometry fitting: rejected %d outliers, out of %d total matches.",
rej, rejected.sum(), len(rejected)
)
if debug.plot:
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/meas/astrom/matchOptimisticBTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class MatchOptimisticBConfig(pexConfig.Config):
min=0,
)
numBrightStars = pexConfig.RangeField(
doc="Number of bright stars to use",
doc="Maximum number of bright stars to use in fit.",
dtype=int,
default=50,
default=150,
min=2,
)
minMatchedPairs = pexConfig.RangeField(
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/meas/astrom/matchPessimisticB.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ class MatchPessimisticBConfig(pexConfig.Config):
"""Configuration for MatchPessimisticBTask
"""
numBrightStars = pexConfig.RangeField(
doc="Number of bright stars to use. Sets the max number of patterns "
doc="Maximum number of bright stars to use. Sets the max number of patterns "
"that can be tested.",
dtype=int,
default=200,
default=150,
min=2,
)
minMatchedPairs = pexConfig.RangeField(
Expand Down
2 changes: 2 additions & 0 deletions tests/test_astrometryTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ def doTest(self, pixelsToTanPixels, order=3):
config = AstrometryTask.ConfigClass()
config.wcsFitter.order = order
config.wcsFitter.numRejIter = 0
# This test is from before rough magnitude rejection was implemented.
config.doMagnitudeOutlierRejection = False
solver = AstrometryTask(config=config, refObjLoader=self.refObjLoader)
results = solver.run(
sourceCat=sourceCat,
Expand Down

0 comments on commit 0d499ea

Please sign in to comment.