Skip to content

Commit b8cb2b7

Browse files
authored
Merge pull request #441 from lsst/tickets/DM-52541
DM-52541: reject diaSources in SPIKE mask regions
2 parents 2bb122c + 08c267d commit b8cb2b7

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

python/lsst/ip/diffim/detectAndMeasure.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,13 @@ class DetectAndMeasureConfig(pipeBase.PipelineTaskConfig,
296296
default=("base_PixelFlags_flag_offimage",
297297
"base_PixelFlags_flag_edge",
298298
"base_PixelFlags_flag_interpolatedCenterAll",
299-
"base_PixelFlags_flag_badCenterAll",
300-
"base_PixelFlags_flag_edgeCenterAll",
301-
"base_PixelFlags_flag_nodataCenterAll",
302-
"base_PixelFlags_flag_saturatedCenterAll",
303-
"base_PixelFlags_flag_saturated_templateCenterAll",
299+
"base_PixelFlags_flag_badCenter",
300+
"base_PixelFlags_flag_edgeCenter",
301+
"base_PixelFlags_flag_nodataCenter",
302+
"base_PixelFlags_flag_saturatedCenter",
303+
"base_PixelFlags_flag_saturated_templateCenter",
304+
"base_PixelFlags_flag_spikeCenter",
305+
"base_PixelFlags_flag_spike_templateCenter",
304306
),
305307
)
306308
clearMaskPlanes = lsst.pex.config.ListField(
@@ -424,9 +426,11 @@ def setDefaults(self):
424426

425427
# Keep track of which footprints contain streaks
426428
self.measurement.plugins["base_PixelFlags"].masksFpAnywhere = [
427-
"STREAK", "INJECTED", "INJECTED_TEMPLATE", "HIGH_VARIANCE", "SATURATED_TEMPLATE"]
429+
"STREAK", "INJECTED", "INJECTED_TEMPLATE", "HIGH_VARIANCE", "SATURATED_TEMPLATE",
430+
"SPIKE", "SPIKE_TEMPLATE"]
428431
self.measurement.plugins["base_PixelFlags"].masksFpCenter = [
429-
"STREAK", "INJECTED", "INJECTED_TEMPLATE", "HIGH_VARIANCE", "SATURATED_TEMPLATE"]
432+
"STREAK", "INJECTED", "INJECTED_TEMPLATE", "HIGH_VARIANCE", "SATURATED_TEMPLATE",
433+
"SPIKE", "SPIKE_TEMPLATE"]
430434
self.skySources.avoidMask = ["DETECTED", "DETECTED_NEGATIVE", "BAD", "NO_DATA", "EDGE"]
431435

432436
def validate(self):

python/lsst/ip/diffim/subtractImages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ class AlardLuptonSubtractBaseConfig(lsst.pex.config.Config):
284284
)
285285
renameTemplateMask = lsst.pex.config.ListField(
286286
dtype=str,
287-
default=("SAT", "INJECTED", "INJECTED_CORE",),
287+
default=("SAT", "INJECTED", "INJECTED_CORE", "SPIKE"),
288288
doc="Mask planes from the template to propagate to the image difference"
289289
"with '_TEMPLATE' appended to the name."
290290
)

0 commit comments

Comments
 (0)