Class AstrometryTransformIdentity

Inheritance Relationships

Base Type

Class Documentation

class AstrometryTransformIdentity : public lsst::jointcal::AstrometryTransform

A do-nothing transformation. It anyway has dummy routines to mimick a AstrometryTransform.

Public Functions

AstrometryTransformIdentity()

constructor.

void apply(const double xIn, const double yIn, double &xOut, double &yOut) const

xOut = xIn; yOut = yIn !

double fit(StarMatchList const &starMatchList)

fits a transform to a std::list of Point pairs (p1,p2, the Point fields in StarMatch).

After the fit this(p1) yields approximately p2. The returned value is the sum of squared residuals. If you want to fit a partial transform (e.g. such that this(T1(p1)) = T2(p2), use StarMatchList::applyTransform beforehand.

std::unique_ptr<AstrometryTransform> composeAndReduce(AstrometryTransform 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.

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

dumps the transform coefficients to stream.

std::size_t getNpar() const

returns the number of parameters (to compute chi2’s)

std::unique_ptr<AstrometryTransform> clone() const

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

void computeDerivative(Point const &where, AstrometryTransformLinear &derivative, const double step = 0.01) const

Computes the local Derivative of a transform, w.r.t. position.

Step is used for numerical derivation.

virtual AstrometryTransformLinear linearApproximation(Point const &where, const double step = 0.01) const

linear approximation.

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)