From 8192824ecb9965cd8afd465757da9eb9c343451e Mon Sep 17 00:00:00 2001 From: John Parejko Date: Thu, 14 Nov 2024 12:26:06 -0800 Subject: [PATCH] Use nodata flags, separate from edge --- python/lsst/meas/algorithms/measureApCorr.py | 1 + python/lsst/meas/algorithms/objectSizeStarSelector.py | 1 + python/lsst/meas/algorithms/sourceSelector.py | 3 ++- tests/test_measureApCorr.py | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/python/lsst/meas/algorithms/measureApCorr.py b/python/lsst/meas/algorithms/measureApCorr.py index efb76fc05..dce2dba7e 100644 --- a/python/lsst/meas/algorithms/measureApCorr.py +++ b/python/lsst/meas/algorithms/measureApCorr.py @@ -161,6 +161,7 @@ def setDefaults(self): selector.flags.good = [] selector.flags.bad = [ "base_PixelFlags_flag_edge", + "base_PixelFlags_flag_nodata", "base_PixelFlags_flag_interpolatedCenter", "base_PixelFlags_flag_saturatedCenter", "base_PixelFlags_flag_crCenter", diff --git a/python/lsst/meas/algorithms/objectSizeStarSelector.py b/python/lsst/meas/algorithms/objectSizeStarSelector.py index 65e61713f..02fd18321 100644 --- a/python/lsst/meas/algorithms/objectSizeStarSelector.py +++ b/python/lsst/meas/algorithms/objectSizeStarSelector.py @@ -115,6 +115,7 @@ class ObjectSizeStarSelectorConfig(BaseSourceSelectorTask.ConfigClass): dtype=str, default=[ "base_PixelFlags_flag_edge", + "base_PixelFlags_flag_nodata", "base_PixelFlags_flag_interpolatedCenter", "base_PixelFlags_flag_saturatedCenter", "base_PixelFlags_flag_crCenter", diff --git a/python/lsst/meas/algorithms/sourceSelector.py b/python/lsst/meas/algorithms/sourceSelector.py index daa5c1236..c02b4071e 100644 --- a/python/lsst/meas/algorithms/sourceSelector.py +++ b/python/lsst/meas/algorithms/sourceSelector.py @@ -588,7 +588,8 @@ class ScienceSourceSelectorConfig(pexConfig.Config): def setDefaults(self): pexConfig.Config.setDefaults(self) - self.flags.bad = ["base_PixelFlags_flag_edge", "base_PixelFlags_flag_saturated", "base_PsfFlux_flag"] + self.flags.bad = ["base_PixelFlags_flag_edge", "base_PixelFlags_flag_nodata", + "base_PixelFlags_flag_saturated", "base_PsfFlux_flag"] self.signalToNoise.fluxField = "base_PsfFlux_instFlux" self.signalToNoise.errField = "base_PsfFlux_instFluxErr" self.skyFlag.good = ["sky_source"] diff --git a/tests/test_measureApCorr.py b/tests/test_measureApCorr.py index 8617b53fa..020f77ebe 100755 --- a/tests/test_measureApCorr.py +++ b/tests/test_measureApCorr.py @@ -97,6 +97,7 @@ def setUp(self): schema.addField("deblend_nChild", type=np.int32) for flag in [ "base_PixelFlags_flag_edge", + "base_PixelFlags_flag_nodata", "base_PixelFlags_flag_interpolatedCenter", "base_PixelFlags_flag_saturatedCenter", "base_PixelFlags_flag_crCenter",