From 8898b834952a4070c75fe07cd6799742f0b1b572 Mon Sep 17 00:00:00 2001 From: John Parejko Date: Wed, 9 Nov 2022 21:50:27 -0800 Subject: [PATCH 1/2] Deprecate deblend configs in characterize This config just causes problems (e.g. the old deblender doesn't make the catalog contiguous) and we'll never want to run it here anyway. --- python/lsst/pipe/tasks/characterizeImage.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/python/lsst/pipe/tasks/characterizeImage.py b/python/lsst/pipe/tasks/characterizeImage.py index 049d9b3fe..01d01891d 100644 --- a/python/lsst/pipe/tasks/characterizeImage.py +++ b/python/lsst/pipe/tasks/characterizeImage.py @@ -131,12 +131,14 @@ class CharacterizeImageConfig(pipeBase.PipelineTaskConfig, ) doDeblend = pexConfig.Field( dtype=bool, - default=True, - doc="Run deblender input exposure" + default=False, + doc="Run deblender input exposure", + deprecated="This field is no longer used and will be removed after v25." ) deblend = pexConfig.ConfigurableField( target=SourceDeblendTask, - doc="Split blended source into their components" + doc="Split blended source into their components", + deprecated="This field is no longer used and will be removed after v25." ) measurement = pexConfig.ConfigurableField( target=SingleFrameMeasurementTask, @@ -223,8 +225,6 @@ def setDefaults(self): self.detection.thresholdValue = 5.0 self.detection.includeThresholdMultiplier = 10.0 self.detection.doTempLocalBackground = False - # do not deblend, as it makes a mess - self.doDeblend = False # measure and apply aperture correction; note: measuring and applying aperture # correction are disabled until the final measurement, after PSF is measured self.doApCorr = True @@ -314,8 +314,6 @@ def __init__(self, butler=None, refObjLoader=None, schema=None, **kwargs): self.makeSubtask("ref_match", refObjLoader=refObjLoader) self.algMetadata = dafBase.PropertyList() self.makeSubtask('detection', schema=self.schema) - if self.config.doDeblend: - self.makeSubtask("deblend", schema=self.schema) self.makeSubtask('measurement', schema=self.schema, algMetadata=self.algMetadata) if self.config.doApCorr: self.makeSubtask('measureApCorr', schema=self.schema) @@ -509,9 +507,6 @@ def detectMeasureAndEstimatePsf(self, exposure, exposureIdInfo, background): for bg in detRes.fpSets.background: background.append(bg) - if self.config.doDeblend: - self.deblend.run(exposure=exposure, sources=sourceCat) - self.measurement.run(measCat=sourceCat, exposure=exposure, exposureId=exposureIdInfo.expId) measPsfRes = pipeBase.Struct(cellSet=None) From 4877ade7b7f86d66a2f841bec729561f58a75cbf Mon Sep 17 00:00:00 2001 From: John Parejko Date: Wed, 9 Nov 2022 21:52:41 -0800 Subject: [PATCH 2/2] Cleanup doApCorr in characterize The default setting was already True; move comment about aperture correction timing into docstring for the field. --- python/lsst/pipe/tasks/characterizeImage.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/python/lsst/pipe/tasks/characterizeImage.py b/python/lsst/pipe/tasks/characterizeImage.py index 01d01891d..85f5ac45a 100644 --- a/python/lsst/pipe/tasks/characterizeImage.py +++ b/python/lsst/pipe/tasks/characterizeImage.py @@ -147,7 +147,9 @@ class CharacterizeImageConfig(pipeBase.PipelineTaskConfig, doApCorr = pexConfig.Field( dtype=bool, default=True, - doc="Run subtasks to measure and apply aperture corrections" + doc="Run subtasks to measure and apply aperture corrections. " + "Note: measuring and applying aperture correction are disabled until " + "the final measurement, after the PSF is measured." ) measureApCorr = pexConfig.ConfigurableField( target=MeasureApCorrTask, @@ -225,9 +227,6 @@ def setDefaults(self): self.detection.thresholdValue = 5.0 self.detection.includeThresholdMultiplier = 10.0 self.detection.doTempLocalBackground = False - # measure and apply aperture correction; note: measuring and applying aperture - # correction are disabled until the final measurement, after PSF is measured - self.doApCorr = True # minimal set of measurements needed to determine PSF self.measurement.plugins.names = [ "base_PixelFlags",