Class SipForwardTransform

Inheritance Relationships

Base Type

Class Documentation

class SipForwardTransform : public lsst::meas::astrom::SipTransformBase

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

The SIP forward transform is defined as

[xy]=Z[(uu0)+2p+qNp,qAp,q(uu0)p(vv0)q(vv0)+2p+qNp,qBp,q(uu0)p(vv0)q]
where
  • (u,v) are pixel coordinates (zero-indexed).

  • (x,y) are “intermediate world coordinates” the result of applying the gnomonic (TAN) projection at sky origin CRVAL to sky coordinates).

  • Z is the 2×2 linear transform ( CD) matrix.

  • (u0,v0) is the pixel origin CRPIX (but zero-indexed; the FITS standard is 1-indexed).

  • A, B are the polynomial coefficients of the forward transform.

The SIP convention encourages (but does not require) nulling the zeroth- and first-order elements of A and 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.

Public Functions

SipForwardTransform(geom::Point2D const &pixelOrigin, geom::LinearTransform const &cdMatrix, PolynomialTransform const &forwardSipPoly)

Construct a SipForwardTransform from its components.

Parameters
  • [in] pixelOrigin: CRPIX (u0,v0) (zero-indexed).

  • [in] cdMatrix: CD matrix Z

  • [in] forwardSipPoly: Polynomial transform (A,B)

SipForwardTransform(SipForwardTransform const &other)
SipForwardTransform(SipForwardTransform &&other)
SipForwardTransform &operator=(SipForwardTransform const &other)
SipForwardTransform &operator=(SipForwardTransform &&other)
void swap(SipForwardTransform &other)
geom::AffineTransform linearize(geom::Point2D const &in) const

Return an approximate affine transform at the given point.

geom::Point2D operator()(geom::Point2D const &uv) const

Apply the transform to a point.

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.

Public Static Functions

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

Convert a PolynomialTransform to an equivalent SipForwardTransform.

Parameters
  • [in] poly: PolynomialTransform to convert.

  • [in] pixelOrigin: CRPIX (u0,v0) (zero-indexed)

  • [in] cdMatrix: CD matrix Z

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

Convert a ScaledPolynomialTransform to an equivalent SipForwardTransform.

Parameters
  • [in] scaled: ScaledPolynomialTransform to convert.

  • [in] pixelOrigin: CRPIX (u0,v0) (zero-indexed)

  • [in] cdMatrix: CD matrix Z

static SipForwardTransform convert(ScaledPolynomialTransform const &scaled)

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