23 #include "pybind11/pybind11.h"
24 #include "pybind11/stl.h"
28 #include "lsst/pex/config/python.h"
30 #include "lsst/afw/table/Source.h"
33 namespace py = pybind11;
34 using namespace pybind11::literals;
41 py::module::import(
"lsst.afw.table");
42 py::module mod(
"pixelFlags");
44 py::class_<PixelFlagsAlgorithm, std::shared_ptr<PixelFlagsAlgorithm>,
SimpleAlgorithm> clsPixelFlagsAlgorithm(mod,
"PixelFlagsAlgorithm");
45 py::class_<PixelFlagsControl> clsPixelFlagsControl(mod,
"PixelFlagsControl");
49 afw::table::Schema &>(),
50 "ctrl"_a,
"name"_a,
"schema"_a);
52 clsPixelFlagsControl.def(py::init<>());
54 clsPixelFlagsAlgorithm.def(
"measure", &PixelFlagsAlgorithm::measure,
55 "measRecord"_a,
"exposure"_a);
56 clsPixelFlagsAlgorithm.def(
"fail", &PixelFlagsAlgorithm::fail,
57 "measRecord"_a,
"error"_a=
nullptr);
59 LSST_DECLARE_CONTROL_FIELD(clsPixelFlagsControl,
PixelFlagsControl, masksFpAnywhere);
60 LSST_DECLARE_CONTROL_FIELD(clsPixelFlagsControl,
PixelFlagsControl, masksFpCenter);
A C++ control class to handle PixelFlagsAlgorithm's configuration.
An abstract base classes for which the same implementation can be used for both SingleFrameAlgorithm ...
PYBIND11_PLUGIN(algorithm)
This is the algorithm for PixelFlags.