Class BaseCore

Inheritance Relationships

Derived Types

Class Documentation

class BaseCore

A base class for parametrizations of the “core” of an ellipse - the ellipticity and size.

A subclass of BaseCore provides a particular interpretation of the three pointing point values that define an ellipse’s size and ellipticity (including position angle). All core subclasses are implicitly convertible and can be assigned to from any other core.

Subclassed by lsst::afw::geom::ellipses::Axes, lsst::afw::geom::ellipses::Quadrupole, lsst::afw::geom::ellipses::Separable< Ellipticity_, Radius_ >

Coordinate transforms

These member functions transform the ellipse by the given lsst::geom::LinearTransform. The transform can be done in-place by calling inPlace() on the returned expression object, or returned as a new shared_ptr by calling copy().

BaseCore::Transformer transform(lsst::geom::LinearTransform const &transform)
BaseCore::Transformer const transform(lsst::geom::LinearTransform const &transform) const

Convolve two bivariate Gaussians defined by their 1-sigma ellipses.

BaseCore::Convolution convolve(BaseCore const &other)
BaseCore::Convolution const convolve(BaseCore const &other) const

Public Types

typedef Eigen::Vector3d ParameterVector

Parameter vector type.

typedef Eigen::Matrix3d Jacobian

Parameter Jacobian matrix type.

Public Functions

virtual std::string getName() const = 0

Return a string that identifies this parametrization.

std::shared_ptr<BaseCore> clone() const

Deep-copy the Core.

virtual void normalize() = 0

Put the parameters into a “standard form”, and throw InvalidParameterError if they cannot be normalized.

void grow(double buffer)

Increase the major and minor radii of the ellipse core by the given buffer.

void scale(double factor)

Scale the size of the ellipse core by the given factor.

double getArea() const

Return the area of the ellipse core.

double getDeterminantRadius() const

Return the radius defined as the 4th root of the determinant of the quadrupole matrix.

The determinant radius is equal to the standard radius for a circle, and its square times pi is the area of the ellipse.

double getTraceRadius() const

Return the radius defined as the square root of one half the trace of the quadrupole matrix.

The trace radius is equal to the standard radius for a circle.

BaseCore::GridTransform const getGridTransform() const

Return the transform that maps the ellipse to the unit circle.

The returned proxy object is implicitly convertible to lsst::geom::LinearTransform and also supports differentiation.

lsst::geom::Extent2D computeDimensions() const

Return the size of the bounding box for the ellipse core.

virtual void readParameters(double const *iter) = 0
virtual void writeParameters(double *iter) const = 0
ParameterVector const getParameterVector() const

Return the core parameters as a vector.

void setParameterVector(ParameterVector const &vector)

Set the core parameters from a vector.

bool operator==(BaseCore const &other) const

Compare two ellipse cores for equality.

Ellipse cores are only equal if they have the same type.

bool operator!=(BaseCore const &other) const

Compare two ellipse cores for inequality.

Ellipses are only equal if they have the same type.

BaseCore &operator=(BaseCore const &other)

Set the parameters of this ellipse core from another.

This does not change the parametrization of the ellipse core.

BaseCore &operator=(BaseCore &&other)
Jacobian dAssign(BaseCore const &other)

Assign other to this and return the derivative of the conversion, d(this)/d(other).

template<typename Output>
BaseCore::Converter<Output> as() const

Convert this to the core type specified as a template parameter.

virtual ~BaseCore()

Public Static Functions

static std::shared_ptr<BaseCore> make(std::string const &name)
static std::shared_ptr<BaseCore> make(std::string const &name, ParameterVector const &parameters)
static std::shared_ptr<BaseCore> make(std::string const &name, double v1, double v2, double v3)
static std::shared_ptr<BaseCore> make(std::string const &name, BaseCore const &other)
static std::shared_ptr<BaseCore> make(std::string const &name, Transformer const &other)
static std::shared_ptr<BaseCore> make(std::string const &name, Convolution const &other)

Protected Functions

BaseCore()
virtual std::shared_ptr<BaseCore> _clone() const = 0
virtual void _assignToQuadrupole(double &ixx, double &iyy, double &ixy) const = 0
virtual void _assignFromQuadrupole(double ixx, double iyy, double ixy) = 0
virtual void _assignToAxes(double &a, double &b, double &theta) const = 0
virtual void _assignFromAxes(double a, double b, double theta) = 0
virtual Jacobian _dAssignToQuadrupole(double &ixx, double &iyy, double &ixy) const = 0
virtual Jacobian _dAssignFromQuadrupole(double ixx, double iyy, double ixy) = 0
virtual Jacobian _dAssignToAxes(double &a, double &b, double &theta) const = 0
virtual Jacobian _dAssignFromAxes(double a, double b, double theta) = 0

Protected Static Functions

static void registerSubclass(std::shared_ptr<BaseCore> const &example)
static void _assignQuadrupoleToAxes(double ixx, double iyy, double ixy, double &a, double &b, double &theta)
static Jacobian _dAssignQuadrupoleToAxes(double ixx, double iyy, double ixy, double &a, double &b, double &theta)
static void _assignAxesToQuadrupole(double a, double b, double theta, double &ixx, double &iyy, double &ixy)
static Jacobian _dAssignAxesToQuadrupole(double a, double b, double theta, double &ixx, double &iyy, double &ixy)

Friends

friend lsst::afw::geom::ellipses::BaseCore::Parametric
template<typename Output>
struct Converter

Public Functions

Converter(BaseCore const &input_)
operator Output() const
std::shared_ptr<Output> copy() const

Public Members

BaseCore const &input
class Convolution

A temporary-only expression object for ellipse core convolution.

Public Types

typedef Eigen::Matrix3d DerivativeMatrix

Matrix type for derivative with respect to input ellipse parameters.

Public Functions

Convolution(BaseCore &self, BaseCore const &other)

Standard constructor.

std::shared_ptr<BaseCore> copy() const

Return a new convolved ellipse core.

void inPlace()

Convolve the ellipse core in-place.

DerivativeMatrix d() const

Return the derivative of convolved core with respect to self.

void apply(BaseCore &result) const

Public Members

BaseCore &self
BaseCore const &other
class GridTransform

A temporary-only expression object representing an lsst::geom::LinearTransform that maps the ellipse core to a unit circle.

Unnamed Group

lsst::geom::LinearTransform inverted() const

Return the inverse of the lsst::geom::LinearTransform;

lsst::geom::LinearTransform invert() const

Public Types

typedef Eigen::Matrix<double, 4, 3> DerivativeMatrix

Matrix type for derivative with respect to ellipse parameters.

Public Functions

GridTransform(BaseCore const &input)

Standard constructor.

operator lsst::geom::LinearTransform() const

Convert the proxy to an lsst::geom::LinearTransform.

lsst::geom::LinearTransform::Matrix getMatrix() const

Return the transform matrix as an Eigen object.

DerivativeMatrix d() const

Return the derivative of the transform with respect to input core.

double getDeterminant() const

Return the determinant of the lsst::geom::LinearTransform.

template<typename T>
struct Registrar

Public Functions

Registrar()
class Transformer

A temporary-only expression object for ellipse core transformations.

Transformer simply provides a clean syntax for transform-related operations, including in-place and new-object transformations, derivatives of the transformations, and implicit conversion to a shared_ptr to a new transformed core.

Public Types

typedef Eigen::Matrix3d DerivativeMatrix

Matrix type for derivative with respect to input ellipse parameters.

typedef Eigen::Matrix<double, 3, 4> TransformDerivativeMatrix

Matrix type for derivative with respect to transform parameters.

Public Functions

Transformer(BaseCore &input_, lsst::geom::LinearTransform const &transform_)

Standard constructor.

std::shared_ptr<BaseCore> copy() const

Return a new transformed ellipse core.

void inPlace()

Transform the ellipse core in-place.

void apply(BaseCore &result) const
DerivativeMatrix d() const

Return the derivative of transformed core with respect to input core.

TransformDerivativeMatrix dTransform() const

Return the derivative of transformed core with respect to transform parameters.

Public Members

BaseCore &input

input core to be transformed

lsst::geom::LinearTransform const &transform

transform object