lsst.meas.astrom main-g5babe484a3+4d4b223381
Public Types | Public Member Functions | List of all members
lsst::meas::astrom::sip::CreateWcsWithSip< MatchT > Class Template Reference

Measure the distortions in an image plane and express them a SIP polynomials. More...

#include <CreateWcsWithSip.h>

Public Types

typedef std::shared_ptr< CreateWcsWithSipPtr
 
typedef std::shared_ptr< CreateWcsWithSip const > ConstPtr
 

Public Member Functions

 CreateWcsWithSip (std::vector< MatchT > const &matches, afw::geom::SkyWcs const &linearWcs, int const order, geom::Box2I const &bbox=geom::Box2I(), int const ngrid=0)
 Construct a CreateWcsWithSip. More...
 
std::shared_ptr< afw::geom::SkyWcsgetNewWcs ()
 
double getScatterInPixels () const
 Compute the median separation, in pixels, between items in this object's match list. More...
 
geom::Angle getScatterOnSky () const
 Compute the median on-sky separation between items in this object's match list. More...
 
double getLinearScatterInPixels () const
 Compute the median radial separation between items in this object's match list. More...
 
geom::Angle getLinearScatterOnSky () const
 Compute the median on-sky separation between items in this object's match list,. More...
 
int getOrder () const
 Return the number of terms in the SIP matrix. More...
 
int getNPoints () const
 Return the number of points in the catalogue. More...
 
int getNGrid () const
 Return the number of grid points (on each axis) used in inverse SIP transform. More...
 
Eigen::MatrixXd const getSipA ()
 
Eigen::MatrixXd const getSipB ()
 
Eigen::MatrixXd const getSipAp ()
 
Eigen::MatrixXd const getSipBp ()
 

Detailed Description

template<class MatchT>
class lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >

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()
std::shared_ptr< afw::geom::SkyWcs > getNewWcs()
CreateWcsWithSip(std::vector< MatchT > const &matches, afw::geom::SkyWcs const &linearWcs, int const order, geom::Box2I const &bbox=geom::Box2I(), int const ngrid=0)
Construct a CreateWcsWithSip.
std::vector< Match< typename Cat1::Record, typename Cat2::Record > > matchRaDec(Cat1 const &cat1, Cat2 const &cat2, lsst::geom::Angle radius, MatchControl const &mc=MatchControl())

Note that the matches must be one-to-one; this is ensured by passing closest=true to matchRaDec.

Definition at line 76 of file CreateWcsWithSip.h.

Member Typedef Documentation

◆ ConstPtr

template<class MatchT >
typedef std::shared_ptr<CreateWcsWithSip const> lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::ConstPtr

Definition at line 79 of file CreateWcsWithSip.h.

◆ Ptr

Definition at line 78 of file CreateWcsWithSip.h.

Constructor & Destructor Documentation

◆ CreateWcsWithSip()

template<class MatchT >
lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::CreateWcsWithSip ( std::vector< MatchT > const &  matches,
afw::geom::SkyWcs const &  linearWcs,
int const  order,
geom::Box2I const &  bbox = geom::Box2I(),
int const  ngrid = 0 
)

Construct a CreateWcsWithSip.

Constructor.

Parameters
[in]matcheslist of matches
[in]linearWcsinitial WCS, typically pure TAN but need not be
[in]orderSIP order for fit WCS
[in]bboxbounding box over which to compute the reverse SIP transform. If empty then a bounding box is computed based on the matches, extended a bit to allow for the fact that the sources will not necessarily reach to each edge of the image. Specifially the box is grown by dimensions/sqrt(number of matches).
[in]ngridnumber of points along x or y for the grid of points on which the reverse SIP transform is computed

Definition at line 102 of file CreateWcsWithSip.cc.

Member Function Documentation

◆ getLinearScatterInPixels()

template<class MatchT >
double lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::getLinearScatterInPixels

Compute the median radial separation between items in this object's match list.

For each match, project the reference object coord to pixels using the initial "linearWcs" WCS, and measure the radial separation to the source centroid.

Definition at line 358 of file CreateWcsWithSip.cc.

◆ getLinearScatterOnSky()

template<class MatchT >
geom::Angle lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::getLinearScatterOnSky

Compute the median on-sky separation between items in this object's match list,.

For each match, project the source centroid to RA,Dec using the initial "linearWcs" WCS, and measure the on-sky angular separation to the reference source coord.

Definition at line 370 of file CreateWcsWithSip.cc.

◆ getNewWcs()

template<class MatchT >
std::shared_ptr< afw::geom::SkyWcs > lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::getNewWcs ( )
inline

Definition at line 98 of file CreateWcsWithSip.h.

◆ getNGrid()

template<class MatchT >
int lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::getNGrid ( ) const
inline

Return the number of grid points (on each axis) used in inverse SIP transform.

Definition at line 137 of file CreateWcsWithSip.h.

◆ getNPoints()

template<class MatchT >
int lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::getNPoints ( ) const
inline

Return the number of points in the catalogue.

Definition at line 135 of file CreateWcsWithSip.h.

◆ getOrder()

template<class MatchT >
int lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::getOrder ( ) const
inline

Return the number of terms in the SIP matrix.

Definition at line 133 of file CreateWcsWithSip.h.

◆ getScatterInPixels()

template<class MatchT >
double lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::getScatterInPixels

Compute the median separation, in pixels, between items in this object's match list.

For each match, project the reference object coord to pixels using the fit TAN-SIP WCS, and measure the radial separation to the source centroid

Definition at line 352 of file CreateWcsWithSip.cc.

◆ getScatterOnSky()

template<class MatchT >
geom::Angle lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::getScatterOnSky

Compute the median on-sky separation between items in this object's match list.

For each match, project the source centroid to RA,Dec using the fit TAN-SIP WCS, and measure the on-sky angular separation to the reference source coord.

Definition at line 364 of file CreateWcsWithSip.cc.

◆ getSipA()

template<class MatchT >
Eigen::MatrixXd const lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::getSipA ( )
inline

Definition at line 140 of file CreateWcsWithSip.h.

◆ getSipAp()

template<class MatchT >
Eigen::MatrixXd const lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::getSipAp ( )
inline

Definition at line 144 of file CreateWcsWithSip.h.

◆ getSipB()

template<class MatchT >
Eigen::MatrixXd const lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::getSipB ( )
inline

Definition at line 142 of file CreateWcsWithSip.h.

◆ getSipBp()

template<class MatchT >
Eigen::MatrixXd const lsst::meas::astrom::sip::CreateWcsWithSip< MatchT >::getSipBp ( )
inline

Definition at line 146 of file CreateWcsWithSip.h.


The documentation for this class was generated from the following files: