23 #include <pybind11/pybind11.h>
24 #include <pybind11/stl.h>
26 #include "numpy/arrayobject.h"
27 #include "ndarray/pybind11.h"
28 #include "ndarray/converter.h"
34 namespace py = pybind11;
36 using namespace lsst::afw::geom::ellipses;
39 py::module mod(
"_baseCore",
"Python wrapper for afw _baseCore library");
41 if (_import_array() < 0) {
42 PyErr_SetString(PyExc_ImportError,
"numpy.core.multiarray failed to import");
47 py::class_<BaseCore, std::shared_ptr<BaseCore>> clsBaseCore(mod,
"BaseCore");
50 py::class_<BaseCore::Convolution> clsBaseCoreConvolution(clsBaseCore,
"Convolution");
51 py::class_<BaseCore::Transformer> clsBaseCoreTransformer(clsBaseCore,
"Transformer");
66 clsBaseCore.def(
"__eq__", &BaseCore::operator==, py::is_operator());
67 clsBaseCore.def(
"__nq__", &BaseCore::operator!=, py::is_operator());
Extent2D computeDimensions() const
Return the size of the bounding box for the ellipse core.
ParameterVector const getParameterVector() const
Return the core parameters as a vector.
double getArea() const
Return the area of the ellipse core.
std::shared_ptr< BaseCore > clone() const
Deep-copy the Core.
void setParameterVector(ParameterVector const &vector)
Set the core parameters from a vector.
void grow(double buffer)
Increase the major and minor radii of the ellipse core by the given buffer.
Convolution convolve(BaseCore const &other)
double getTraceRadius() const
Return the radius defined as the square root of one half the trace of the quadrupole matrix...
void scale(double factor)
Scale the size of the ellipse core by the given factor.
virtual void normalize()=0
Put the parameters into a "standard form", and throw InvalidParameterError if they cannot be normaliz...
double getDeterminantRadius() const
Return the radius defined as the 4th root of the determinant of the quadrupole matrix.
A base class for parametrizations of the "core" of an ellipse - the ellipticity and size...
virtual std::string getName() const =0
Return a string that identifies this parametrization.
A temporary-only expression object for ellipse core convolution.