Class UserTransform

Inheritance Relationships

Base Type

Class Documentation

class UserTransform : public lsst::jointcal::AstrometryTransform

A run-time transform that allows users to define a AstrometryTransform with minimal coding (just the apply routine).

Public Functions

UserTransform(AstrometryTransformFun &fun, const void *userData)

the transform routine and extra data that it may need.

void apply(const double xIn, const double yIn, double &xOut, double &yOut) const
void dump(std::ostream &stream = std::cout) const

dumps the transform coefficients to stream.

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> clone() const

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