LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
lsst::afw::geom::ellipses::BaseCore Class Referenceabstract

A base class for parametrizations of the "core" of an ellipse - the ellipticity and size. More...

#include <BaseCore.h>

Inheritance diagram for lsst::afw::geom::ellipses::BaseCore:
lsst::afw::geom::ellipses::Axes lsst::afw::geom::ellipses::Quadrupole lsst::afw::geom::ellipses::Separable< Ellipticity_, Radius_ >

Classes

struct  Converter
 
class  Convolution
 A temporary-only expression object for ellipse core convolution. More...
 
class  GridTransform
 A temporary-only expression object representing a LinearTransform that maps the ellipse core to a unit circle. More...
 
struct  Registrar
 
class  Transformer
 A temporary-only expression object for ellipse core transformations. More...
 

Public Types

typedef boost::shared_ptr
< BaseCore
Ptr
 
typedef boost::shared_ptr
< BaseCore const > 
ConstPtr
 
typedef Eigen::Vector3d ParameterVector
 Parameter vector type. More...
 
typedef Eigen::Matrix3d Jacobian
 Parameter Jacobian matrix type. More...
 

Public Member Functions

virtual std::string getName () const =0
 Return a string that identifies this parametrization. More...
 
Ptr clone () const
 Deep-copy the Core. More...
 
virtual void normalize ()=0
 Put the parameters into a "standard form", and throw InvalidParameterError if they cannot be normalized. 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...
 
GridTransform const getGridTransform () const
 Return the transform that maps the ellipse to the unit circle. More...
 
Extent2D computeDimensions () const
 Return the size of the bounding box for the ellipse core. More...
 
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. 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...
 
BaseCoreoperator= (BaseCore const &other)
 Set the parameters of this ellipse core from another. 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...
 
virtual ~BaseCore ()
 
Coordinate transforms

These member functions transform the ellipse by the given 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 (LinearTransform const &transform)
 
Transformer const transform (LinearTransform const &transform) const
 
Convolve two bivariate Gaussians defined by their 1-sigma ellipses.
Convolution convolve (BaseCore const &other)
 
Convolution const convolve (BaseCore const &other) const
 

Static Public Member Functions

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

Protected Member Functions

virtual BaseCore::Ptr _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
 

Static Protected Member Functions

static void registerSubclass (Ptr 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

class Parametric
 

Detailed Description

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.

Definition at line 54 of file BaseCore.h.

Member Typedef Documentation

typedef boost::shared_ptr<BaseCore const> lsst::afw::geom::ellipses::BaseCore::ConstPtr

Definition at line 64 of file BaseCore.h.

Parameter Jacobian matrix type.

Definition at line 67 of file BaseCore.h.

Parameter vector type.

Definition at line 66 of file BaseCore.h.

Definition at line 60 of file BaseCore.h.

Constructor & Destructor Documentation

virtual lsst::afw::geom::ellipses::BaseCore::~BaseCore ( )
inlinevirtual

Definition at line 189 of file BaseCore.h.

189 {}

Member Function Documentation

static void lsst::afw::geom::ellipses::BaseCore::_assignAxesToQuadrupole ( double  a,
double  b,
double  theta,
double &  ixx,
double &  iyy,
double &  ixy 
)
staticprotected
virtual void lsst::afw::geom::ellipses::BaseCore::_assignFromAxes ( double  a,
double  b,
double  theta 
)
protectedpure virtual
virtual void lsst::afw::geom::ellipses::BaseCore::_assignFromQuadrupole ( double  ixx,
double  iyy,
double  ixy 
)
protectedpure virtual
static void lsst::afw::geom::ellipses::BaseCore::_assignQuadrupoleToAxes ( double  ixx,
double  iyy,
double  ixy,
double &  a,
double &  b,
double &  theta 
)
staticprotected
virtual void lsst::afw::geom::ellipses::BaseCore::_assignToAxes ( double &  a,
double &  b,
double &  theta 
) const
protectedpure virtual
virtual void lsst::afw::geom::ellipses::BaseCore::_assignToQuadrupole ( double &  ixx,
double &  iyy,
double &  ixy 
) const
protectedpure virtual
virtual BaseCore::Ptr lsst::afw::geom::ellipses::BaseCore::_clone ( ) const
protectedpure virtual
static Jacobian lsst::afw::geom::ellipses::BaseCore::_dAssignAxesToQuadrupole ( double  a,
double  b,
double  theta,
double &  ixx,
double &  iyy,
double &  ixy 
)
staticprotected
virtual Jacobian lsst::afw::geom::ellipses::BaseCore::_dAssignFromAxes ( double  a,
double  b,
double  theta 
)
protectedpure virtual
virtual Jacobian lsst::afw::geom::ellipses::BaseCore::_dAssignFromQuadrupole ( double  ixx,
double  iyy,
double  ixy 
)
protectedpure virtual
static Jacobian lsst::afw::geom::ellipses::BaseCore::_dAssignQuadrupoleToAxes ( double  ixx,
double  iyy,
double  ixy,
double &  a,
double &  b,
double &  theta 
)
staticprotected
virtual Jacobian lsst::afw::geom::ellipses::BaseCore::_dAssignToAxes ( double &  a,
double &  b,
double &  theta 
) const
protectedpure virtual
virtual Jacobian lsst::afw::geom::ellipses::BaseCore::_dAssignToQuadrupole ( double &  ixx,
double &  iyy,
double &  ixy 
) const
protectedpure virtual
template<typename Output >
BaseCore::Converter< Output > lsst::afw::geom::ellipses::BaseCore::as ( ) const
inline

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

Definition at line 251 of file BaseCore.h.

251  {
252  return Converter<Output>(*this);
253 }
Ptr lsst::afw::geom::ellipses::BaseCore::clone ( ) const
inline

Deep-copy the Core.

Definition at line 87 of file BaseCore.h.

87 { return _clone(); }
virtual BaseCore::Ptr _clone() const =0
Extent2D lsst::afw::geom::ellipses::BaseCore::computeDimensions ( ) const

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

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

Definition at line 97 of file Convolution.h.

97  {
98  return BaseCore::Convolution(*this, other);
99 }
BaseCore::Convolution const lsst::afw::geom::ellipses::BaseCore::convolve ( BaseCore const &  other) const
inline

Definition at line 101 of file Convolution.h.

101  {
102  return BaseCore::Convolution(const_cast<BaseCore &>(*this), other);
103 }
Jacobian lsst::afw::geom::ellipses::BaseCore::dAssign ( BaseCore const &  other)

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

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

Return the area of the ellipse core.

double lsst::afw::geom::ellipses::BaseCore::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.

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

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

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

Definition at line 110 of file GridTransform.h.

110  {
111  return BaseCore::GridTransform(*this);
112 }
virtual std::string lsst::afw::geom::ellipses::BaseCore::getName ( ) const
pure virtual
ParameterVector const lsst::afw::geom::ellipses::BaseCore::getParameterVector ( ) const

Return the core parameters as a vector.

double lsst::afw::geom::ellipses::BaseCore::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.

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

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

static Ptr lsst::afw::geom::ellipses::BaseCore::make ( std::string const &  name)
static
static Ptr lsst::afw::geom::ellipses::BaseCore::make ( std::string const &  name,
ParameterVector const &  parameters 
)
static
static Ptr lsst::afw::geom::ellipses::BaseCore::make ( std::string const &  name,
double  v1,
double  v2,
double  v3 
)
static
static Ptr lsst::afw::geom::ellipses::BaseCore::make ( std::string const &  name,
BaseCore const &  other 
)
static
static Ptr lsst::afw::geom::ellipses::BaseCore::make ( std::string const &  name,
Transformer const &  other 
)
static
static Ptr lsst::afw::geom::ellipses::BaseCore::make ( std::string const &  name,
Convolution const &  other 
)
static
virtual void lsst::afw::geom::ellipses::BaseCore::normalize ( )
pure virtual

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

Implemented in lsst::afw::geom::ellipses::Separable< Ellipticity_, Radius_ >, lsst::afw::geom::ellipses::Quadrupole, and lsst::afw::geom::ellipses::Axes.

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

Compare two ellipse cores for inequality.

Ellipses are only equal if they have the same type.

Definition at line 172 of file BaseCore.h.

172 { return !operator==(other); }
bool operator==(BaseCore const &other) const
Compare two ellipse cores for equality.
BaseCore& lsst::afw::geom::ellipses::BaseCore::operator= ( BaseCore const &  other)

Set the parameters of this ellipse core from another.

This does not change the parametrization of the ellipse core.

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

Compare two ellipse cores for equality.

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

virtual void lsst::afw::geom::ellipses::BaseCore::readParameters ( double const *  iter)
pure virtual
static void lsst::afw::geom::ellipses::BaseCore::registerSubclass ( Ptr const &  example)
staticprotected
void lsst::afw::geom::ellipses::BaseCore::scale ( double  factor)

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

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

Set the core parameters from a vector.

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

Definition at line 117 of file Transformer.h.

117  {
118  return BaseCore::Transformer(*this,transform);
119 }
Transformer transform(LinearTransform const &transform)
Definition: Transformer.h:117
BaseCore::Transformer const lsst::afw::geom::ellipses::BaseCore::transform ( LinearTransform const &  transform) const
inline

Definition at line 121 of file Transformer.h.

121  {
122  return BaseCore::Transformer(const_cast<BaseCore &>(*this),transform);
123 }
Transformer transform(LinearTransform const &transform)
Definition: Transformer.h:117
virtual void lsst::afw::geom::ellipses::BaseCore::writeParameters ( double *  iter) const
pure virtual

Friends And Related Function Documentation

friend class Parametric
friend

Definition at line 193 of file BaseCore.h.


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