lsst.afw  15.0-16-g953e39cab
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
lsst::afw::geom::RadialXYTransform Class Reference

A purely radial polynomial distortion, up to 6th order. More...

#include <XYTransform.h>

Inheritance diagram for lsst::afw::geom::RadialXYTransform:
lsst::afw::geom::XYTransform lsst::daf::base::Citizen

Public Types

typedef afw::geom::Point2D Point2D
 
typedef afw::geom::AffineTransform AffineTransform
 
typedef unsigned long memId
 
typedef memId(* memNewCallback) (const memId cid)
 
typedef memId(* memCallback) (const Citizen *ptr)
 

Public Member Functions

 RadialXYTransform (std::vector< double > const &coeffs)
 
 RadialXYTransform (RadialXYTransform const &)
 
 RadialXYTransform (RadialXYTransform &&)
 
RadialXYTransform & operator= (RadialXYTransform const &)
 
RadialXYTransform & operator= (RadialXYTransform &&)
 
 ~RadialXYTransform ()
 
virtual std::shared_ptr< XYTransform > clone () const
 returns a deep copy More...
 
virtual std::shared_ptr< XYTransform > invert () const
 returns a "deep inverse" in this sense that the forward+inverse transforms do not share state default implementation; subclass may override More...
 
virtual Point2D forwardTransform (Point2D const &point) const
 virtuals for forward and reverse transforms More...
 
virtual Point2D reverseTransform (Point2D const &point) const
 
virtual AffineTransform linearizeForwardTransform (Point2D const &point) const
 linearized forward and reversed transforms More...
 
virtual AffineTransform linearizeReverseTransform (Point2D const &point) const
 default implementation; subclass may override More...
 
std::vector< double > getCoeffs () const
 
std::string repr () const
 
void markPersistent (void)
 
memId getId () const
 

Static Public Member Functions

static std::vector< double > polyInvert (std::vector< double > const &coeffs)
 These static member functions operate on polynomials represented by vector<double>. More...
 
static double polyEval (std::vector< double > const &coeffs, double x)
 
static Point2D polyEval (std::vector< double > const &coeffs, Point2D const &p)
 
static double polyEvalDeriv (std::vector< double > const &coeffs, double x)
 
static AffineTransform polyEvalJacobian (std::vector< double > const &coeffs, Point2D const &p)
 
static double polyEvalInverse (std::vector< double > const &coeffs, std::vector< double > const &icoeffs, double x)
 
static Point2D polyEvalInverse (std::vector< double > const &coeffs, std::vector< double > const &icoeffs, Point2D const &p)
 
static AffineTransform polyEvalInverseJacobian (std::vector< double > const &coeffs, std::vector< double > const &icoeffs, Point2D const &p)
 
static AffineTransform makeAffineTransform (double x, double y, double f, double g)
 
static bool hasBeenCorrupted ()
 
static memId getNextMemId ()
 
static int init ()
 
static int census (int, memId startingMemId=0)
 
static void census (std::ostream &stream, memId startingMemId=0)
 
static const std::vector< const Citizen *> * census ()
 
static int census (int, memId startingMemId=0)
 
static void census (std::ostream &stream, memId startingMemId=0)
 
static const std::vector< const Citizen *> * census ()
 
static memId setNewCallbackId (memId id)
 
static memId setNewCallbackId (memId id)
 
static memId setDeleteCallbackId (memId id)
 
static memId setDeleteCallbackId (memId id)
 
static memNewCallback setNewCallback (memNewCallback func)
 
static memCallback setDeleteCallback (memCallback func)
 
static memCallback setCorruptionCallback (memCallback func)
 

Public Attributes

 magicSentinel
 

Protected Attributes

std::vector< double > _coeffs
 
std::vector< double > _icoeffs
 

Detailed Description

A purely radial polynomial distortion, up to 6th order.

Deprecated:
Deprecated in 14.0. Will be removed in 15.0; it is superseded by geom::makeRadialTransform.

forwardTransform(pt) = pt * scale where:

Warning
reverseTransform will fail if the polynomial is too far from linear (ticket #3152)
Exceptions
lsst::pex::exceptions::InvalidParameterErrorif coeffs.size() > 0 and any of the following are true: coeffs.size() == 1, coeffs[0] != 0 or coeffs[1] == 0

Definition at line 225 of file XYTransform.h.

Member Typedef Documentation

◆ AffineTransform

Definition at line 52 of file XYTransform.h.

◆ Point2D

Definition at line 51 of file XYTransform.h.

Constructor & Destructor Documentation

◆ RadialXYTransform() [1/3]

lsst::afw::geom::RadialXYTransform::RadialXYTransform ( std::vector< double > const &  coeffs)
Parameters
coeffsradial polynomial coefficients; if size == 0 then gives the identity transformation; otherwise must satisfy: size > 1, coeffs[0] == 0, and coeffs[1] != 0

Definition at line 37 of file RadialXYTransform.cc.

◆ RadialXYTransform() [2/3]

lsst::afw::geom::RadialXYTransform::RadialXYTransform ( RadialXYTransform const &  )
default

◆ RadialXYTransform() [3/3]

lsst::afw::geom::RadialXYTransform::RadialXYTransform ( RadialXYTransform &&  )
default

◆ ~RadialXYTransform()

lsst::afw::geom::RadialXYTransform::~RadialXYTransform ( )
default

Member Function Documentation

◆ clone()

std::shared_ptr< XYTransform > lsst::afw::geom::RadialXYTransform::clone ( ) const
virtual

returns a deep copy

Implements lsst::afw::geom::XYTransform.

Definition at line 62 of file RadialXYTransform.cc.

◆ forwardTransform()

Point2D lsst::afw::geom::RadialXYTransform::forwardTransform ( Point2D const &  point) const
virtual

virtuals for forward and reverse transforms

These routines are responsible for throwing exceptions if the 'point' arg is outside the domain of the transform.

Implements lsst::afw::geom::XYTransform.

Definition at line 70 of file RadialXYTransform.cc.

◆ getCoeffs()

std::vector<double> lsst::afw::geom::RadialXYTransform::getCoeffs ( ) const
inline

Definition at line 246 of file XYTransform.h.

◆ invert()

std::shared_ptr< XYTransform > lsst::afw::geom::RadialXYTransform::invert ( ) const
virtual

returns a "deep inverse" in this sense that the forward+inverse transforms do not share state default implementation; subclass may override

Reimplemented from lsst::afw::geom::XYTransform.

Definition at line 66 of file RadialXYTransform.cc.

◆ linearizeForwardTransform()

AffineTransform lsst::afw::geom::RadialXYTransform::linearizeForwardTransform ( Point2D const &  point) const
virtual

linearized forward and reversed transforms

Deprecated:
Deprecated in 14.0. Will be removed in 15.0; it is superseded by geom::linearizeTransform.

These are virtual but not pure virtual; there is a default implementation which calls forwardTransform() or reverseTransform() and takes finite differences with step size equal to one.

The following should always be satisfied for an arbitrary Point2D p (and analogously for the reverse transform) this->forwardTransform(p) == this->linearizeForwardTransform(p)(p);default implementation; subclass may override

Reimplemented from lsst::afw::geom::XYTransform.

Definition at line 76 of file RadialXYTransform.cc.

◆ linearizeReverseTransform()

AffineTransform lsst::afw::geom::RadialXYTransform::linearizeReverseTransform ( Point2D const &  point) const
virtual

default implementation; subclass may override

Reimplemented from lsst::afw::geom::XYTransform.

Definition at line 80 of file RadialXYTransform.cc.

◆ makeAffineTransform()

AffineTransform lsst::afw::geom::RadialXYTransform::makeAffineTransform ( double  x,
double  y,
double  f,
double  g 
)
static

Definition at line 220 of file RadialXYTransform.cc.

◆ operator=() [1/2]

RadialXYTransform & lsst::afw::geom::RadialXYTransform::operator= ( RadialXYTransform const &  )
default

◆ operator=() [2/2]

RadialXYTransform & lsst::afw::geom::RadialXYTransform::operator= ( RadialXYTransform &&  )
default

◆ polyEval() [1/2]

double lsst::afw::geom::RadialXYTransform::polyEval ( std::vector< double > const &  coeffs,
double  x 
)
static

Definition at line 136 of file RadialXYTransform.cc.

◆ polyEval() [2/2]

Point2D lsst::afw::geom::RadialXYTransform::polyEval ( std::vector< double > const &  coeffs,
Point2D const &  p 
)
static

Definition at line 145 of file RadialXYTransform.cc.

◆ polyEvalDeriv()

double lsst::afw::geom::RadialXYTransform::polyEvalDeriv ( std::vector< double > const &  coeffs,
double  x 
)
static

Definition at line 160 of file RadialXYTransform.cc.

◆ polyEvalInverse() [1/2]

double lsst::afw::geom::RadialXYTransform::polyEvalInverse ( std::vector< double > const &  coeffs,
std::vector< double > const &  icoeffs,
double  x 
)
static

Definition at line 176 of file RadialXYTransform.cc.

◆ polyEvalInverse() [2/2]

Point2D lsst::afw::geom::RadialXYTransform::polyEvalInverse ( std::vector< double > const &  coeffs,
std::vector< double > const &  icoeffs,
Point2D const &  p 
)
static

Definition at line 195 of file RadialXYTransform.cc.

◆ polyEvalInverseJacobian()

AffineTransform lsst::afw::geom::RadialXYTransform::polyEvalInverseJacobian ( std::vector< double > const &  coeffs,
std::vector< double > const &  icoeffs,
Point2D const &  p 
)
static

Definition at line 211 of file RadialXYTransform.cc.

◆ polyEvalJacobian()

AffineTransform lsst::afw::geom::RadialXYTransform::polyEvalJacobian ( std::vector< double > const &  coeffs,
Point2D const &  p 
)
static

Definition at line 169 of file RadialXYTransform.cc.

◆ polyInvert()

std::vector< double > lsst::afw::geom::RadialXYTransform::polyInvert ( std::vector< double > const &  coeffs)
static

These static member functions operate on polynomials represented by vector<double>.

They are intended mainly as helpers for the virtual member functions above, but are declared public since there are also some unit tests which call them.

Definition at line 95 of file RadialXYTransform.cc.

◆ reverseTransform()

Point2D lsst::afw::geom::RadialXYTransform::reverseTransform ( Point2D const &  point) const
virtual

Implements lsst::afw::geom::XYTransform.

Definition at line 72 of file RadialXYTransform.cc.

Member Data Documentation

◆ _coeffs

std::vector<double> lsst::afw::geom::RadialXYTransform::_coeffs
protected

Definition at line 273 of file XYTransform.h.

◆ _icoeffs

std::vector<double> lsst::afw::geom::RadialXYTransform::_icoeffs
protected

Definition at line 274 of file XYTransform.h.


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