lsst.meas.astrom
13.0-14-g9415442+11
|
A transform that maps pixel coordinates to intermediate world coordinates according to the SIP convention. More...
#include <SipTransform.h>
Public Member Functions | |
SipForwardTransform (afw::geom::Point2D const &pixelOrigin, afw::geom::LinearTransform const &cdMatrix, PolynomialTransform const &forwardSipPoly) | |
Construct a SipForwardTransform from its components. More... | |
SipForwardTransform (SipForwardTransform const &other)=default | |
SipForwardTransform (SipForwardTransform &&other)=default | |
SipForwardTransform & | operator= (SipForwardTransform const &other)=default |
SipForwardTransform & | operator= (SipForwardTransform &&other)=default |
void | swap (SipForwardTransform &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 &uv) const |
Apply the transform to a point. More... | |
SipForwardTransform | transformPixels (afw::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... | |
![]() | |
afw::geom::Point2D const & | getPixelOrigin () const |
Return the pixel origin (CRPIX) 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 SipForwardTransform | convert (PolynomialTransform const &poly, afw::geom::Point2D const &pixelOrigin, afw::geom::LinearTransform const &cdMatrix) |
Convert a PolynomialTransform to an equivalent SipForwardTransform. More... | |
static SipForwardTransform | convert (ScaledPolynomialTransform const &scaled, afw::geom::Point2D const &pixelOrigin, afw::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... | |
static SipForwardTransform | extract (afw::image::TanWcs const &wcs) |
Extract the reverse transform from a TanWcs. More... | |
Additional Inherited Members | |
![]() | |
SipTransformBase (afw::geom::Point2D const &pixelOrigin, afw::geom::LinearTransform const &cdMatrix, PolynomialTransform const &poly) | |
Construct a SipTransformBase from its components. More... | |
SipTransformBase (SipTransformBase const &other)=default | |
SipTransformBase (SipTransformBase &&other)=default | |
SipTransformBase & | operator= (SipTransformBase const &other)=default |
SipTransformBase & | operator= (SipTransformBase &&other)=default |
void | swap (SipTransformBase &other) |
void | transformPixelsInPlace (afw::geom::AffineTransform const &s) |
![]() | |
afw::geom::Point2D | _pixelOrigin |
afw::geom::LinearTransform | _cdMatrix |
PolynomialTransform | _poly |
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 155 of file SipTransform.h.
|
inline |
Construct a SipForwardTransform from its components.
[in] | pixelOrigin | CRPIX \((u_0,v_0)\) (zero-indexed). |
[in] | cdMatrix | CD matrix \(Z\) |
[in] | forwardSipPoly | Polynomial transform \((A,B)\) |
Definition at line 205 of file SipTransform.h.
|
default |
|
default |
|
static |
Convert a PolynomialTransform to an equivalent SipForwardTransform.
[in] | poly | PolynomialTransform to convert. |
[in] | pixelOrigin | CRPIX \((u_0,v_0)\) (zero-indexed) |
[in] | cdMatrix | CD matrix \(Z\) |
Definition at line 45 of file SipTransform.cc.
|
static |
Convert a ScaledPolynomialTransform to an equivalent SipForwardTransform.
[in] | scaled | ScaledPolynomialTransform to convert. |
[in] | pixelOrigin | CRPIX \((u_0,v_0)\) (zero-indexed) |
[in] | cdMatrix | CD matrix \(Z\) |
Definition at line 65 of file SipTransform.cc.
|
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 84 of file SipTransform.cc.
|
static |
Extract the reverse transform from a TanWcs.
Definition at line 90 of file SipTransform.cc.
afw::geom::AffineTransform lsst::meas::astrom::SipForwardTransform::linearize | ( | afw::geom::Point2D const & | in | ) | const |
Return an approximate affine transform at the given point.
Definition at line 108 of file SipTransform.cc.
afw::geom::Point2D lsst::meas::astrom::SipForwardTransform::operator() | ( | afw::geom::Point2D const & | uv | ) | const |
Apply the transform to a point.
Definition at line 115 of file SipTransform.cc.
|
default |
|
default |
|
inline |
Definition at line 221 of file SipTransform.h.
SipForwardTransform lsst::meas::astrom::SipForwardTransform::transformPixels | ( | afw::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 120 of file SipTransform.cc.