Class PolynomialTransform

Class Documentation

class PolynomialTransform

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.

Related

compose()

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Note

If instead left is Identity, this method does the correct thing via AstrometryTransformIdentity::composeAndReduce().