diff --git a/python/lsst/ip/diffim/detail/assessSpatialKernelVisitor.cc b/python/lsst/ip/diffim/detail/assessSpatialKernelVisitor.cc index 6a35df829..c3e34e5bc 100644 --- a/python/lsst/ip/diffim/detail/assessSpatialKernelVisitor.cc +++ b/python/lsst/ip/diffim/detail/assessSpatialKernelVisitor.cc @@ -47,12 +47,11 @@ namespace { */ template void declareAssessSpatialKernelVisitor(lsst::cpputils::python::WrapperCollection &wrappers, std::string const& suffix) { - using PyCLass = py::class_, std::shared_ptr>, - lsst::afw::math::CandidateVisitor>; + using PyClass = py::classh, lsst::afw::math::CandidateVisitor>; std::string name = "AssessSpatialKernelVisitor" + suffix; - wrappers.wrapType(PyCLass(wrappers.module, name.c_str()), [](auto &mod, auto &cls) { + wrappers.wrapType(PyClass(wrappers.module, name.c_str()), [](auto &mod, auto &cls) { cls.def(py::init, afw::math::Kernel::SpatialFunctionPtr, daf::base::PropertySet const &>(), "spatialKernel"_a, "spatialBackground"_a, "ps"_a); diff --git a/python/lsst/ip/diffim/detail/buildSingleKernelVisitor.cc b/python/lsst/ip/diffim/detail/buildSingleKernelVisitor.cc index 0cbb23c94..e4d687d9f 100644 --- a/python/lsst/ip/diffim/detail/buildSingleKernelVisitor.cc +++ b/python/lsst/ip/diffim/detail/buildSingleKernelVisitor.cc @@ -54,8 +54,7 @@ namespace { */ template void declareBuildSingleKernelVisitor(lsst::cpputils::python::WrapperCollection &wrappers, std::string const& suffix) { - using PyClass = py::class_, std::shared_ptr>, - afw::math::CandidateVisitor>; + using PyClass = py::classh, afw::math::CandidateVisitor>; std::string name = "BuildSingleKernelVisitor" + suffix; wrappers.wrapType(PyClass(wrappers.module, name.c_str()), [](auto &mod, auto &cls) { diff --git a/python/lsst/ip/diffim/detail/buildSpatialKernelVisitor.cc b/python/lsst/ip/diffim/detail/buildSpatialKernelVisitor.cc index 143fc268c..5488c24ed 100644 --- a/python/lsst/ip/diffim/detail/buildSpatialKernelVisitor.cc +++ b/python/lsst/ip/diffim/detail/buildSpatialKernelVisitor.cc @@ -53,8 +53,7 @@ namespace { template void declareBuildSpatialKernelVisitor(lsst::cpputils::python::WrapperCollection &wrappers, std::string const& suffix) { std::string name = "BuildSpatialKernelVisitor" + suffix; - using PyClass = py::class_, std::shared_ptr>, - afw::math::CandidateVisitor>; + using PyClass = py::classh, afw::math::CandidateVisitor>; wrappers.wrapType(PyClass(wrappers.module, name.c_str()), [](auto &mod, auto &cls) { cls.def(py::init(), "basisList"_a, "regionBBox"_a, "ps"_a); diff --git a/python/lsst/ip/diffim/detail/kernelPca.cc b/python/lsst/ip/diffim/detail/kernelPca.cc index e39cef3b7..f8fd60795 100644 --- a/python/lsst/ip/diffim/detail/kernelPca.cc +++ b/python/lsst/ip/diffim/detail/kernelPca.cc @@ -51,7 +51,7 @@ namespace { template void declareKernelPca(lsst::cpputils::python::WrapperCollection &wrappers, std::string const& suffix) { using ImageT = afw::image::Image; - using PyClass = py::class_, std::shared_ptr>, afw::image::ImagePca>; + using PyClass = py::classh, afw::image::ImagePca>; std::string name = "KernelPca" + suffix; wrappers.wrapType(PyClass(wrappers.module, name.c_str()), [](auto &mod, auto &cls) { @@ -71,8 +71,7 @@ void declareKernelPca(lsst::cpputils::python::WrapperCollection &wrappers, std:: */ template void declareKernelPcaVisitor(lsst::cpputils::python::WrapperCollection &wrappers, std::string const& suffix) { - using PyClass = py::class_, std::shared_ptr>, - afw::math::CandidateVisitor>; + using PyClass = py::classh, afw::math::CandidateVisitor>; std::string name = "KernelPcaVisitor" + suffix; // note that KernelPcaVisitor::ImageT diff --git a/python/lsst/ip/diffim/detail/kernelSumVisitor.cc b/python/lsst/ip/diffim/detail/kernelSumVisitor.cc index 31feb906a..bebbd1f1f 100644 --- a/python/lsst/ip/diffim/detail/kernelSumVisitor.cc +++ b/python/lsst/ip/diffim/detail/kernelSumVisitor.cc @@ -50,7 +50,7 @@ template void declareKernelSumVisitor(lsst::cpputils::python::WrapperCollection &wrappers, std::string const& suffix) { using Class = KernelSumVisitor; - using PyClass = py::class_, afw::math::CandidateVisitor>; + using PyClass = py::classh; std::string name = "KernelSumVisitor" + suffix; auto clsDef = wrappers.wrapType(PyClass(wrappers.module, name.c_str()), [](auto &mod, auto &cls) { cls.def(py::init(), "ps"_a); diff --git a/python/lsst/ip/diffim/dipoleAlgorithms.cc b/python/lsst/ip/diffim/dipoleAlgorithms.cc index fed4f7a15..068f47333 100644 --- a/python/lsst/ip/diffim/dipoleAlgorithms.cc +++ b/python/lsst/ip/diffim/dipoleAlgorithms.cc @@ -41,7 +41,7 @@ namespace diffim { namespace { void declareDipoleCentroidControl(lsst::cpputils::python::WrapperCollection &wrappers) { - using PyDipoleCentroidControl = py::class_>; + using PyDipoleCentroidControl = py::classh; wrappers.wrapType(PyDipoleCentroidControl(wrappers.module, "DipoleCentroidControl"), [](auto &mod, auto &cls) { cls.def(py::init<>()); @@ -49,7 +49,7 @@ void declareDipoleCentroidControl(lsst::cpputils::python::WrapperCollection &wra } void declareDipoleFluxControl(lsst::cpputils::python::WrapperCollection &wrappers) { - using PyDipoleFluxControl = py::class_>; + using PyDipoleFluxControl = py::classh; wrappers.wrapType(PyDipoleFluxControl(wrappers.module, "DipoleFluxControl"), [](auto &mod, auto &cls) { cls.def(py::init<>()); @@ -58,7 +58,7 @@ void declareDipoleFluxControl(lsst::cpputils::python::WrapperCollection &wrapper void declareDipolePsfFluxControl(lsst::cpputils::python::WrapperCollection &wrappers) { using PyPsfDipoleFluxControl = - py::class_, DipoleFluxControl>; + py::classh; wrappers.wrapType(PyPsfDipoleFluxControl(wrappers.module, "PsfDipoleFluxControl"), [](auto &mod, auto &cls) { cls.def(py::init<>()); @@ -72,7 +72,7 @@ void declareDipolePsfFluxControl(lsst::cpputils::python::WrapperCollection &wrap void declareDipoleCentroidAlgorithm(lsst::cpputils::python::WrapperCollection &wrappers) { // Abstract class, so add a leading underscore to Python name and do not wrap constructor using PyDipoleCentroidAlgorithm = - py::class_, meas::base::SimpleAlgorithm>; + py::classh; wrappers.wrapType(PyDipoleCentroidAlgorithm(wrappers.module, "_DipoleCentroidAlgorithm"), [](auto &mod, auto &cls) { cls.attr("FAILURE") = py::cast(DipoleCentroidAlgorithm::FAILURE); @@ -89,7 +89,7 @@ void declareDipoleCentroidAlgorithm(lsst::cpputils::python::WrapperCollection &w void declareDipoleFluxAlgorithm(lsst::cpputils::python::WrapperCollection &wrappers) { // Abstract class, so add a leading underscore to Python name and do not wrap constructor using PyDipoleFluxAlgorithm = - py::class_, meas::base::SimpleAlgorithm>; + py::classh; wrappers.wrapType(PyDipoleFluxAlgorithm(wrappers.module, "_DipoleFluxAlgorithm"), [](auto &mod, auto &cls) { cls.attr("FAILURE") = py::cast(DipoleFluxAlgorithm::FAILURE); cls.attr("POS_FLAG") = py::cast(DipoleFluxAlgorithm::POS_FLAG); @@ -103,7 +103,7 @@ void declareDipoleFluxAlgorithm(lsst::cpputils::python::WrapperCollection &wrapp } void declarePsfDipoleFlux(lsst::cpputils::python::WrapperCollection &wrappers) { - using PyPsfDipoleFlux = py::class_, DipoleFluxAlgorithm>; + using PyPsfDipoleFlux = py::classh; wrappers.wrapType(PyPsfDipoleFlux(wrappers.module, "PsfDipoleFlux"), [](auto &mod, auto &cls) { cls.def(py::init(), "ctrl"_a, diff --git a/python/lsst/ip/diffim/imageStatistics.cc b/python/lsst/ip/diffim/imageStatistics.cc index 1165a8ada..4f4b79243 100644 --- a/python/lsst/ip/diffim/imageStatistics.cc +++ b/python/lsst/ip/diffim/imageStatistics.cc @@ -48,7 +48,7 @@ namespace { */ template void declareImageStatistics(lsst::cpputils::python::WrapperCollection &wrappers, std::string const &suffix) { - using PyImageStatistics = py::class_, std::shared_ptr>>; + using PyImageStatistics = py::classh>; std::string name = "ImageStatistics" + suffix; wrappers.wrapType(PyImageStatistics(wrappers.module, name.c_str()), [](auto &mod, auto &cls) { diff --git a/python/lsst/ip/diffim/kernelCandidate.cc b/python/lsst/ip/diffim/kernelCandidate.cc index 625fc09ae..9988997a9 100644 --- a/python/lsst/ip/diffim/kernelCandidate.cc +++ b/python/lsst/ip/diffim/kernelCandidate.cc @@ -55,8 +55,7 @@ void declareKernelCandidate(lsst::cpputils::python::WrapperCollection &wrappers, using PyCandidateSwitch = py::enum_; std::string name = "KernelCandidate" + suffix; - using PyKernelCandidate = py::class_, std::shared_ptr>, - afw::math::SpatialCellImageCandidate>; + using PyKernelCandidate = py::classh, afw::math::SpatialCellImageCandidate>; auto clsDef = wrappers.wrapType(PyKernelCandidate(wrappers.module, name.c_str()), [](auto &mod, auto &cls) { cls.def(py::init> const &, diff --git a/python/lsst/ip/diffim/kernelSolution.cc b/python/lsst/ip/diffim/kernelSolution.cc index f19592651..51618668d 100644 --- a/python/lsst/ip/diffim/kernelSolution.cc +++ b/python/lsst/ip/diffim/kernelSolution.cc @@ -43,7 +43,7 @@ namespace { * Wrap KernelSolution */ void declareKernelSolution(lsst::cpputils::python::WrapperCollection &wrappers) { - using PyKernelSolution = py::class_>; + using PyKernelSolution = py::classh; wrappers.wrapType(PyKernelSolution(wrappers.module, "KernelSolution"), [](auto &mod, auto &cls) { cls.def(py::init(), "mMat"_a, "bVec"_a, "fitForBackground"_a); @@ -93,8 +93,7 @@ void declareKernelSolution(lsst::cpputils::python::WrapperCollection &wrappers) */ template void declareStaticKernelSolution(lsst::cpputils::python::WrapperCollection &wrappers, std::string const &suffix) { - using PyStaticKernelSolution = - py::class_, std::shared_ptr>, KernelSolution>; + using PyStaticKernelSolution = py::classh, KernelSolution>; std::string name = ("StaticKernelSolution" + suffix); wrappers.wrapType(PyStaticKernelSolution(wrappers.module, name.c_str()), [](auto &mod, auto &cls) { cls.def(py::init(), "basisList"_a, "fitForBackground"_a); @@ -119,8 +118,7 @@ void declareStaticKernelSolution(lsst::cpputils::python::WrapperCollection &wrap */ template void declareMaskedKernelSolution(lsst::cpputils::python::WrapperCollection &wrappers, std::string const &suffix) { - using PyMaskedKernelSolution = py::class_, std::shared_ptr>, - StaticKernelSolution>; + using PyMaskedKernelSolution = py::classh, StaticKernelSolution>; std::string name = "MaskedKernelSolution" + suffix; wrappers.wrapType(PyMaskedKernelSolution(wrappers.module, name.c_str()), [](auto &mod, auto &cls) { cls.def(py::init(), "basisList"_a, "fitForBackground"_a); @@ -144,8 +142,7 @@ void declareMaskedKernelSolution(lsst::cpputils::python::WrapperCollection &wrap template void declareRegularizedKernelSolution(lsst::cpputils::python::WrapperCollection &wrappers, std::string const &suffix) { using PyRegularizedKernelSolution = - py::class_, - std::shared_ptr>,StaticKernelSolution>; + py::classh, StaticKernelSolution>; std::string name = "RegularizedKernelSolution" + suffix; wrappers.wrapType(PyRegularizedKernelSolution(wrappers.module, "RegularizedKernelSolution"), [](auto &mod, auto &cls) { @@ -165,8 +162,7 @@ void declareRegularizedKernelSolution(lsst::cpputils::python::WrapperCollection * Wrap SpatialKernelSolution */ void declareSpatialKernelSolution(lsst::cpputils::python::WrapperCollection &wrappers) { - using PySpatialKernelSolution = - py::class_, KernelSolution> ; + using PySpatialKernelSolution = py::classh ; wrappers.wrapType(PySpatialKernelSolution(wrappers.module, "SpatialKernelSolution"), [](auto &mod, auto &cls) { cls.def(py::init