41 {
42 m.doc() = "Gauss2D Gaussian Python bindings";
43
46
47 auto _g = py::classh<gauss2d::GaussianIntegral>(m,
"GaussianIntegral");
48 py::classh<gauss2d::GaussianIntegralValue, gauss2d::GaussianIntegral>(m, "GaussianIntegralValue")
49 .def(py::init<double>(), "value"_a = 1)
52 .def(py::self == py::self)
53 .def(py::self != py::self)
54 .def("__repr__",
57 })
59
60 py::classh<gauss2d::Gaussian>(m, "Gaussian")
63 "centroid"_a = nullptr, "ellipse"_a = nullptr, "integral"_a = nullptr)
71 .def(py::self == py::self)
72 .def(py::self != py::self)
73 .def("__repr__",
76 py::classh<gauss2d::Gaussians>(m, "Gaussians")
77 .def(py::init<std::optional<const gauss2d::Gaussians::Data>>(), "gaussians"_a)
82 .def("__repr__",
85 py::classh<gauss2d::ConvolvedGaussian>(m, "ConvolvedGaussian")
87 "source"_a = nullptr, "kernel"_a = nullptr)
90 .def(py::self == py::self)
91 .def(py::self != py::self)
92 .def("__repr__",
95 })
97 py::classh<gauss2d::ConvolvedGaussians>(m, "ConvolvedGaussians")
98 .def(py::init<std::optional<const gauss2d::ConvolvedGaussians::Data>>(), "convolvedbgaussians"_a)
103 .def("__repr__",
106 })
108}
A convolution of a Gaussian source and kernel.
const Gaussian & get_source() const
std::string repr(bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
Return a full, callable string representation of this.
std::string str() const override
Return a brief, human-readable string representation of this.
const Gaussian & get_kernel() const
A collection of ConvolvedGaussian objects.
std::string str() const override
Return a brief, human-readable string representation of this.
std::shared_ptr< ConvolvedGaussian > at_ptr(size_t i) const
std::string repr(bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
Return a full, callable string representation of this.
A 2D Gaussian with a Centroid, Ellipse, and integral.
Ellipse & get_ellipse()
Get the ellipse object.
void set_const_normal(double const_normal)
std::string repr(bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
Return a full, callable string representation of this.
GaussianIntegral & get_integral()
Get the integral object.
double get_integral_value() const
Get the integral value.
void set_integral_value(double integral)
double get_const_normal() const
Get the multiplicative factor for Gaussian function evaluations: integral/(2*area)
Centroid & get_centroid()
Get the centroid object.
std::string str() const override
Return a brief, human-readable string representation of this.
A GaussianIntegral storing a float value.
double get_value() const override
void set_value(double value) override
std::string str() const override
Return a brief, human-readable string representation of this.
std::string repr(bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
Return a full, callable string representation of this.
An array of Gaussian objects.
Gaussian & at(size_t i) const
std::shared_ptr< Gaussian > at_ptr(size_t i) const
std::string repr(bool name_keywords=false, std::string_view namespace_separator=Object::CC_NAMESPACE_SEPARATOR) const override
Return a full, callable string representation of this.
std::string str() const override
Return a brief, human-readable string representation of this.
static constexpr std::string_view PY_NAMESPACE_SEPARATOR
const double M_SIGMA_HWHM
const double M_HWHM_SIGMA