22 #include "pybind11/pybind11.h"
32 using namespace pybind11::literals;
48 template <
typename PixelT>
50 using Class = KernelSumVisitor<PixelT>;
52 py::class_<Class, std::shared_ptr<Class>, afw::math::CandidateVisitor>
cls(
53 mod, (
"KernelSumVisitor" + suffix).c_str());
55 py::enum_<typename Class::Mode>(
cls,
"Mode")
56 .value(
"AGGREGATE", Class::Mode::AGGREGATE)
57 .value(
"REJECT", Class::Mode::REJECT)
60 cls.def(py::init<daf::base::PropertySet const&>(),
"ps"_a);
62 cls.def(
"setMode", &Class::setMode,
"mode"_a);
63 cls.def(
"getNRejected", &Class::getNRejected);
64 cls.def(
"getkSumMean", &Class::getkSumMean);
65 cls.def(
"getkSumStd", &Class::getkSumStd);
66 cls.def(
"getdkSumMax", &Class::getdkSumMax);
67 cls.def(
"getkSumNpts", &Class::getkSumNpts);
68 cls.def(
"resetKernelSum", &Class::resetKernelSum);
69 cls.def(
"processCandidate", &Class::processCandidate,
"candidate"_a);
70 cls.def(
"processKsumDistribution", &Class::processKsumDistribution);
78 py::module::import(
"lsst.afw.math");
79 py::module::import(
"lsst.daf.base");
81 declareKernelSumVisitor<float>(mod,
"F");