22 #include "pybind11/pybind11.h"
23 #include "pybind11/stl.h"
25 #include "lsst/afw/table/io/python.h"
28 namespace py = pybind11;
29 using namespace pybind11::literals;
33 namespace algorithms {
36 py::module mod(
"coaddBoundedField");
38 py::class_<CoaddBoundedFieldElement> clsCoaddBoundedFieldElement(mod,
"CoaddBoundedFieldElement");
40 clsCoaddBoundedFieldElement.def(
41 py::init<std::shared_ptr<afw::math::BoundedField>, std::shared_ptr<afw::image::Wcs const>,
42 std::shared_ptr<afw::geom::polygon::Polygon const>,
double>(),
43 "field"_a,
"wcs"_a,
"validPolygon"_a,
"weight"_a = 1.0);
50 afw::table::io::python::declarePersistableFacade<CoaddBoundedField>(mod,
"CoaddBoundedField");
52 py::class_<CoaddBoundedField, std::shared_ptr<CoaddBoundedField>,
53 afw::table::io::PersistableFacade<CoaddBoundedField>, afw::math::BoundedField>
54 clsCoaddBoundedField(mod,
"CoaddBoundedField");
56 clsCoaddBoundedField.attr(
"Element") = clsCoaddBoundedFieldElement;
59 clsCoaddBoundedField.def(py::init<afw::geom::Box2I
const &, std::shared_ptr<afw::image::Wcs const>,
61 "bbox"_a,
"coaddWcs"_a,
"elements"_a);
62 clsCoaddBoundedField.def(py::init<afw::geom::Box2I
const &, std::shared_ptr<afw::image::Wcs const>,
64 "bbox"_a,
"coaddWcs"_a,
"elements"_a,
"default"_a);
67 clsCoaddBoundedField.def(
"__eq__", &CoaddBoundedField::operator==, py::is_operator());
68 clsCoaddBoundedField.def(
"__ne__", &CoaddBoundedField::operator!=, py::is_operator());
69 clsCoaddBoundedField.def(
"__imul__", &CoaddBoundedField::operator*);
72 clsCoaddBoundedField.def(
"evaluate", &CoaddBoundedField::evaluate);
73 clsCoaddBoundedField.def(
"isPersistable", &CoaddBoundedField::isPersistable);
tbl::Key< double > weight
std::vector< Element > ElementVector
tbl::Key< int > validPolygon
PYBIND11_PLUGIN(binnedWcs)