22 #include "pybind11/pybind11.h" 23 #include "pybind11/stl.h" 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);
Class that maps ShapeletFunction objects to fields in afw::table objects.
Class that maps MultiShapeletFunction objects to fields in afw::table objects.
daf::base::PropertySet * set
A base class for image defects.
Cartesian shapelets or Gauss-Hermite functions, as defined in Refregier, 2003.
PYBIND11_MODULE(functorKeys, mod)
A FunctorKey used to get or set a geom::ellipses::Ellipse from an (xx,yy,xy,x,y) tuple of Keys...