22 #include "pybind11/pybind11.h"
23 #include "pybind11/stl.h"
29 using namespace pybind11::literals;
35 py::module::import(
"lsst.afw.table");
37 py::class_<ShapeletFunctionKey, std::shared_ptr<ShapeletFunctionKey>> clsShapeletFunctionKey(
38 mod,
"ShapeletFunctionKey");
40 clsShapeletFunctionKey.def(py::init<>());
41 clsShapeletFunctionKey.def(
43 "ellipse"_a,
"coefficients"_a,
"basisType"_a =
HERMITE);
44 clsShapeletFunctionKey.def(py::init<afw::table::SubSchema const &, BasisTypeEnum>(),
"s"_a,
47 clsShapeletFunctionKey.def(
"__eq__", &ShapeletFunctionKey::operator==, py::is_operator());
48 clsShapeletFunctionKey.def(
"__ne__", &ShapeletFunctionKey::operator!=, py::is_operator());
50 clsShapeletFunctionKey.def_static(
"addFields", &ShapeletFunctionKey::addFields,
"schema"_a,
"name"_a,
51 "doc"_a,
"ellipseUnit"_a,
"coeffUnit"_a,
"order"_a,
54 clsShapeletFunctionKey.def(
"get", &ShapeletFunctionKey::get);
58 clsShapeletFunctionKey.def(
"getCoefficients", &ShapeletFunctionKey::getCoefficients);
59 clsShapeletFunctionKey.def(
"getOrder", &ShapeletFunctionKey::getOrder);
60 clsShapeletFunctionKey.def(
"getBasisType", &ShapeletFunctionKey::getBasisType);
62 py::class_<MultiShapeletFunctionKey, std::shared_ptr<MultiShapeletFunctionKey>>
63 clsMultiShapeletFunctionKey(mod,
"MultiShapeletFunctionKey");
65 clsMultiShapeletFunctionKey.def(py::init<>());
66 clsMultiShapeletFunctionKey.def(py::init<afw::table::SubSchema const &, BasisTypeEnum>(),
"s"_a,
71 clsMultiShapeletFunctionKey.def_static(
"addFields", MultiShapeletFunctionKey::addFields,
"schema"_a,
72 "name"_a,
"doc"_a,
"ellipseUnit"_a,
"coeffUnit"_a,
"orders"_a,
75 clsMultiShapeletFunctionKey.def(
"__eq__", &MultiShapeletFunctionKey::operator==, py::is_operator());
76 clsMultiShapeletFunctionKey.def(
"__ne__", &MultiShapeletFunctionKey::operator!=, py::is_operator());
77 clsMultiShapeletFunctionKey.def(
"__getitem__",
80 clsMultiShapeletFunctionKey.def(
"get", &MultiShapeletFunctionKey::get);