File StarMatch.h¶
pairs of points
Used to handles matches of star std::lists (image/image) or image/catalog to fit geometrical and photometric transformations. a pair of stars, usually belonging to different images. One would normally assume that they are the same object of the sky. The object contains basically two 2d points (called later point1 and point2), and two pointers (unused by the class and its satellites), that enable in the end to trace back the stars in the caller data structures.
-
namespace
lsst
Class for a simple mapping implementing a generic AstrometryTransform.
Remove all non-astronomical counts from the Chunk Exposure’s pixels.
Forward declarations for lsst::utils::Cache
For details on the Cache class, see the Cache.h file.
It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.
A base class for image defects
Numeric constants used by the Integrate.h integrator routines.
Compute Image Statistics
- Note
Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.
- Note
The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.
-
namespace
jointcal
Typedefs
Functions
-
std::ostream &
operator<<
(std::ostream &stream, const StarMatchList &starMatchList)¶ A std::list of star matches,.
To be used as the argument to AstrometryTransform::fit routines. There is as well a StarMatch::fit routine which fits a polynomial by default, although the transform may be user-provided. The StarMatchList::refineTransform is a convenient tool to reject outliers. Given two catalogs, one can assemble a StarMatchList using utilities such as listMatchCollect. StarMatchList’s have write capabilities. NStarMatchList is a generalization of this 2-match to n-matches.
-
double
computeDist2
(const StarMatchList &S, const AstrometryTransform &transform)¶ sum of distance squared
-
double
computeChi2
(const StarMatchList &L, const AstrometryTransform &transform)¶ the actual chi2
-
class
StarMatch
- #include <StarMatch.h>
A hanger for star associations.
Public Functions
constructor.
gives 2 points (that contain the geometry), plus pointers to the Star objects (which are there for user convenience).
-
double
computeDistance
(const AstrometryTransform &transform) const returns the distance from transform(point1) to point2.
-
double
computeChi2
(const AstrometryTransform &transform) const returns the chi2 (using errors in the FatPoint’s)
-
void
setDistance
(const AstrometryTransform &transform) to be used before sorting on distances.
-
double
getDistance
() const returns the value computed by the above one.
-
void
swap
()
-
StarMatch
()
-
~StarMatch
()
Public Members
-
FatPoint
point1
-
FatPoint
point2
the Star pointers (the pointer is in fact generic, pointed data is never used).
2 points
-
double
distance
-
double
chi2
Private Functions
-
class
StarMatchList
: public std::list<StarMatch> Public Functions
-
void
refineTransform
(double nSigmas)
-
void
applyTransform
(StarMatchList &transformed, const AstrometryTransform *priorTransform, const AstrometryTransform *posteriorTransform = nullptr) const enables to get a transformed StarMatchList. Only positions are transformed, not attached stars. const routine: “this” remains unchanged.
-
StarMatchList
()
-
std::shared_ptr<const AstrometryTransform>
getTransform
() const carries out a fit with outlier rejection
enables to access the fitted transformation.
-
double
getDist2
() const access to the sum of squared residuals of the last call to refineTransform.
-
double
getChi2
() const access to the chi2 of the last call to refineTransform.
-
int
getTransformOrder
() const returns the order of the used transform
-
void
swap
() swaps elements 1 and 2 of each starmatch in std::list.
-
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. The distance is computed using transform. which = 1 (2) removes ambiguities on the first (second) term of the match. which=3 does both.
-
void
setTransform
(const AstrometryTransform *transform) sets a transform between the 2 std::lists and deletes the previous or default one. No fit.
-
void
setTransform
(const AstrometryTransform &transform)
-
void
setTransformOrder
(int order) set transform according to the given order.
-
std::unique_ptr<AstrometryTransform>
inverseTransform
() returns the inverse transform (swap, fit(refineTransform) , and swap). The caller should delete the returned pointer.
-
void
setDistance
(const AstrometryTransform &transform) Sets the distance (residual) field of all std::list elements. Mandatory before sorting on distances.
-
void
cutTail
(int nKeep) deletes the tail of the match std::list
-
int
recoveredNumber
(double mindist) const count the number of elements for which distance is < mindist
-
void
dumpTransform
(std::ostream &stream = std::cout) const print the matching transformation quality (transform, chi2, residual)
-
~StarMatchList
()
-
void
-
std::ostream &