42 {
43 m.doc() = "Gauss2D Gaussian Python bindings";
44
47
48 auto _g = py::class_<gauss2d::GaussianIntegral, std::shared_ptr<gauss2d::GaussianIntegral>>(
49 m, "GaussianIntegral");
52 .def(py::init<double>(), "value"_a = 1)
55 .def(py::self == py::self)
56 .def(py::self != py::self)
57 .def("__repr__",
60 })
62
63 py::class_<gauss2d::Gaussian, std::shared_ptr<gauss2d::Gaussian>>(m, "Gaussian")
66 "centroid"_a = nullptr, "ellipse"_a = nullptr, "integral"_a = nullptr)
74 .def(py::self == py::self)
75 .def(py::self != py::self)
76 .def("__repr__",
79 py::class_<gauss2d::Gaussians, std::shared_ptr<gauss2d::Gaussians>>(m, "Gaussians")
80 .def(py::init<std::optional<const gauss2d::Gaussians::Data>>(), "gaussians"_a)
85 .def("__repr__",
88 py::class_<gauss2d::ConvolvedGaussian, std::shared_ptr<gauss2d::ConvolvedGaussian>>(m,
89 "ConvolvedGaussian")
91 "source"_a = nullptr, "kernel"_a = nullptr)
94 .def(py::self == py::self)
95 .def(py::self != py::self)
96 .def("__repr__",
99 })
101 py::class_<gauss2d::ConvolvedGaussians, std::shared_ptr<gauss2d::ConvolvedGaussians>>(
102 m, "ConvolvedGaussians")
103 .def(py::init<std::optional<const gauss2d::ConvolvedGaussians::Data>>(), "convolvedbgaussians"_a)
108 .def("__repr__",
111 })
113}
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.
Interface for the normalization (total integrated value) of a 2D Gaussian.
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