Namespace lsst::meas::astrom::sip¶
-
namespace
sip
Functions
-
template<class
MatchT
>
CreateWcsWithSip<MatchT>makeCreateWcsWithSip
(std::vector<MatchT> const &matches, afw::geom::SkyWcs const &linearWcs, int const order, geom::Box2I const &bbox = geom::Box2I(), int const ngrid = 0) Factory function for CreateWcsWithSip.
-
template<class
MatchT
>
classCreateWcsWithSip
- #include <CreateWcsWithSip.h>
Measure the distortions in an image plane and express them a SIP polynomials.
Given a list of matching sources between a catalogue and an image, and a linear Wcs that describes the mapping from pixel space in the image and ra/dec space in the catalogue, calculate discrepancies between the two and compute SIP distortion polynomials to describe the discrepancy
SIP polynomials are defined in Shupe at al. (2005) ASPC 347 491.
Note that the SIP standard insists (although it is only mentioned obliquly between Eqns 3 and 4) that the lowest three terms in the distortion polynomials be zero (A00, A10, A01, B00, etc.). To achieve this, we need to adjust the values of CD and CRPIX from the input wcs. This may not be the behaviour you expect.
A Wcs may be created in a variety of ways (e.g. lsst::meas::astrom::net::GlobalAstrometrySolution ), and the list of matched sources (matches) can be generated with the matchRaDec function.
#Example usage matches = matchRaDec(catSet, srcSet, 1.0*afwGeom.arcseconds, true) wcs = getWcsFromSomewhere() maxScatter=0.1 maxOrder= 10 sipObject = CreateWcsWithSip(matches, wcs, maxScatter, maxOrder) wcs = sipObject.getNewWcs()
Note that the matches must be one-to-one; this is ensured by passing closest=true to matchRaDec.
-
template<class
FittingFunc
>
classLeastSqFitter1d
- #include <LeastSqFitter1d.h>
Fit an lsst::afw::math::Function1 object to a set of data points in one dimension.
The class is templated over the kind of object to fit.
Input is a list of x ordinates for a set of points, the y coordinate, and the uncertainties, s. order is order of the polynomial to fit (e.g if the templated function is lsst::afw::math::PolynomialFunction1, then order=3 => fit a function of the form \(ax^2+bx+c\)
- See
- Template Parameters
FittingFunc
: The 1d function to fit in both dimensions. Must inherit from lsst::afw::math::Function1
- Parameters
x
: Ordinate of points to fity
: Co-ordinate of pionts to fits
: 1 \(\sigma\) uncertainties in zorder
: Polynomial order to fit
-
template<class
FittingFunc
>
classLeastSqFitter2d
- #include <LeastSqFitter2d.h>
Fit an lsst::afw::math::Function1 object to a set of data points in two dimensions.
The class is templated over the kind of object to fit. Note that we fit the 1d object in each dimension, not the 2d one.
Input is a list of x and y ordinates for a set of points, the z coordinate, and the uncertainties, s. order is order of the polynomial to fit (e.g if the templated function is lsst::afw::math::PolynomialFunction1, then order=3 => fit a function of the form \(ax^2+bx+c\)
- See
- Template Parameters
FittingFunc
: The 1d function to fit in both dimensions. Must inherit from lsst::afw::math::Function1
- Parameters
x
: Ordinate of points to fity
: Ordinate of points to fitz
: Co-ordinate of pionts to fits
: 1 \(\sigma\) uncertainties in zorder
: Polynomial order to fit
-
class
MatchSrcToCatalogue
- #include <MatchSrcToCatalogue.h>
Match a SourceSet of objects with known ra/dec with a SourceSet of objects with known xy positions Take a catalogue of objects with known positions, a catalogue of objects with known xy, and a wcs to convert one xy <> ra/dec. This class then finds the set of objects with common ra/dec.
The simplest usage is to create an object of this class, then access the corresponence sets with getMatchedImgSet() and getMatchedCatSet(). Creating the object automatically calculates the sets of corresponences for you. If you are unhappy with these matches, you can change one or more of your input arguments and redo the match with findMatches()
Using this class has the side effect of updating the coord field of the input SourceCatalog (which may be desirable).
-
template<class