25 #ifndef LSST_JOINTCAL_STAR_MATCH_H
26 #define LSST_JOINTCAL_STAR_MATCH_H
A Point with uncertainties.
double Distance(const Point &other) const
A hanger for star associations.
double computeChi2(const AstrometryTransform &transform) const
returns the chi2 (using errors in the FatPoint's)
std::shared_ptr< const BaseStar > s1
std::shared_ptr< const BaseStar > s2
void setDistance(const AstrometryTransform &transform)
to be used before sorting on distances.
friend bool sameStar2(const StarMatch &one, const StarMatch &two)
StarMatch(const FatPoint &point1, const FatPoint &point2, std::shared_ptr< const BaseStar > star1, std::shared_ptr< const BaseStar > star2)
constructor.
double computeDistance(const AstrometryTransform &transform) const
returns the distance from transform(point1) to point2.
double getDistance() const
returns the value computed by the above one.
friend bool compareStar2(const StarMatch &one, const StarMatch &two)
friend std::ostream & operator<<(std::ostream &stream, const StarMatch &Match)
friend bool sameStar1(const StarMatch &one, const StarMatch &two)
friend bool compareStar1(const StarMatch &one, const StarMatch &two)
std::unique_ptr< AstrometryTransform > inverseTransform()
returns the inverse transform (swap, fit(refineTransform) , and swap).
void setDistance(const AstrometryTransform &transform)
Sets the distance (residual) field of all std::list elements. Mandatory before sorting on distances.
void setTransform(const AstrometryTransform &transform)
void printTransform(std::ostream &stream=std::cout) const
print the matching transformation quality (transform, chi2, residual)
void swap()
swaps elements 1 and 2 of each starmatch in std::list.
double getChi2() const
access to the chi2 of the last call to refineTransform.
void setTransform(std::shared_ptr< AstrometryTransform > transform)
int getTransformOrder() const
returns the order of the used transform
void setTransform(const AstrometryTransform *transform)
sets a transform between the 2 std::lists and deletes the previous or default one....
int recoveredNumber(double mindist) const
count the number of elements for which distance is < mindist
void setTransformOrder(int order)
set transform according to the given order.
double computeResidual() const
returns the average 1d Residual (last call to refineTransform)
unsigned removeAmbiguities(const AstrometryTransform &transform, int which=3)
cleans up the std::list of pairs for pairs that share one of their stars, keeping the closest one.
double getDist2() const
access to the sum of squared residuals of the last call to refineTransform.
void cutTail(int nKeep)
deletes the tail of the match std::list
void applyTransform(StarMatchList &transformed, const AstrometryTransform *priorTransform, const AstrometryTransform *posteriorTransform=nullptr) const
enables to get a transformed StarMatchList.
void refineTransform(double nSigmas)
removes pairs beyond nSigmas in distance (where the sigma scale is set by the fit) and iterates until...
std::shared_ptr< const AstrometryTransform > getTransform() const
carries out a fit with outlier rejection
bool operator==(FilterProperty const &rhs) const noexcept
Return true iff two FilterProperties are identical.
bool operator!=(FilterProperty const &rhs) const noexcept
Return true iff rhs != this.
bool compareStar1(const StarMatch &one, const StarMatch &two)
bool sameStar2(const StarMatch &one, const StarMatch &two)
bool sameStar1(const StarMatch &one, const StarMatch &two)
bool compareStar2(const StarMatch &one, const StarMatch &two)
double computeDist2(const StarMatchList &S, const AstrometryTransform &transform)
sum of distance squared
::std::list< StarMatch >::const_iterator StarMatchCIterator
std::ostream & operator<<(std::ostream &stream, AstrometryMapping const &mapping)
::std::list< StarMatch >::iterator StarMatchIterator
double computeChi2(const StarMatchList &L, const AstrometryTransform &transform)
the actual chi2
A base class for image defects.