lsst.afw gba47b54d5d+94dc90c3ea
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
lsst::afw::geom::ellipses::Axes Class Reference

An ellipse core for the semimajor/semiminor axis and position angle parametrization (a,b,theta). More...

#include <Axes.h>

Inheritance diagram for lsst::afw::geom::ellipses::Axes:
lsst::afw::geom::ellipses::BaseCore

Public Types

enum  ParameterEnum { A = 0 , B = 1 , THETA = 2 }
 
using ParameterVector = Eigen::Vector3d
 Parameter vector type. More...
 
using Jacobian = Eigen::Matrix3d
 Parameter Jacobian matrix type. More...
 

Public Member Functions

double const getA () const
 
void setA (double a)
 
double const getB () const
 
void setB (double b)
 
double const getTheta () const
 
void setTheta (double theta)
 
std::shared_ptr< Axesclone () const
 Deep copy the ellipse core. More...
 
std::string getName () const override
 Return a string that identifies this parametrization. More...
 
void normalize () override
 Put the parameters into a "standard form", if possible, and throw InvalidParameterError if they cannot be normalized. More...
 
void readParameters (double const *iter) override
 Return the size of the bounding box for the ellipse core. More...
 
void writeParameters (double *iter) const override
 Return the size of the bounding box for the ellipse core. More...
 
Axesoperator= (Axes const &other)
 Standard assignment. More...
 
Axesoperator= (Axes &&other)
 
Axesoperator= (BaseCore const &other)
 Converting assignment. More...
 
 Axes (double a=1.0, double b=1.0, double theta=0.0, bool normalize=false)
 Construct from parameter values. More...
 
 Axes (BaseCore::ParameterVector const &vector, bool normalize=false)
 Construct from a parameter vector. More...
 
 Axes (Axes const &other)
 Copy constructor. More...
 
 Axes (Axes &&other)
 
 ~Axes () override=default
 
 Axes (BaseCore const &other)
 Converting copy constructor. More...
 
 Axes (BaseCore::Transformer const &transformer)
 Converting copy constructor. More...
 
 Axes (BaseCore::Convolution const &convolution)
 Converting copy constructor. More...
 
void grow (double buffer)
 Increase the major and minor radii of the ellipse core by the given buffer. More...
 
void scale (double factor)
 Scale the size of the ellipse core by the given factor. More...
 
double getArea () const
 Return the area of the ellipse core. More...
 
double getDeterminantRadius () const
 Return the radius defined as the 4th root of the determinant of the quadrupole matrix. More...
 
double getTraceRadius () const
 Return the radius defined as the square root of one half the trace of the quadrupole matrix. More...
 
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().

Transformer transform (lsst::geom::LinearTransform const &transform)
 Return the transform that maps the ellipse to the unit circle. More...
 
Transformer const transform (lsst::geom::LinearTransform const &transform) const
 Return the transform that maps the ellipse to the unit circle. More...
 
GridTransform const getGridTransform () const
 Return the transform that maps the ellipse to the unit circle. More...
 

Static Public Member Functions

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

Protected Member Functions

std::shared_ptr< BaseCore_clone () const override
 Return the size of the bounding box for the ellipse core. More...
 
void _assignToQuadrupole (double &ixx, double &iyy, double &ixy) const override
 Return the size of the bounding box for the ellipse core. More...
 
void _assignFromQuadrupole (double ixx, double iyy, double ixy) override
 Return the size of the bounding box for the ellipse core. More...
 
void _assignToAxes (double &a, double &b, double &theta) const override
 Return the size of the bounding box for the ellipse core. More...
 
void _assignFromAxes (double a, double b, double theta) override
 Return the size of the bounding box for the ellipse core. More...
 
Jacobian _dAssignToQuadrupole (double &ixx, double &iyy, double &ixy) const override
 Return the size of the bounding box for the ellipse core. More...
 
Jacobian _dAssignFromQuadrupole (double ixx, double iyy, double ixy) override
 Return the size of the bounding box for the ellipse core. More...
 
Jacobian _dAssignToAxes (double &a, double &b, double &theta) const override
 Return the size of the bounding box for the ellipse core. More...
 
Jacobian _dAssignFromAxes (double a, double b, double theta) override
 Return the size of the bounding box for the ellipse core. More...
 

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

Convolution convolve (BaseCore const &other)
 Return the size of the bounding box for the ellipse core. More...
 
Convolution const convolve (BaseCore const &other) const
 Return the size of the bounding box for the ellipse core. More...
 
lsst::geom::Extent2D computeDimensions () const
 Return the size of the bounding box for the ellipse core. More...
 
ParameterVector const getParameterVector () const
 Return the core parameters as a vector. More...
 
void setParameterVector (ParameterVector const &vector)
 Set the core parameters from a vector. More...
 
bool operator== (BaseCore const &other) const
 Compare two ellipse cores for equality. More...
 
bool operator!= (BaseCore const &other) const
 Compare two ellipse cores for inequality. More...
 
Jacobian dAssign (BaseCore const &other)
 Assign other to this and return the derivative of the conversion, d(this)/d(other). More...
 
template<typename Output >
Converter< Output > as () const
 Convert this to the core type specified as a template parameter. More...
 
static void registerSubclass (std::shared_ptr< BaseCore > const &example)
 Return the size of the bounding box for the ellipse core. More...
 
static void _assignQuadrupoleToAxes (double ixx, double iyy, double ixy, double &a, double &b, double &theta)
 Return the size of the bounding box for the ellipse core. More...
 
static Jacobian _dAssignQuadrupoleToAxes (double ixx, double iyy, double ixy, double &a, double &b, double &theta)
 Return the size of the bounding box for the ellipse core. More...
 
static void _assignAxesToQuadrupole (double a, double b, double theta, double &ixx, double &iyy, double &ixy)
 Return the size of the bounding box for the ellipse core. More...
 
static Jacobian _dAssignAxesToQuadrupole (double a, double b, double theta, double &ixx, double &iyy, double &ixy)
 Return the size of the bounding box for the ellipse core. More...
 

Detailed Description

An ellipse core for the semimajor/semiminor axis and position angle parametrization (a,b,theta).

Definition at line 47 of file Axes.h.

Member Typedef Documentation

◆ Jacobian

using lsst::afw::geom::ellipses::BaseCore::Jacobian = Eigen::Matrix3d
inherited

Parameter Jacobian matrix type.

Definition at line 64 of file BaseCore.h.

◆ ParameterVector

using lsst::afw::geom::ellipses::BaseCore::ParameterVector = Eigen::Vector3d
inherited

Parameter vector type.

Definition at line 63 of file BaseCore.h.

Member Enumeration Documentation

◆ ParameterEnum

Enumerator
THETA 

Definition at line 49 of file Axes.h.

Constructor & Destructor Documentation

◆ Axes() [1/7]

lsst::afw::geom::ellipses::Axes::Axes ( double  a = 1.0,
double  b = 1.0,
double  theta = 0.0,
bool  normalize = false 
)
inlineexplicit

Construct from parameter values.

Definition at line 91 of file Axes.h.

◆ Axes() [2/7]

lsst::afw::geom::ellipses::Axes::Axes ( BaseCore::ParameterVector const &  vector,
bool  normalize = false 
)
inlineexplicit

Construct from a parameter vector.

Definition at line 97 of file Axes.h.

◆ Axes() [3/7]

lsst::afw::geom::ellipses::Axes::Axes ( Axes const &  other)
inline

Copy constructor.

Definition at line 102 of file Axes.h.

◆ Axes() [4/7]

lsst::afw::geom::ellipses::Axes::Axes ( Axes &&  other)
inline

Definition at line 104 of file Axes.h.

◆ ~Axes()

lsst::afw::geom::ellipses::Axes::~Axes ( )
overridedefault

◆ Axes() [5/7]

lsst::afw::geom::ellipses::Axes::Axes ( BaseCore const &  other)
inline

Converting copy constructor.

Definition at line 108 of file Axes.h.

◆ Axes() [6/7]

lsst::afw::geom::ellipses::Axes::Axes ( BaseCore::Transformer const &  transformer)
inline

Converting copy constructor.

Definition at line 111 of file Axes.h.

◆ Axes() [7/7]

lsst::afw::geom::ellipses::Axes::Axes ( BaseCore::Convolution const &  convolution)
inline

Converting copy constructor.

Definition at line 114 of file Axes.h.

Member Function Documentation

◆ _assignAxesToQuadrupole()

void lsst::afw::geom::ellipses::BaseCore::_assignAxesToQuadrupole ( double  a,
double  b,
double  theta,
double &  ixx,
double &  iyy,
double &  ixy 
)
staticprotectedinherited

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

Definition at line 218 of file BaseCore.cc.

◆ _assignFromAxes()

void lsst::afw::geom::ellipses::Axes::_assignFromAxes ( double  a,
double  b,
double  theta 
)
overrideprotectedvirtual

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

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 92 of file Axes.cc.

◆ _assignFromQuadrupole()

void lsst::afw::geom::ellipses::Axes::_assignFromQuadrupole ( double  ixx,
double  iyy,
double  ixy 
)
overrideprotectedvirtual

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

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 82 of file Axes.cc.

◆ _assignQuadrupoleToAxes()

void lsst::afw::geom::ellipses::BaseCore::_assignQuadrupoleToAxes ( double  ixx,
double  iyy,
double  ixy,
double &  a,
double &  b,
double &  theta 
)
staticprotectedinherited

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

Definition at line 183 of file BaseCore.cc.

◆ _assignToAxes()

void lsst::afw::geom::ellipses::Axes::_assignToAxes ( double &  a,
double &  b,
double &  theta 
) const
overrideprotectedvirtual

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

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 69 of file Axes.cc.

◆ _assignToQuadrupole()

void lsst::afw::geom::ellipses::Axes::_assignToQuadrupole ( double &  ixx,
double &  iyy,
double &  ixy 
) const
overrideprotectedvirtual

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

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 61 of file Axes.cc.

◆ _clone()

std::shared_ptr< BaseCore > lsst::afw::geom::ellipses::Axes::_clone ( ) const
inlineoverrideprotectedvirtual

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

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 117 of file Axes.h.

◆ _dAssignAxesToQuadrupole()

BaseCore::Jacobian lsst::afw::geom::ellipses::BaseCore::_dAssignAxesToQuadrupole ( double  a,
double  b,
double  theta,
double &  ixx,
double &  iyy,
double &  ixy 
)
staticprotectedinherited

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

Definition at line 231 of file BaseCore.cc.

◆ _dAssignFromAxes()

BaseCore::Jacobian lsst::afw::geom::ellipses::Axes::_dAssignFromAxes ( double  a,
double  b,
double  theta 
)
overrideprotectedvirtual

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

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 98 of file Axes.cc.

◆ _dAssignFromQuadrupole()

BaseCore::Jacobian lsst::afw::geom::ellipses::Axes::_dAssignFromQuadrupole ( double  ixx,
double  iyy,
double  ixy 
)
overrideprotectedvirtual

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

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 87 of file Axes.cc.

◆ _dAssignQuadrupoleToAxes()

BaseCore::Jacobian lsst::afw::geom::ellipses::BaseCore::_dAssignQuadrupoleToAxes ( double  ixx,
double  iyy,
double  ixy,
double &  a,
double &  b,
double &  theta 
)
staticprotectedinherited

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

Definition at line 193 of file BaseCore.cc.

◆ _dAssignToAxes()

BaseCore::Jacobian lsst::afw::geom::ellipses::Axes::_dAssignToAxes ( double &  a,
double &  b,
double &  theta 
) const
overrideprotectedvirtual

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

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 75 of file Axes.cc.

◆ _dAssignToQuadrupole()

BaseCore::Jacobian lsst::afw::geom::ellipses::Axes::_dAssignToQuadrupole ( double &  ixx,
double &  iyy,
double &  ixy 
) const
overrideprotectedvirtual

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

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 65 of file Axes.cc.

◆ as()

template<typename Output >
BaseCore::Converter< Output > lsst::afw::geom::ellipses::BaseCore::as
inlineinherited

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

Definition at line 238 of file BaseCore.h.

◆ clone()

std::shared_ptr< Axes > lsst::afw::geom::ellipses::Axes::clone ( void  ) const
inline

Deep copy the ellipse core.

Definition at line 61 of file Axes.h.

◆ computeDimensions()

lsst::geom::Extent2D lsst::afw::geom::ellipses::BaseCore::computeDimensions ( ) const
inherited

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

Definition at line 129 of file BaseCore.cc.

◆ convolve() [1/2]

BaseCore::Convolution lsst::afw::geom::ellipses::BaseCore::convolve ( BaseCore const &  other)
inlineinherited

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

Definition at line 91 of file Convolution.h.

◆ convolve() [2/2]

BaseCore::Convolution const lsst::afw::geom::ellipses::BaseCore::convolve ( BaseCore const &  other) const
inlineinherited

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

Definition at line 95 of file Convolution.h.

◆ dAssign()

BaseCore::Jacobian lsst::afw::geom::ellipses::BaseCore::dAssign ( BaseCore const &  other)
inherited

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

Definition at line 168 of file BaseCore.cc.

◆ getA()

double const lsst::afw::geom::ellipses::Axes::getA ( ) const
inline

Definition at line 51 of file Axes.h.

◆ getArea()

double lsst::afw::geom::ellipses::BaseCore::getArea ( ) const
inherited

Return the area of the ellipse core.

Definition at line 111 of file BaseCore.cc.

◆ getB()

double const lsst::afw::geom::ellipses::Axes::getB ( ) const
inline

Definition at line 54 of file Axes.h.

◆ getDeterminantRadius()

double lsst::afw::geom::ellipses::BaseCore::getDeterminantRadius ( ) const
inherited

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.

Definition at line 117 of file BaseCore.cc.

◆ getGridTransform()

BaseCore::GridTransform const lsst::afw::geom::ellipses::BaseCore::getGridTransform ( ) const
inlineinherited

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.

Definition at line 110 of file GridTransform.h.

◆ getName()

std::string lsst::afw::geom::ellipses::Axes::getName ( ) const
overridevirtual

Return a string that identifies this parametrization.

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 34 of file Axes.cc.

◆ getParameterVector()

BaseCore::ParameterVector const lsst::afw::geom::ellipses::BaseCore::getParameterVector ( ) const
inherited

Return the core parameters as a vector.

Definition at line 143 of file BaseCore.cc.

◆ getTheta()

double const lsst::afw::geom::ellipses::Axes::getTheta ( ) const
inline

Definition at line 57 of file Axes.h.

◆ getTraceRadius()

double lsst::afw::geom::ellipses::BaseCore::getTraceRadius ( ) const
inherited

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.

Definition at line 123 of file BaseCore.cc.

◆ grow()

void lsst::afw::geom::ellipses::BaseCore::grow ( double  buffer)
inherited

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

Definition at line 95 of file BaseCore.cc.

◆ make() [1/6]

std::shared_ptr< BaseCore > lsst::afw::geom::ellipses::BaseCore::make ( std::string const &  name)
staticinherited

Definition at line 55 of file BaseCore.cc.

◆ make() [2/6]

std::shared_ptr< BaseCore > lsst::afw::geom::ellipses::BaseCore::make ( std::string const &  name,
BaseCore const &  other 
)
staticinherited

Definition at line 73 of file BaseCore.cc.

◆ make() [3/6]

std::shared_ptr< BaseCore > lsst::afw::geom::ellipses::BaseCore::make ( std::string const &  name,
Convolution const &  other 
)
staticinherited

Definition at line 85 of file BaseCore.cc.

◆ make() [4/6]

std::shared_ptr< BaseCore > lsst::afw::geom::ellipses::BaseCore::make ( std::string const &  name,
double  v1,
double  v2,
double  v3 
)
staticinherited

Definition at line 67 of file BaseCore.cc.

◆ make() [5/6]

std::shared_ptr< BaseCore > lsst::afw::geom::ellipses::BaseCore::make ( std::string const &  name,
ParameterVector const &  parameters 
)
staticinherited

Definition at line 61 of file BaseCore.cc.

◆ make() [6/6]

std::shared_ptr< BaseCore > lsst::afw::geom::ellipses::BaseCore::make ( std::string const &  name,
Transformer const &  other 
)
staticinherited

Definition at line 79 of file BaseCore.cc.

◆ normalize()

void lsst::afw::geom::ellipses::Axes::normalize ( )
overridevirtual

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

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 36 of file Axes.cc.

◆ operator!=()

bool lsst::afw::geom::ellipses::BaseCore::operator!= ( BaseCore const &  other) const
inlineinherited

Compare two ellipse cores for inequality.

Ellipses are only equal if they have the same type.

Definition at line 167 of file BaseCore.h.

◆ operator=() [1/3]

Axes & lsst::afw::geom::ellipses::Axes::operator= ( Axes &&  other)
inline

Definition at line 82 of file Axes.h.

◆ operator=() [2/3]

Axes & lsst::afw::geom::ellipses::Axes::operator= ( Axes const &  other)
inline

Standard assignment.

Definition at line 77 of file Axes.h.

◆ operator=() [3/3]

Axes & lsst::afw::geom::ellipses::Axes::operator= ( BaseCore const &  other)
inline

Converting assignment.

Definition at line 85 of file Axes.h.

◆ operator==()

bool lsst::afw::geom::ellipses::BaseCore::operator== ( BaseCore const &  other) const
inherited

Compare two ellipse cores for equality.

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

Definition at line 151 of file BaseCore.cc.

◆ readParameters()

void lsst::afw::geom::ellipses::Axes::readParameters ( double const *  iter)
overridevirtual

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

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 49 of file Axes.cc.

◆ registerSubclass()

void lsst::afw::geom::ellipses::BaseCore::registerSubclass ( std::shared_ptr< BaseCore > const &  example)
staticprotectedinherited

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

Definition at line 91 of file BaseCore.cc.

◆ scale()

void lsst::afw::geom::ellipses::BaseCore::scale ( double  factor)
inherited

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

Definition at line 103 of file BaseCore.cc.

◆ setA()

void lsst::afw::geom::ellipses::Axes::setA ( double  a)
inline

Definition at line 52 of file Axes.h.

◆ setB()

void lsst::afw::geom::ellipses::Axes::setB ( double  b)
inline

Definition at line 55 of file Axes.h.

◆ setParameterVector()

void lsst::afw::geom::ellipses::BaseCore::setParameterVector ( ParameterVector const &  vector)
inherited

Set the core parameters from a vector.

Definition at line 149 of file BaseCore.cc.

◆ setTheta()

void lsst::afw::geom::ellipses::Axes::setTheta ( double  theta)
inline

Definition at line 58 of file Axes.h.

◆ transform() [1/2]

BaseCore::Transformer lsst::afw::geom::ellipses::BaseCore::transform ( lsst::geom::LinearTransform const &  transform)
inlineinherited

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.

Definition at line 116 of file Transformer.h.

◆ transform() [2/2]

BaseCore::Transformer const lsst::afw::geom::ellipses::BaseCore::transform ( lsst::geom::LinearTransform const &  transform) const
inlineinherited

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.

Definition at line 120 of file Transformer.h.

◆ writeParameters()

void lsst::afw::geom::ellipses::Axes::writeParameters ( double *  iter) const
overridevirtual

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

Implements lsst::afw::geom::ellipses::BaseCore.

Definition at line 55 of file Axes.cc.


The documentation for this class was generated from the following files: