24 #ifndef LSST_MEAS_BASE_PYTHON_H 25 #define LSST_MEAS_BASE_PYTHON_H 27 #include "pybind11/pybind11.h" 42 namespace py = pybind11;
53 template <
class Algorithm,
class PyAlg>
55 cls.def(py::init<
typename Algorithm::Control
const &,
58 "ctrl"_a,
"name"_a,
"schema"_a);
71 template <
class Algorithm,
class PyAlg>
86 template <
class Algorithm,
class PyAlg>
91 declareAlgorithmConstructor<Algorithm>(clsAlgorithm);
96 clsAlgorithm.def(
"fail", &Algorithm::fail,
"measRecord"_a,
"error"_a=NULL);
97 clsAlgorithm.def(
"measure", &Algorithm::measure,
"record"_a,
"exposure"_a);
115 template <
class Algorithm,
class Control,
class PyAlg,
class PyCtrl>
117 declareAlgorithm<Algorithm>(clsAlgorithm);
122 clsControl.def(py::init<>());
147 template <
class Algorithm,
class Control,
class Transform,
class PyAlg,
class PyCtrl,
class PyXform>
149 declareAlgorithm<Algorithm, Control>(clsAlgorithm, clsControl);
154 clsTransform.def(py::init<
typename Transform::Control
const &,
157 "ctrl"_a,
"name"_a,
"mapper"_a);
160 clsTransform.def(
"__call__", [](
Transform const &
self,
165 return self(inputCatalog, outputCatalog, wcs, calib);
166 },
"inputCatalog"_a,
"outputCatalog"_a,
"wcs"_a,
"calib"_a);
geom::Transform< geom::Point2Endpoint, geom::Point2Endpoint > Transform
void declareAlgorithm(PyAlg &clsAlgorithm)
Wrap the implicit API used by meas_base's algorithms.
std::enable_if<!std::is_abstract< Algorithm >::value, void >::type declareAlgorithmConstructor(PyAlg &cls)
Wrap the standard algorithm constructor.