24#ifndef LSST_MEAS_BASE_PYTHON_H
25#define LSST_MEAS_BASE_PYTHON_H
27#include "pybind11/pybind11.h"
44using namespace pybind11::literals;
54template <
class Algorithm,
class PyAlg>
57 cls.def(py::init<typename Algorithm::Control const &, std::string const &, afw::table::Schema &>(),
58 "ctrl"_a,
"name"_a,
"schema"_a);
71template <
class Algorithm,
class PyAlg>
86template <
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);
115template <
class Algorithm,
class Control,
class PyAlg,
class PyCtrl>
117 declareAlgorithm<Algorithm>(clsAlgorithm);
122 clsControl.def(py::init<>());
147template <
class Algorithm,
class Control,
class Transform,
class PyAlg,
class PyCtrl,
class PyXform>
149 declareAlgorithm<Algorithm, Control>(clsAlgorithm, clsControl);
155 py::init<typename Transform::Control const &, std::string const &, afw::table::SchemaMapper &>(),
156 "ctrl"_a,
"name"_a,
"mapper"_a);
159 clsTransform.def(
"__call__",
165 "inputCatalog"_a,
"outputCatalog"_a,
"wcs"_a,
"photoCalib"_a);
table::Key< table::Array< std::uint8_t > > wcs
std::enable_if<!std::is_abstract< Algorithm >::value, void >::type declareAlgorithmConstructor(PyAlg &cls)
Wrap the standard algorithm constructor.
void declareAlgorithm(PyAlg &clsAlgorithm)
Wrap the implicit API used by meas_base's algorithms.