Class AstrometryTransformPolynomial

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class AstrometryTransformPolynomial : public lsst::jointcal::AstrometryTransform

Polynomial transformation class.

Subclassed by lsst::jointcal::AstrometryTransformLinear

Public Functions

AstrometryTransformPolynomial(std::size_t order = 1)

Default transform : identity for all orders (>=1 ).

Parameters
  • order: The highest total power (x+y) of monomials of this polynomial.

AstrometryTransformPolynomial(const AstrometryTransform *transform, const Frame &frame, std::size_t order, std::size_t nPoint = 1000)

Constructs a “polynomial image” from an existing transform, over a specified domain.

AstrometryTransformPolynomial(std::shared_ptr<afw::geom::TransformPoint2ToPoint2> transform, jointcal::Frame const &domain, std::size_t order, std::size_t nSteps = 50)

Constructs a polynomial approximation to an afw::geom::TransformPoint2ToPoint2.

Parameters
  • [in] transform: The transform to be approximated.

  • [in] domain: The valid domain of the transform.

  • [in] order: The polynomial order to use when approximating.

  • [in] nSteps: The number of sample points per axis (nSteps^2 total points).

void setOrder(std::size_t order)

Sets the polynomial order (the highest sum of exponents of the largest monomial).

std::size_t getOrder() const

Returns the polynomial order.

void apply(const double xIn, const double yIn, double &xOut, double &yOut) const
void computeDerivative(Point const &where, AstrometryTransformLinear &derivative, const double step = 0.01) const

specialised analytic routine

virtual void transformPosAndErrors(const FatPoint &in, FatPoint &out) const

a mix of apply and Derivative

std::size_t getNpar() const

total number of parameters

void dump(std::ostream &stream = std::cout) const

print out of coefficients in a readable form.

double fit(StarMatchList const &starMatchList)

guess what

AstrometryTransformPolynomial operator*(AstrometryTransformPolynomial const &right) const

Composition (internal stuff in quadruple precision)

AstrometryTransformPolynomial operator+(AstrometryTransformPolynomial const &right) const

Addition.

AstrometryTransformPolynomial operator-(AstrometryTransformPolynomial const &right) const

Subtraction.

std::unique_ptr<AstrometryTransform> composeAndReduce(AstrometryTransformPolynomial const &right) const

Return a reduced composition of newTransform = this(right()), or nullptr if it cannot be reduced.

“Reduced” in this context means that they are capable of being merged into a single transform, for example, for two polynomials:

\[ f(x) = 1 + x^2, g(x) = -1 + 3x \]
we would have h = f.composeAndReduce(g) == 2 - 6x + 9x^2.

To be overloaded by derived classes if they can properly reduce the composition.

Return

The new reduced and composed AstrometryTransform, or nullptr if no such reduction is possible.

Parameters
  • right: The transform to apply first.

std::unique_ptr<AstrometryTransform> clone() const

returns a copy (allocated by new) of the transformation.

double coeff(std::size_t powX, std::size_t powY, std::size_t whichCoord) const

access to coefficients (read only)

double &coeff(std::size_t powX, std::size_t powY, std::size_t whichCoord)

write access

double coeffOrZero(std::size_t powX, std::size_t powY, std::size_t whichCoord) const

read access, zero if beyond order

double determinant() const
double paramRef(Eigen::Index const i) const
double &paramRef(Eigen::Index const i)
void paramDerivatives(Point const &where, double *dx, double *dy) const

Derivative w.r.t parameters. Derivatives should be al least 2*NPar long. first Npar, for x, last Npar for y.

std::shared_ptr<ast::Mapping> toAstMap(jointcal::Frame const &domain) const

Create an equivalent AST mapping for this transformation, including an analytic inverse if possible.

Return

An AST Mapping that represents this transformation.

Parameters
  • domain: The domain of the transform, to help find an inverse.

void write(std::ostream &s) const
void read(std::istream &s)