lsst.meas.astrom  14.0-7-g0d69b06+3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
lsst::meas::astrom::SipReverseTransform Class Reference

A transform that maps intermediate world coordinates to pixel coordinates according to the SIP convention. More...

#include <SipTransform.h>

Inheritance diagram for lsst::meas::astrom::SipReverseTransform:
lsst::meas::astrom::SipTransformBase

Public Member Functions

 SipReverseTransform (afw::geom::Point2D const &pixelOrigin, afw::geom::LinearTransform const &cdMatrix, PolynomialTransform const &reverseSipPoly)
 Construct a SipReverseTransform from its components. More...
 
 SipReverseTransform (SipReverseTransform const &other)=default
 
 SipReverseTransform (SipReverseTransform &&other)=default
 
SipReverseTransformoperator= (SipReverseTransform const &other)=default
 
SipReverseTransformoperator= (SipReverseTransform &&other)=default
 
void swap (SipReverseTransform &other)
 
afw::geom::AffineTransform linearize (afw::geom::Point2D const &in) const
 Return an approximate affine transform at the given point. More...
 
afw::geom::Point2D operator() (afw::geom::Point2D const &xy) const
 Apply the transform to a point. More...
 
SipReverseTransform transformPixels (afw::geom::AffineTransform const &s) const
 Return a new reverse SIP transform that includes a transformation of the pixel coordinate system by the given affine transform. More...
 
afw::geom::Point2D const & getPixelOrigin () const
 Return the pixel origin (CRPIX, but zero-indexed) of the transform. More...
 
afw::geom::LinearTransform const & getCdMatrix () const
 Return the CD matrix of the transform. More...
 
PolynomialTransform const & getPoly () const
 Return the polynomial component of the transform (A,B) or (AP,BP). More...
 

Static Public Member Functions

static SipReverseTransform convert (PolynomialTransform const &poly, afw::geom::Point2D const &pixelOrigin, afw::geom::LinearTransform const &cdMatrix)
 Convert a PolynomialTransform to an equivalent SipReverseTransform. More...
 
static SipReverseTransform convert (ScaledPolynomialTransform const &scaled, afw::geom::Point2D const &pixelOrigin, afw::geom::LinearTransform const &cdMatrix)
 Convert a ScaledPolynomialTransform to an equivalent SipReverseTransform. More...
 
static SipReverseTransform convert (ScaledPolynomialTransform const &scaled)
 Convert a ScaledPolynomialTransform to an equivalent SipReverseTransform. More...
 

Protected Member Functions

void swap (SipTransformBase &other)
 
void transformPixelsInPlace (afw::geom::AffineTransform const &s)
 

Protected Attributes

afw::geom::Point2D _pixelOrigin
 
afw::geom::LinearTransform _cdMatrix
 
PolynomialTransform _poly
 

Friends

class PolynomialTransform
 
class ScaledPolynomialTransform
 

Detailed Description

A transform that maps intermediate world coordinates to pixel coordinates according to the SIP convention.

The SIP reverse transform is defined as

\[ \left[\begin{array}{ c } u \\ v \end{array}\right] = \left[\begin{array}{ c } u_0 + U + {\displaystyle\sum_{p,q}^{0 \le p + q \le N}} \mathrm{AP}_{p,q} U^p V^q \\ v_0 + V + {\displaystyle\sum_{p,q}^{0 \le p + q \le N}} \mathrm{BP}_{p,q} U^p V^q \\ \end{array}\right] \]

with

\[ \left[\begin{array}{ c } U \\ V \end{array}\right] = \mathbf{Z}^{-1} \left[\begin{array}{ c } x \\ y \end{array}\right] \]

and

SipForwardTransform instances should be confined to a single thread.

Definition at line 274 of file SipTransform.h.

Constructor & Destructor Documentation

◆ SipReverseTransform() [1/3]

lsst::meas::astrom::SipReverseTransform::SipReverseTransform ( afw::geom::Point2D const &  pixelOrigin,
afw::geom::LinearTransform const &  cdMatrix,
PolynomialTransform const &  reverseSipPoly 
)
inline

Construct a SipReverseTransform from its components.

Parameters
[in]pixelOriginCRPIX \((u_0,v_0)\) (zero-indexed)
[in]cdMatrixCD matrix \(Z\)
[in]reverseSipPolyPolynomial transform \((AP,BP)\)

Definition at line 319 of file SipTransform.h.

◆ SipReverseTransform() [2/3]

lsst::meas::astrom::SipReverseTransform::SipReverseTransform ( SipReverseTransform const &  other)
default

◆ SipReverseTransform() [3/3]

lsst::meas::astrom::SipReverseTransform::SipReverseTransform ( SipReverseTransform &&  other)
default

Member Function Documentation

◆ convert() [1/3]

SipReverseTransform lsst::meas::astrom::SipReverseTransform::convert ( PolynomialTransform const &  poly,
afw::geom::Point2D const &  pixelOrigin,
afw::geom::LinearTransform const &  cdMatrix 
)
static

Convert a PolynomialTransform to an equivalent SipReverseTransform.

Parameters
[in]polyPolynomialTransform to convert.
[in]pixelOriginCRPIX \((u_0,v_0)\) (zero-indexed)
[in]cdMatrixCD matrix \(Z\)

Definition at line 109 of file SipTransform.cc.

◆ convert() [2/3]

SipReverseTransform lsst::meas::astrom::SipReverseTransform::convert ( ScaledPolynomialTransform const &  scaled,
afw::geom::Point2D const &  pixelOrigin,
afw::geom::LinearTransform const &  cdMatrix 
)
static

Convert a ScaledPolynomialTransform to an equivalent SipReverseTransform.

Parameters
[in]scaledScaledPolynomialTransform to convert.
[in]pixelOriginCRPIX \((u_0,v_0)\) (zero-indexed)
[in]cdMatrixCD matrix \(Z\)

Definition at line 128 of file SipTransform.cc.

◆ convert() [3/3]

SipReverseTransform lsst::meas::astrom::SipReverseTransform::convert ( ScaledPolynomialTransform const &  scaled)
static

Convert a ScaledPolynomialTransform to an equivalent SipReverseTransform.

The pixel origin CRPIX and CD matrix are defined to reproduce the translation and linear transformation in the ScaledPolynomialTransforms output and input scalings (respectively).

Definition at line 148 of file SipTransform.cc.

◆ getCdMatrix()

afw::geom::LinearTransform const& lsst::meas::astrom::SipTransformBase::getCdMatrix ( ) const
inlineinherited

Return the CD matrix of the transform.

Definition at line 63 of file SipTransform.h.

◆ getPixelOrigin()

afw::geom::Point2D const& lsst::meas::astrom::SipTransformBase::getPixelOrigin ( ) const
inlineinherited

Return the pixel origin (CRPIX, but zero-indexed) of the transform.

Definition at line 58 of file SipTransform.h.

◆ getPoly()

PolynomialTransform const& lsst::meas::astrom::SipTransformBase::getPoly ( ) const
inlineinherited

Return the polynomial component of the transform (A,B) or (AP,BP).

Definition at line 68 of file SipTransform.h.

◆ linearize()

afw::geom::AffineTransform lsst::meas::astrom::SipReverseTransform::linearize ( afw::geom::Point2D const &  in) const

Return an approximate affine transform at the given point.

Definition at line 163 of file SipTransform.cc.

◆ operator()()

afw::geom::Point2D lsst::meas::astrom::SipReverseTransform::operator() ( afw::geom::Point2D const &  xy) const

Apply the transform to a point.

Definition at line 169 of file SipTransform.cc.

◆ operator=() [1/2]

SipReverseTransform& lsst::meas::astrom::SipReverseTransform::operator= ( SipReverseTransform const &  other)
default

◆ operator=() [2/2]

SipReverseTransform& lsst::meas::astrom::SipReverseTransform::operator= ( SipReverseTransform &&  other)
default

◆ swap() [1/2]

void lsst::meas::astrom::SipTransformBase::swap ( SipTransformBase other)
inlineprotectedinherited

Definition at line 98 of file SipTransform.h.

◆ swap() [2/2]

void lsst::meas::astrom::SipReverseTransform::swap ( SipReverseTransform other)
inline

Definition at line 335 of file SipTransform.h.

◆ transformPixels()

SipReverseTransform lsst::meas::astrom::SipReverseTransform::transformPixels ( afw::geom::AffineTransform const &  s) const

Return a new reverse SIP transform that includes a transformation of the pixel coordinate system by the given affine transform.

Definition at line 156 of file SipTransform.cc.

◆ transformPixelsInPlace()

void lsst::meas::astrom::SipTransformBase::transformPixelsInPlace ( afw::geom::AffineTransform const &  s)
protectedinherited

Definition at line 34 of file SipTransform.cc.

Friends And Related Function Documentation

◆ PolynomialTransform

friend class PolynomialTransform
friend

Definition at line 357 of file SipTransform.h.

◆ ScaledPolynomialTransform

friend class ScaledPolynomialTransform
friend

Definition at line 358 of file SipTransform.h.

Member Data Documentation

◆ _cdMatrix

afw::geom::LinearTransform lsst::meas::astrom::SipTransformBase::_cdMatrix
protectedinherited

Definition at line 107 of file SipTransform.h.

◆ _pixelOrigin

afw::geom::Point2D lsst::meas::astrom::SipTransformBase::_pixelOrigin
protectedinherited

Definition at line 106 of file SipTransform.h.

◆ _poly

PolynomialTransform lsst::meas::astrom::SipTransformBase::_poly
protectedinherited

Definition at line 108 of file SipTransform.h.


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