lsst.meas.astrom gaab3d2dbd9+48d144e037
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lsst::meas::astrom::SipForwardTransform Class Reference

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

#include <SipTransform.h>

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

Public Member Functions

 SipForwardTransform (geom::Point2D const &pixelOrigin, geom::LinearTransform const &cdMatrix, PolynomialTransform const &forwardSipPoly)
 Construct a SipForwardTransform from its components. More...
 
 SipForwardTransform (SipForwardTransform const &other)=default
 
 SipForwardTransform (SipForwardTransform &&other)=default
 
SipForwardTransformoperator= (SipForwardTransform const &other)=default
 
SipForwardTransformoperator= (SipForwardTransform &&other)=default
 
void swap (SipForwardTransform &other)
 
geom::AffineTransform linearize (geom::Point2D const &in) const
 Return an approximate affine transform at the given point. More...
 
geom::Point2D operator() (geom::Point2D const &uv) const
 Apply the transform to a point. More...
 
SipForwardTransform transformPixels (geom::AffineTransform const &s) const
 Return a new forward SIP transform that includes a transformation of the pixel coordinate system by the given affine transform. More...
 
geom::Point2D const & getPixelOrigin () const
 Return the pixel origin (CRPIX, but zero-indexed) of the transform. More...
 
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 SipForwardTransform convert (PolynomialTransform const &poly, geom::Point2D const &pixelOrigin, geom::LinearTransform const &cdMatrix)
 Convert a PolynomialTransform to an equivalent SipForwardTransform. More...
 
static SipForwardTransform convert (ScaledPolynomialTransform const &scaled, geom::Point2D const &pixelOrigin, geom::LinearTransform const &cdMatrix)
 Convert a ScaledPolynomialTransform to an equivalent SipForwardTransform. More...
 
static SipForwardTransform convert (ScaledPolynomialTransform const &scaled)
 Convert a ScaledPolynomialTransform to an equivalent SipForwardTransform. More...
 

Protected Member Functions

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

Protected Attributes

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

Detailed Description

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

The SIP forward transform is defined as

\[ \left[\begin{array}{ c } x \\ y \end{array}\right] = \mathbf{Z} \left[\begin{array}{ c } (u - u_0) + {\displaystyle\sum_{p,q}^{2 \le p + q \le N}} \mathrm{A}_{p,q} (u-u_0)^p (v-v_0)^q \\ (v - v_0) + {\displaystyle\sum_{p,q}^{2 \le p + q \le N}} \mathrm{B}_{p,q} (u-u_0)^p (v-v_0)^q \end{array}\right] \]

where

The SIP convention encourages (but does not require) nulling the zeroth- and first-order elements of \(\mathrm{A}\) and \(\mathrm{B}\), which ensures the representation of a given transform is unique. This also makes fitting a SIP transform to data a nonlinear operation, as well as making the conversion from standard polynomial transforms to SIP form impossible in general. Accordingly, this class does not attempt to null low-order polynomial terms at all when converting from other transforms.

SipForwardTransform instances should be confined to a single thread.

Definition at line 136 of file SipTransform.h.

Constructor & Destructor Documentation

◆ SipForwardTransform() [1/3]

lsst::meas::astrom::SipForwardTransform::SipForwardTransform ( geom::Point2D const &  pixelOrigin,
geom::LinearTransform const &  cdMatrix,
PolynomialTransform const &  forwardSipPoly 
)
inline

Construct a SipForwardTransform from its components.

Parameters
[in]pixelOriginCRPIX \((u_0,v_0)\) (zero-indexed).
[in]cdMatrixCD matrix \(Z\)
[in]forwardSipPolyPolynomial transform \((A,B)\)

Definition at line 175 of file SipTransform.h.

◆ SipForwardTransform() [2/3]

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

◆ SipForwardTransform() [3/3]

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

Member Function Documentation

◆ convert() [1/3]

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

Convert a PolynomialTransform to an equivalent SipForwardTransform.

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

Definition at line 52 of file SipTransform.cc.

◆ convert() [2/3]

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

Convert a ScaledPolynomialTransform to an equivalent SipForwardTransform.

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

Definition at line 79 of file SipTransform.cc.

◆ convert() [3/3]

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

Convert a ScaledPolynomialTransform to an equivalent SipForwardTransform.

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

Definition at line 65 of file SipTransform.cc.

◆ getCdMatrix()

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

Return the CD matrix of the transform.

Definition at line 56 of file SipTransform.h.

◆ getPixelOrigin()

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

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

Definition at line 51 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 61 of file SipTransform.h.

◆ linearize()

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

Return an approximate affine transform at the given point.

Definition at line 85 of file SipTransform.cc.

◆ operator()()

geom::Point2D lsst::meas::astrom::SipForwardTransform::operator() ( geom::Point2D const &  uv) const

Apply the transform to a point.

Definition at line 90 of file SipTransform.cc.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ swap() [1/2]

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

Definition at line 187 of file SipTransform.h.

◆ swap() [2/2]

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

Definition at line 85 of file SipTransform.h.

◆ transformPixels()

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

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

Definition at line 95 of file SipTransform.cc.

◆ transformPixelsInPlace()

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

Definition at line 40 of file SipTransform.cc.

Member Data Documentation

◆ _cdMatrix

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

Definition at line 94 of file SipTransform.h.

◆ _pixelOrigin

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

Definition at line 93 of file SipTransform.h.

◆ _poly

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

Definition at line 95 of file SipTransform.h.


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