23 #include "pybind11/pybind11.h"
33 using namespace pybind11::literals;
41 using PyFluxAlgorithm = py::class_<ScaledApertureFluxAlgorithm, std::shared_ptr<ScaledApertureFluxAlgorithm>,
43 using PyFluxControl = py::class_<ScaledApertureFluxControl>;
44 using PyFluxTransform =
45 py::class_<ScaledApertureFluxTransform, std::shared_ptr<ScaledApertureFluxTransform>,
BaseTransform>;
47 PyFluxControl declareFluxControl(
py::module &mod) {
48 PyFluxControl
cls(mod,
"ScaledApertureFluxControl");
53 cls.def(py::init<>());
58 PyFluxAlgorithm declareFluxAlgorithm(
py::module &mod) {
59 PyFluxAlgorithm
cls(mod,
"ScaledApertureFluxAlgorithm");
62 afw::table::Schema &>(),
63 "ctrl"_a,
"name"_a,
"schema"_a);
66 cls.def(
"fail", &ScaledApertureFluxAlgorithm::fail,
"measRecord"_a,
"error"_a =
nullptr);
71 PyFluxTransform declareFluxTransform(
py::module &mod) {
72 PyFluxTransform
cls(mod,
"ScaledApertureFluxTransform");
75 afw::table::SchemaMapper &>(),
76 "ctrl"_a,
"name"_a,
"mapper"_a);
84 py::module::import(
"lsst.afw.table");
85 py::module::import(
"lsst.meas.base.algorithm");
86 py::module::import(
"lsst.meas.base.fluxUtilities");
87 py::module::import(
"lsst.meas.base.transform");
89 auto clsFluxControl = declareFluxControl(mod);
90 auto clsFluxAlgorithm = declareFluxAlgorithm(mod);
91 auto clsFluxTransform = declareFluxTransform(mod);
93 clsFluxAlgorithm.attr(
"Control") = clsFluxControl;
94 clsFluxTransform.attr(
"Control") = clsFluxControl;