22 #include "pybind11/pybind11.h" 27 #include "lsst/afw/math/SpatialCell.h" 30 namespace py = pybind11;
47 template <
typename PixelT>
48 void declareAssessSpatialKernelVisitor(py::module& mod, std::string
const& suffix) {
49 py::class_<AssessSpatialKernelVisitor<PixelT>, std::shared_ptr<AssessSpatialKernelVisitor<PixelT>>,
50 lsst::afw::math::CandidateVisitor>
51 cls(mod, (
"AssessSpatialKernelVisitor" + suffix).c_str());
53 cls.def(py::init<std::shared_ptr<afw::math::LinearCombinationKernel>,
54 afw::math::Kernel::SpatialFunctionPtr, pex::policy::Policy
const&>(),
55 "spatialKernel"_a,
"spatialBackground"_a,
"policy"_a);
57 cls.def(
"reset", &AssessSpatialKernelVisitor<PixelT>::reset);
58 cls.def(
"getNGood", &AssessSpatialKernelVisitor<PixelT>::getNGood);
59 cls.def(
"getNRejected", &AssessSpatialKernelVisitor<PixelT>::getNRejected);
60 cls.def(
"getNProcessed", &AssessSpatialKernelVisitor<PixelT>::getNProcessed);
61 cls.def(
"processCandidate", &AssessSpatialKernelVisitor<PixelT>::processCandidate,
"candidate"_a);
63 mod.def(
"makeAssessSpatialKernelVisitor", &makeAssessSpatialKernelVisitor<PixelT>,
"spatialKernel"_a,
64 "spatialBackground"_a,
"policy"_a);
70 py::module::import(
"lsst.afw.math");
71 py::module::import(
"lsst.pex.policy");
73 py::module mod(
"assessSpatialKernelVisitor");
75 declareAssessSpatialKernelVisitor<float>(mod,
"F");
PYBIND11_PLUGIN(assessSpatialKernelVisitor)
Declaration of AssessSpatialKernelVisitor.