LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lsst::meas::astrom::SipTransformBase Class Reference

Base class for SIP transform objects. More...

#include <SipTransform.h>

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

Public Member Functions

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

Protected Member Functions

 SipTransformBase (geom::Point2D const &pixelOrigin, geom::LinearTransform const &cdMatrix, PolynomialTransform const &poly)
 Construct a SipTransformBase from its components. More...
 
 SipTransformBase (SipTransformBase const &other)=default
 
 SipTransformBase (SipTransformBase &&other)=default
 
SipTransformBaseoperator= (SipTransformBase const &other)=default
 
SipTransformBaseoperator= (SipTransformBase &&other)=default
 
void swap (SipTransformBase &other)
 
void transformPixelsInPlace (geom::AffineTransform const &s)
 

Protected Attributes

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

Detailed Description

Base class for SIP transform objects.

This class simply provides some getters for its derived classes. It should not be used directly, and does not define a polymorphic interface.

Definition at line 46 of file SipTransform.h.

Constructor & Destructor Documentation

◆ SipTransformBase() [1/3]

lsst::meas::astrom::SipTransformBase::SipTransformBase ( geom::Point2D const &  pixelOrigin,
geom::LinearTransform const &  cdMatrix,
PolynomialTransform const &  poly 
)
inlineprotected

Construct a SipTransformBase from its components.

See SipForwardTransform and SipReverseTransform for more extensive definitions.

Parameters
[in]pixelOriginCRPIX \((u_0,v_0)\) (zero-indexed)
[in]cdMatrixCD matrix \(Z\)
[in]polyEither the forward or reverse SIP polynomial (depending on the derived class).

Definition at line 76 of file SipTransform.h.

78  : _pixelOrigin(pixelOrigin), _cdMatrix(cdMatrix), _poly(poly) {}
geom::LinearTransform _cdMatrix
Definition: SipTransform.h:94
Low-level polynomials (including special polynomials) in C++.
Definition: Basis1d.h:26

◆ SipTransformBase() [2/3]

lsst::meas::astrom::SipTransformBase::SipTransformBase ( SipTransformBase const &  other)
protecteddefault

◆ SipTransformBase() [3/3]

lsst::meas::astrom::SipTransformBase::SipTransformBase ( SipTransformBase &&  other)
protecteddefault

Member Function Documentation

◆ getCdMatrix()

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

Return the CD matrix of the transform.

Definition at line 56 of file SipTransform.h.

56 { return _cdMatrix; }

◆ getPixelOrigin()

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

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

Definition at line 51 of file SipTransform.h.

51 { return _pixelOrigin; }

◆ getPoly()

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

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

Definition at line 61 of file SipTransform.h.

61 { return _poly; }

◆ operator=() [1/2]

SipTransformBase& lsst::meas::astrom::SipTransformBase::operator= ( SipTransformBase &&  other)
protecteddefault

◆ operator=() [2/2]

SipTransformBase& lsst::meas::astrom::SipTransformBase::operator= ( SipTransformBase const &  other)
protecteddefault

◆ swap()

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

Definition at line 85 of file SipTransform.h.

85  {
86  std::swap(_pixelOrigin, other._pixelOrigin);
87  std::swap(_cdMatrix, other._cdMatrix);
88  _poly.swap(other._poly);
89  }
void swap(PolynomialTransform &other)
Lightweight swap.
T swap(T... args)

◆ transformPixelsInPlace()

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

Definition at line 40 of file SipTransform.cc.

40  {
41  // The implementation for transformPixels is identical for
42  // SipForwardTransform and SipReverseTransform. That's pretty obvious for
43  // the pixel origin and CD matrix, which are the same in both cases, but
44  // it wasn't obvious to me until I did the math that the polynomial
45  // transforms are composed with the affine transform the same way.
46  auto sInv = s.inverted();
47  _pixelOrigin = s.getLinear()(_pixelOrigin - sInv.getTranslation());
48  _cdMatrix = _cdMatrix * sInv.getLinear();
49  _poly = compose(s.getLinear(), compose(getPoly(), sInv.getLinear()));
50 }
PolynomialTransform const & getPoly() const
Return the polynomial component of the transform (A,B) or (AP,BP).
Definition: SipTransform.h:61
PolynomialTransform compose(geom::AffineTransform const &t1, PolynomialTransform const &t2)
Return a PolynomialTransform that is equivalent to the composition t1(t2())

Member Data Documentation

◆ _cdMatrix

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

Definition at line 94 of file SipTransform.h.

◆ _pixelOrigin

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

Definition at line 93 of file SipTransform.h.

◆ _poly

PolynomialTransform lsst::meas::astrom::SipTransformBase::_poly
protected

Definition at line 95 of file SipTransform.h.


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