File PolynomialTransform.h

namespace lsst

Class for a simple mapping implementing a generic AstrometryTransform.

Remove all non-astronomical counts from the Chunk Exposure’s pixels.

Forward declarations for lsst::utils::Cache

For details on the Cache class, see the Cache.h file.

It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.

A base class for image defects

Numeric constants used by the Integrate.h integrator routines.

Compute Image Statistics

Note

Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.

Note

The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.

namespace meas
namespace astrom

Functions

PolynomialTransform compose(geom::AffineTransform const &t1, PolynomialTransform const &t2)

Return a PolynomialTransform that is equivalent to the composition t1(t2())

The returned composition would be exact in ideal arithmetic, but may suffer from significant round-off error for high-order polynomials.

PolynomialTransform compose(PolynomialTransform const &t1, geom::AffineTransform const &t2)

Return a PolynomialTransform that is equivalent to the composition t1(t2())

The returned composition would be exact in ideal arithmetic, but may suffer from significant round-off error for high-order polynomials.

class PolynomialTransform
#include <PolynomialTransform.h>

A 2-d coordinate transform represented by a pair of standard polynomials (one for each coordinate).

PolynomialTransform instances should be confined to a single thread.

Public Functions

PolynomialTransform(ndarray::Array<double const, 2, 0> const &xCoeffs, ndarray::Array<double const, 2, 0> const &yCoeffs)

Construct a new transform from existing coefficient arrays.

For both input arguments, the array element at [p, q] corresponds to the polynomial term x^p y^q.

Both arrays are expected be square and triangular; if N is the order of the transform, both arrays should be (N+1)x(N+1), and elements with p + q > N should be zero.

PolynomialTransform(PolynomialTransform const &other)

Copy constructor.

Coefficient arrays are deep-copied.

PolynomialTransform(PolynomialTransform &&other)

Move constructor.

Coefficient arrays are moved.

PolynomialTransform &operator=(PolynomialTransform const &other)

Copy assignment.

Coefficient arrays are deep-copied.

PolynomialTransform &operator=(PolynomialTransform &&other)

Move constructor.

Coefficient arrays are moved.

void swap(PolynomialTransform &other)

Lightweight swap.

int getOrder() const

Return the order of the polynomials.

ndarray::Array<double const, 2, 2> getXCoeffs() const

2-D polynomial coefficients that compute the output x coordinate.

Indexing the result by [p][q] gives the coefficient of \(x_{\mathrm{in}}^p\,y_{\mathrm{in}}^q\).

ndarray::Array<double const, 2, 2> getYCoeffs() const

2-D polynomial coefficients that compute the output x coordinate.

Indexing the result by [p][q] gives the coefficient of \(x_{\mathrm{in}}^p\,y_{\mathrm{in}}^q\).

geom::AffineTransform linearize(geom::Point2D const &in) const

Return an approximate affine transform at the given point.

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

Apply the transform to a point.

Public Static Functions

static PolynomialTransform convert(ScaledPolynomialTransform const &other)

Convert a ScaledPolynomialTransform to an equivalent PolynomialTransform.

static PolynomialTransform convert(SipForwardTransform const &other)

Convert a SipForwardTransform to an equivalent PolynomialTransform.

static PolynomialTransform convert(SipReverseTransform const &other)

Convert a SipReverseTransform to an equivalent PolynomialTransform.

Private Functions

PolynomialTransform(int order)

Private Members

ndarray::Array<double, 2, 2> _xCoeffs
ndarray::Array<double, 2, 2> _yCoeffs
Eigen::VectorXd _u
Eigen::VectorXd _v

Friends

friend lsst::meas::astrom::ScaledPolynomialTransformFitter
friend lsst::meas::astrom::SipForwardTransform
friend lsst::meas::astrom::SipReverseTransform
friend lsst::meas::astrom::ScaledPolynomialTransform
PolynomialTransform compose(geom::AffineTransform const &t1, PolynomialTransform const &t2)

Return a PolynomialTransform that is equivalent to the composition t1(t2())

The returned composition would be exact in ideal arithmetic, but may suffer from significant round-off error for high-order polynomials.

PolynomialTransform compose(PolynomialTransform const &t1, geom::AffineTransform const &t2)

Return a PolynomialTransform that is equivalent to the composition t1(t2())

The returned composition would be exact in ideal arithmetic, but may suffer from significant round-off error for high-order polynomials.

class ScaledPolynomialTransform
#include <PolynomialTransform.h>

A 2-d coordinate transform represented by a lazy composition of an AffineTransform, a PolynomialTransform, and another AffineTransform.

ScaledPolynomialTransform instances should be confined to a single thread.

Public Functions

ScaledPolynomialTransform(PolynomialTransform const &poly, geom::AffineTransform const &inputScaling, geom::AffineTransform const &outputScalingInverse)

Construct a new ScaledPolynomialTransform from its constituents.

Parameters
  • [in] poly: A PolynomialTransform to be applied to points. after the inputScaling transform.

  • [in] inputScaling: An AffineTransform to be applied immediately to input points.

  • [in] outputScalingInverse: An AffineTransform to be applied to points after the PolynomialTransform.

ScaledPolynomialTransform(ScaledPolynomialTransform const &other)
ScaledPolynomialTransform(ScaledPolynomialTransform &&other)
ScaledPolynomialTransform &operator=(ScaledPolynomialTransform const &other)
ScaledPolynomialTransform &operator=(ScaledPolynomialTransform &&other)
void swap(ScaledPolynomialTransform &other)
PolynomialTransform const &getPoly() const

Return the polynomial transform applied after the input scaling.

geom::AffineTransform const &getInputScaling() const

Return the first affine transform applied to input points.

geom::AffineTransform const &getOutputScalingInverse() const

Return the affine transform applied to points after the polynomial transform.

geom::AffineTransform linearize(geom::Point2D const &in) const

Return an approximate affine transform at the given point.

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

Apply the transform to a point.

Public Static Functions

static ScaledPolynomialTransform convert(PolynomialTransform const &poly)

Convert a PolynomialTransform to an equivalent ScaledPolynomialTransform.

This simply inserts identity AffineTransforms before and after applying the given PolynomialTransform.

static ScaledPolynomialTransform convert(SipForwardTransform const &sipForward)

Convert a SipForwardTransform to an equivalent ScaledPolynomialTransform.

The input transform’s CRPIX offset and CD matrix scaling are used to define the input and output affine transforms, respectively, leaving the polynomial coefficients unmodified.

static ScaledPolynomialTransform convert(SipReverseTransform const &sipReverse)

Convert a SipForwardTransform to an equivalent ScaledPolynomialTransform.

The input transform’s CD matrix scaling and CRPIX offset are used to define the input and output affine transforms, respectively, leaving the polynomial coefficients unmodified.

Private Members

PolynomialTransform _poly
geom::AffineTransform _inputScaling
geom::AffineTransform _outputScalingInverse

Friends

friend lsst::meas::astrom::ScaledPolynomialTransformFitter