LSSTApplications  20.0.0
LSSTDataManagementBasePackage
Functions
ellipticityBase.cc File Reference
#include <pybind11/pybind11.h>
#include "lsst/afw/geom/ellipses/EllipticityBase.h"

Go to the source code of this file.

Functions

 PYBIND11_MODULE (ellipticityBase, mod)
 

Function Documentation

◆ PYBIND11_MODULE()

PYBIND11_MODULE ( ellipticityBase  ,
mod   
)

Definition at line 35 of file ellipticityBase.cc.

35  {
36  py::class_<detail::EllipticityBase> cls(mod, "EllipticityBase");
37 
38  /* Member types and enums */
39  py::enum_<detail::EllipticityBase::ParameterEnum>(cls, "ParameterEnum")
40  .value("E1", detail::EllipticityBase::ParameterEnum::E1)
41  .value("E2", detail::EllipticityBase::ParameterEnum::E2)
42  .export_values();
43 
44  /* Members */
45  cls.def("getComplex",
46  (std::complex<double> & (detail::EllipticityBase::*)()) & detail::EllipticityBase::getComplex);
47  cls.def("setComplex", &detail::EllipticityBase::setComplex);
48  cls.def("getE1", &detail::EllipticityBase::getE1);
49  cls.def("setE1", &detail::EllipticityBase::setE1);
50  cls.def("getE2", &detail::EllipticityBase::getE2);
51  cls.def("setE2", &detail::EllipticityBase::setE2);
52  cls.def("getTheta", &detail::EllipticityBase::getTheta);
53  cls.def("__str__", [](detail::EllipticityBase const& self) {
54  return py::str("({}, {})").format(self.getE1(), self.getE2());
55  });
56 }
lsst::afw::geom::ellipses::detail::EllipticityBase
EllipticityBase is a base class for complex ellipticity types.
Definition: EllipticityBase.h:45
lsst::afw::geom.transform.transformContinued.cls
cls
Definition: transformContinued.py:33
std::complex< double >