From cff96dd44cbbc40743f573bdc2b85f75bc4c867f Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Thu, 31 Oct 2024 10:58:57 -0700 Subject: [PATCH] do it everywhere --- metadetect/lsst/measure.py | 3 +++ metadetect/lsst/skysub.py | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/metadetect/lsst/measure.py b/metadetect/lsst/measure.py index 586b2414..8d59a085 100644 --- a/metadetect/lsst/measure.py +++ b/metadetect/lsst/measure.py @@ -46,6 +46,9 @@ def thresh(self, value): self.thresholdValue = value +SourceDetectionTask.ConfigClass = SourceDetectionConfig + + class DetectAndDeblendConfig(Config): meas = ConfigurableField[SingleFrameMeasurementConfig]( doc="Measurement config", diff --git a/metadetect/lsst/skysub.py b/metadetect/lsst/skysub.py index eb738b70..05df3e56 100644 --- a/metadetect/lsst/skysub.py +++ b/metadetect/lsst/skysub.py @@ -3,8 +3,8 @@ SubtractBackgroundTask, SubtractBackgroundConfig, SourceDetectionTask, - SourceDetectionConfig, ) +from lsst.meas.algorithms import SourceDetectionConfig as OriginalSourceDetectionConfig from lsst.pex.config import Config, ConfigurableField, Field from lsst.pipe.base import Task @@ -13,6 +13,19 @@ from . import util +class SourceDetectionConfig(OriginalSourceDetectionConfig): + @property + def thresholdValue(self): + return self.thresholdValue + + @thresholdValue.setter + def thresholdValue(self, value): + self.thresholdValue = value + + +SourceDetectionTask.ConfigClass = SourceDetectionConfig + + class IterateDetectionSkySubConfig(Config): niter = Field[int]( doc="Number of iterations",