From 846aeded255bac69ba5bf8659d711d7eb2fb0262 Mon Sep 17 00:00:00 2001 From: Ian Sullivan Date: Fri, 10 Oct 2025 17:45:59 -0700 Subject: [PATCH 1/2] Reject diaSource on diffraction spikes of bright stars --- python/lsst/ip/diffim/detectAndMeasure.py | 8 ++++++-- python/lsst/ip/diffim/subtractImages.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/python/lsst/ip/diffim/detectAndMeasure.py b/python/lsst/ip/diffim/detectAndMeasure.py index 8b7184568..fb4c1305a 100644 --- a/python/lsst/ip/diffim/detectAndMeasure.py +++ b/python/lsst/ip/diffim/detectAndMeasure.py @@ -301,6 +301,8 @@ class DetectAndMeasureConfig(pipeBase.PipelineTaskConfig, "base_PixelFlags_flag_nodataCenterAll", "base_PixelFlags_flag_saturatedCenterAll", "base_PixelFlags_flag_saturated_templateCenterAll", + "base_PixelFlags_flag_spikeCenter", + "base_PixelFlags_flag_spike_templateCenter", ), ) clearMaskPlanes = lsst.pex.config.ListField( @@ -424,9 +426,11 @@ def setDefaults(self): # Keep track of which footprints contain streaks self.measurement.plugins["base_PixelFlags"].masksFpAnywhere = [ - "STREAK", "INJECTED", "INJECTED_TEMPLATE", "HIGH_VARIANCE", "SATURATED_TEMPLATE"] + "STREAK", "INJECTED", "INJECTED_TEMPLATE", "HIGH_VARIANCE", "SATURATED_TEMPLATE", + "SPIKE", "SPIKE_TEMPLATE"] self.measurement.plugins["base_PixelFlags"].masksFpCenter = [ - "STREAK", "INJECTED", "INJECTED_TEMPLATE", "HIGH_VARIANCE", "SATURATED_TEMPLATE"] + "STREAK", "INJECTED", "INJECTED_TEMPLATE", "HIGH_VARIANCE", "SATURATED_TEMPLATE", + "SPIKE", "SPIKE_TEMPLATE"] self.skySources.avoidMask = ["DETECTED", "DETECTED_NEGATIVE", "BAD", "NO_DATA", "EDGE"] def validate(self): diff --git a/python/lsst/ip/diffim/subtractImages.py b/python/lsst/ip/diffim/subtractImages.py index 073bb78c6..bae98b493 100644 --- a/python/lsst/ip/diffim/subtractImages.py +++ b/python/lsst/ip/diffim/subtractImages.py @@ -284,7 +284,7 @@ class AlardLuptonSubtractBaseConfig(lsst.pex.config.Config): ) renameTemplateMask = lsst.pex.config.ListField( dtype=str, - default=("SAT", "INJECTED", "INJECTED_CORE",), + default=("SAT", "INJECTED", "INJECTED_CORE", "SPIKE"), doc="Mask planes from the template to propagate to the image difference" "with '_TEMPLATE' appended to the name." ) From 08c267df85cff0a510ab8b152c9880c6d28f5d48 Mon Sep 17 00:00:00 2001 From: Ian Sullivan Date: Thu, 23 Oct 2025 11:58:44 -0700 Subject: [PATCH 2/2] Reject diaSources with saturated pixels anywhere in their core --- python/lsst/ip/diffim/detectAndMeasure.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python/lsst/ip/diffim/detectAndMeasure.py b/python/lsst/ip/diffim/detectAndMeasure.py index fb4c1305a..9e4206c86 100644 --- a/python/lsst/ip/diffim/detectAndMeasure.py +++ b/python/lsst/ip/diffim/detectAndMeasure.py @@ -296,11 +296,11 @@ class DetectAndMeasureConfig(pipeBase.PipelineTaskConfig, default=("base_PixelFlags_flag_offimage", "base_PixelFlags_flag_edge", "base_PixelFlags_flag_interpolatedCenterAll", - "base_PixelFlags_flag_badCenterAll", - "base_PixelFlags_flag_edgeCenterAll", - "base_PixelFlags_flag_nodataCenterAll", - "base_PixelFlags_flag_saturatedCenterAll", - "base_PixelFlags_flag_saturated_templateCenterAll", + "base_PixelFlags_flag_badCenter", + "base_PixelFlags_flag_edgeCenter", + "base_PixelFlags_flag_nodataCenter", + "base_PixelFlags_flag_saturatedCenter", + "base_PixelFlags_flag_saturated_templateCenter", "base_PixelFlags_flag_spikeCenter", "base_PixelFlags_flag_spike_templateCenter", ),