Skip to content

Commit

Permalink
Add nodata flag, after split from edge
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj committed Nov 14, 2024
1 parent da3e153 commit b2ea727
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/lsst/meas/astrom/ref_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def setDefaults(self):
self.sourceSelector["science"].signalToNoise.errField = f"slot_{self.sourceFluxType}Flux_instFluxErr"
self.sourceSelector["science"].doFlags = True
self.sourceSelector["science"].flags.bad = ["base_PixelFlags_flag_edge",
"base_PixelFlags_flag_nodata",
"base_PixelFlags_flag_interpolatedCenter",
"base_PixelFlags_flag_saturated",
"base_SdssCentroid_flag",
Expand Down
6 changes: 6 additions & 0 deletions tests/test_matchPessimisticB.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ def singleTestInstance(self, filename, distortFunc, doPlot=False):

# Apply source selector to sourceCat, using the astrometry config defaults
tempConfig = measAstrom.AstrometryTask.ConfigClass()
# This field isn't in the old test catalog.
tempConfig.sourceSelector["science"].flags.bad.remove("base_PixelFlags_flag_nodata")
tempSolver = measAstrom.AstrometryTask(config=tempConfig, refObjLoader=None)
sourceSelection = tempSolver.sourceSelector.run(sourceCat)

Expand Down Expand Up @@ -172,6 +174,8 @@ def testPassingMatcherState(self):

# Apply source selector to sourceCat, using the astrometry config defaults
tempConfig = measAstrom.AstrometryTask.ConfigClass()
# This field isn't in the old test catalog.
tempConfig.sourceSelector["science"].flags.bad.remove("base_PixelFlags_flag_nodata")
tempSolver = measAstrom.AstrometryTask(config=tempConfig, refObjLoader=None)
sourceSelection = tempSolver.sourceSelector.run(sourceCat)

Expand Down Expand Up @@ -225,6 +229,8 @@ def testReferenceFilter(self):

# Apply source selector to sourceCat, using the astrometry config defaults
tempConfig = measAstrom.AstrometryTask.ConfigClass()
# This field isn't in the old test catalog.
tempConfig.sourceSelector["science"].flags.bad.remove("base_PixelFlags_flag_nodata")
tempSolver = measAstrom.AstrometryTask(config=tempConfig, refObjLoader=None)
sourceSelection = tempSolver.sourceSelector.run(sourceCat)

Expand Down

0 comments on commit b2ea727

Please sign in to comment.