22 #include "pybind11/pybind11.h"
23 #include "pybind11/stl.h"
30 namespace py = pybind11;
31 using namespace pybind11::literals;
46 template <
typename PixelT>
47 void declareKernelCandidateDetection(py::module &mod, std::string
const &suffix) {
48 py::class_<KernelCandidateDetection<PixelT>, std::shared_ptr<KernelCandidateDetection<PixelT>>> cls(
49 mod, (
"KernelCandidateDetection" + suffix).c_str());
51 cls.def(py::init<pex::policy::Policy const &>(),
"policy"_a);
53 cls.def(
"apply", &KernelCandidateDetection<PixelT>::apply,
"templateMaskedImage"_a,
54 "scienceMaskedImage"_a);
55 cls.def(
"growCandidate", &KernelCandidateDetection<PixelT>::growCandidate,
"footprint"_a,
"fpGrowPix"_a,
56 "templateMaskedImage"_a,
"scienceMaskedImage"_a);
57 cls.def(
"getFootprints", &KernelCandidateDetection<PixelT>::getFootprints);
63 py::module::import(
"lsst.afw.image");
64 py::module::import(
"lsst.afw.detection");
65 py::module::import(
"lsst.pex.policy");
67 py::module mod(
"kernelCandidateDetection");
69 declareKernelCandidateDetection<float>(mod,
"F");
Detect candidates for kernels within 2 images.
PYBIND11_PLUGIN(basisLists)