23 #include "pybind11/pybind11.h" 24 #include "pybind11/eigen.h" 37 using PySlotDefinition = py::class_<SlotDefinition>;
40 PySlotDefinition
cls(mod,
"SlotDefinition");
41 cls.def(
"getName", &SlotDefinition::getName);
42 cls.def(
"getAlias", &SlotDefinition::getAlias);
48 template <
typename Class>
50 py::class_<Class, SlotDefinition>
cls(mod, name.
c_str());
51 cls.def(py::init<std::string const &>(),
"name"_a);
53 cls.def(
"getMeasKey", &Class::getMeasKey);
54 cls.def(
"getErrKey", &Class::getErrKey);
55 cls.def(
"getFlagKey", &Class::getFlagKey);
56 cls.def(
"setKeys", &Class::setKeys,
"alias"_a,
"schema"_a);
60 py::module::import(
"lsst.afw.table.aggregates");
62 declareSlotDefinition(mod);
63 declareSlotDefinitionSubclass<FluxSlotDefinition>(mod,
"Flux");
64 declareSlotDefinitionSubclass<CentroidSlotDefinition>(mod,
"Centroid");
65 declareSlotDefinitionSubclass<ShapeSlotDefinition>(mod,
"Shape");
PYBIND11_MODULE(camera, mod)
A base class for image defects.