diff --git a/include/lsst/ip/diffim/BuildSingleKernelVisitor.h b/include/lsst/ip/diffim/BuildSingleKernelVisitor.h index 7347c2e3e..549b737ed 100644 --- a/include/lsst/ip/diffim/BuildSingleKernelVisitor.h +++ b/include/lsst/ip/diffim/BuildSingleKernelVisitor.h @@ -56,6 +56,12 @@ namespace detail { int getNProcessed() {return _nProcessed;} void reset() {_nRejected = 0; _nProcessed = 0;} + std::shared_ptr getPropertySet() { return _ps; } + bool getSkipBuilt() { return _skipBuilt; } + bool getUseRegularization() { return _useRegularization; } + bool getUseCoreStats() { return _useCoreStats; } + int getCoreRadius() { return _coreRadius; } + void processCandidate(lsst::afw::math::SpatialCellCandidate *candidate); private: diff --git a/python/lsst/ip/diffim/detail/buildSingleKernelVisitor.cc b/python/lsst/ip/diffim/detail/buildSingleKernelVisitor.cc index f84cffa9e..0cbb23c94 100644 --- a/python/lsst/ip/diffim/detail/buildSingleKernelVisitor.cc +++ b/python/lsst/ip/diffim/detail/buildSingleKernelVisitor.cc @@ -69,6 +69,13 @@ void declareBuildSingleKernelVisitor(lsst::cpputils::python::WrapperCollection & cls.def("getNProcessed", &BuildSingleKernelVisitor::getNProcessed); cls.def("reset", &BuildSingleKernelVisitor::reset); cls.def("processCandidate", &BuildSingleKernelVisitor::processCandidate, "candidate"_a); + cls.def_property_readonly("nRejected", &BuildSingleKernelVisitor::getNRejected); + cls.def_property_readonly("nProcessed", &BuildSingleKernelVisitor::getNProcessed); + cls.def_property_readonly("useRegularization", &BuildSingleKernelVisitor::getUseRegularization); + cls.def_property_readonly("skipBuilt", &BuildSingleKernelVisitor::getSkipBuilt); + cls.def_property_readonly("useCoreStats", &BuildSingleKernelVisitor::getUseCoreStats); + cls.def_property_readonly("coreRadius", &BuildSingleKernelVisitor::getCoreRadius); + cls.def_property_readonly("propertySet", &BuildSingleKernelVisitor::getPropertySet); mod.def("makeBuildSingleKernelVisitor", (std::shared_ptr>(*)(afw::math::KernelList const &, diff --git a/python/lsst/ip/diffim/makeKernel.py b/python/lsst/ip/diffim/makeKernel.py index 46dc47c65..77c9e42b7 100644 --- a/python/lsst/ip/diffim/makeKernel.py +++ b/python/lsst/ip/diffim/makeKernel.py @@ -94,8 +94,7 @@ class MakeKernelTask(PsfMatchTask): _DefaultName = "makeALKernel" def __init__(self, *args, **kwargs): - PsfMatchTask.__init__(self, *args, **kwargs) - self.kConfig = self.config.kernel.active + super().__init__(*args, **kwargs) # the background subtraction task uses a config from an unusual location, # so cannot easily be constructed with makeSubtask self.background = SubtractBackgroundTask(config=self.kConfig.afwBackgroundConfig, name="background", diff --git a/python/lsst/ip/diffim/psfMatch.py b/python/lsst/ip/diffim/psfMatch.py index c56a18021..90baa40d6 100644 --- a/python/lsst/ip/diffim/psfMatch.py +++ b/python/lsst/ip/diffim/psfMatch.py @@ -455,6 +455,12 @@ class PsfMatchTask(pipeBase.Task, abc.ABC): also performs background matching and returns the differential background model as an `lsst.afw.math.Kernel.SpatialFunction`. + The initialization sets the Psf-matching kernel configuration using the + value of self.config.kernel.active. If the kernel is requested with + regularization to moderate the bias/variance tradeoff, currently only used + when a delta function kernel basis is provided, it creates a + regularization matrix stored as member variable self.hMat. + **Invoking the Task** As a base class, this Task is not directly invoked. However, ``run()`` methods that are @@ -549,23 +555,6 @@ def DebugInfo(name): _DefaultName = "psfMatch" def __init__(self, *args, **kwargs): - """Create the psf-matching Task - - Parameters - ---------- - *args - Arguments to be passed to ``lsst.pipe.base.task.Task.__init__`` - **kwargs - Keyword arguments to be passed to ``lsst.pipe.base.task.Task.__init__`` - - Notes - ----- - The initialization sets the Psf-matching kernel configuration using the value of - self.config.kernel.active. If the kernel is requested with regularization to moderate - the bias/variance tradeoff, currently only used when a delta function kernel basis - is provided, it creates a regularization matrix stored as member variable - self.hMat. - """ pipeBase.Task.__init__(self, *args, **kwargs) self.kConfig = self.config.kernel.active