LSSTApplications  19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
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) {}

◆ 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  }

◆ 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 }

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:
lsst::meas::astrom::SipTransformBase::getPoly
PolynomialTransform const & getPoly() const
Return the polynomial component of the transform (A,B) or (AP,BP).
Definition: SipTransform.h:61
lsst::meas::astrom::SipTransformBase::_pixelOrigin
geom::Point2D _pixelOrigin
Definition: SipTransform.h:93
lsst::meas::astrom::SipTransformBase::_poly
PolynomialTransform _poly
Definition: SipTransform.h:95
other
ItemVariant const * other
Definition: Schema.cc:56
std::swap
T swap(T... args)
lsst::geom::polynomials
Definition: Basis1d.h:26
lsst::meas::astrom::SipTransformBase::_cdMatrix
geom::LinearTransform _cdMatrix
Definition: SipTransform.h:94
lsst::meas::astrom::PolynomialTransform::swap
void swap(PolynomialTransform &other)
Lightweight swap.
Definition: PolynomialTransform.cc:122
lsst::meas::astrom::compose
PolynomialTransform compose(geom::AffineTransform const &t1, PolynomialTransform const &t2)
Return a PolynomialTransform that is equivalent to the composition t1(t2())
Definition: PolynomialTransform.cc:214