LSST Applications g0265f82a02+c6dfa2ddaf,g1162b98a3f+b2075782a9,g2079a07aa2+1b2e822518,g2bbee38e9b+c6dfa2ddaf,g337abbeb29+c6dfa2ddaf,g3ddfee87b4+a60788ef87,g50ff169b8f+2eb0e556e8,g52b1c1532d+90ebb246c7,g555ede804d+a60788ef87,g591dd9f2cf+ba8caea58f,g5ec818987f+864ee9cddb,g858d7b2824+9ee1ab4172,g876c692160+a40945ebb7,g8a8a8dda67+90ebb246c7,g8cdfe0ae6a+4fd9e222a8,g99cad8db69+5e309b7bc6,g9ddcbc5298+a1346535a5,ga1e77700b3+df8f93165b,ga8c6da7877+aa12a14d27,gae46bcf261+c6dfa2ddaf,gb0e22166c9+8634eb87fb,gb3f2274832+d0da15e3be,gba4ed39666+1ac82b564f,gbb8dafda3b+5dfd9c994b,gbeb006f7da+97157f9740,gc28159a63d+c6dfa2ddaf,gc86a011abf+9ee1ab4172,gcf0d15dbbd+a60788ef87,gdaeeff99f8+1cafcb7cd4,gdc0c513512+9ee1ab4172,ge79ae78c31+c6dfa2ddaf,geb67518f79+ba1859f325,geb961e4c1e+f9439d1e6f,gee10cc3b42+90ebb246c7,gf1cff7945b+9ee1ab4172,w.2024.12
LSST Data Management Base Package
Loading...
Searching...
No Matches
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.
 
geom::LinearTransform const & getCdMatrix () const
 Return the CD matrix of the transform.
 
PolynomialTransform const & getPoly () const
 Return the polynomial component of the transform (A,B) or (AP,BP).
 

Protected Member Functions

 SipTransformBase (geom::Point2D const &pixelOrigin, geom::LinearTransform const &cdMatrix, PolynomialTransform const &poly)
 Construct a SipTransformBase from its components.
 
 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) {}
Low-level polynomials (including special polynomials) in C++.

◆ 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).
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: