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
Public Member Functions | Static Public Member Functions | 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 Member Functions

 RadialXYTransform (std::vector< double > const &coeffs)
 
virtual boost::shared_ptr
< XYTransform
clone () const
 returns a deep copy More...
 
virtual boost::shared_ptr
< XYTransform
invert () const
 returns a "deep inverse" in this sense that the forward+inverse transforms do not share state 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
 
std::vector< double > getCoeffs () const
 
- Public Member Functions inherited from lsst::afw::geom::XYTransform
 XYTransform ()
 
virtual ~XYTransform ()
 
- Public Member Functions inherited from lsst::daf::base::Citizen
 Citizen (const std::type_info &)
 
 Citizen (Citizen const &)
 
 ~Citizen ()
 
Citizenoperator= (Citizen const &)
 
std::string repr () const
 Return a string representation of a Citizen. More...
 
void markPersistent (void)
 Mark a Citizen as persistent and not destroyed until process end. More...
 
memId getId () const
 Return the Citizen's ID. More...
 

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 Public Member Functions inherited from lsst::daf::base::Citizen
static bool hasBeenCorrupted ()
 Check all allocated blocks for corruption. More...
 
static memId getNextMemId ()
 Return the memId of the next object to be allocated. More...
 
static int init ()
 Called once when the memory system is being initialised. More...
 
static int census (int, memId startingMemId=0)
 How many active Citizens are there? More...
 
static void census (std::ostream &stream, memId startingMemId=0)
 Print a list of all active Citizens to stream, sorted by ID. More...
 
static const std::vector
< const Citizen * > * 
census ()
 Return a (newly allocated) std::vector of active Citizens sorted by ID. More...
 
static memId setNewCallbackId (memId id)
 Call the NewCallback when block is allocated. More...
 
static memId setDeleteCallbackId (memId id)
 Call the current DeleteCallback when block is deleted. More...
 
static memNewCallback setNewCallback (memNewCallback func)
 Set the NewCallback function. More...
 
static memCallback setDeleteCallback (memCallback func)
 Set the DeleteCallback function. More...
 
static memCallback setCorruptionCallback (memCallback func)
 Set the CorruptionCallback function. More...
 

Protected Attributes

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

Additional Inherited Members

- Public Types inherited from lsst::afw::geom::XYTransform
typedef afw::geom::Point2D Point2D
 
typedef afw::geom::AffineTransform AffineTransform
 
- Public Types inherited from lsst::daf::base::Citizen
enum  { magicSentinel = 0xdeadbeef }
 
typedef unsigned long memId
 Type of the block's ID. More...
 
typedef memId(* memNewCallback )(const memId cid)
 A function used to register a callback. More...
 
typedef memId(* memCallback )(const Citizen *ptr)
 

Detailed Description

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

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 186 of file XYTransform.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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

returns a deep copy

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

virtual 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.

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

Definition at line 201 of file XYTransform.h.

201 { return _coeffs; }
std::vector< double > _coeffs
Definition: XYTransform.h:231
virtual boost::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

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

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

linearized forward and reversed transforms

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);

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

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

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

static AffineTransform lsst::afw::geom::RadialXYTransform::makeAffineTransform ( double  x,
double  y,
double  f,
double  g 
)
static
static double lsst::afw::geom::RadialXYTransform::polyEval ( std::vector< double > const &  coeffs,
double  x 
)
static
static Point2D lsst::afw::geom::RadialXYTransform::polyEval ( std::vector< double > const &  coeffs,
Point2D const &  p 
)
static
static double lsst::afw::geom::RadialXYTransform::polyEvalDeriv ( std::vector< double > const &  coeffs,
double  x 
)
static
static double lsst::afw::geom::RadialXYTransform::polyEvalInverse ( std::vector< double > const &  coeffs,
std::vector< double > const &  icoeffs,
double  x 
)
static
static Point2D lsst::afw::geom::RadialXYTransform::polyEvalInverse ( std::vector< double > const &  coeffs,
std::vector< double > const &  icoeffs,
Point2D const &  p 
)
static
static AffineTransform lsst::afw::geom::RadialXYTransform::polyEvalInverseJacobian ( std::vector< double > const &  coeffs,
std::vector< double > const &  icoeffs,
Point2D const &  p 
)
static
static AffineTransform lsst::afw::geom::RadialXYTransform::polyEvalJacobian ( std::vector< double > const &  coeffs,
Point2D const &  p 
)
static
static 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.

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

Member Data Documentation

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

Definition at line 231 of file XYTransform.h.

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

Definition at line 232 of file XYTransform.h.


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