52 py::module::import(
"lsst.afw.geom");
53 py::module::import(
"lsst.afw.image");
54 py::module::import(
"lsst.afw.table");
55 py::module::import(
"lsst.meas.base");
58 py::class_<SimpleShape, std::shared_ptr<SimpleShape>, base::SimpleAlgorithm> clsSimpleShape(
60 py::class_<SimpleShapeControl> clsSimpleShapeControl(mod,
"SimpleShapeControl");
61 py::class_<SimpleShapeResult> clsSimpleShapeResult(mod,
"SimpleShapeResult");
62 py::class_<SimpleShapeResultKey> clsSimpleShapeResultKey(mod,
"SimpleShapeResultKey");
65 clsSimpleShape.def(py::init<SimpleShape::Control const &, std::string const &, afw::table::Schema &>(),
66 "ctrl"_a,
"name"_a,
"schema"_a);
67 clsSimpleShapeControl.def(py::init<>());
69 clsSimpleShapeResultKey.def(py::init<afw::table::SubSchema const &>(),
"s"_a);
75 declareMoments<float>(clsSimpleShape);
76 declareMoments<double>(clsSimpleShape);
77 clsSimpleShape.def_static(
"correctWeightedMoments", &SimpleShape::correctWeightedMoments,
"weight"_a,
78 "ellipse"_a,
"center"_a);
80 clsSimpleShapeResult.def_readwrite(
"ellipse", &SimpleShapeResult::ellipse);
81 clsSimpleShapeResult.def_readwrite(
"center", &SimpleShapeResult::center);
83 clsSimpleShapeResult.def(
"getFlag", &SimpleShapeResult::getFlag);
85 clsSimpleShapeResultKey.def(
"get", &SimpleShapeResultKey::get,
"record"_a);