26 #ifndef CREATE_WCS_WITH_SIP
27 #define CREATE_WCS_WITH_SIP
32 #include "lsst/base.h"
35 #include "lsst/afw/table/Match.h"
36 #include "lsst/afw/geom/Box.h"
37 #include "lsst/afw/geom/Point.h"
38 #include "lsst/afw/geom/Angle.h"
85 template<
class MatchT>
89 typedef std::shared_ptr<CreateWcsWithSip>
Ptr;
90 typedef std::shared_ptr<CreateWcsWithSip const>
ConstPtr;
107 std::vector<MatchT>
const & matches,
108 afw::image::Wcs
const & linearWcs,
110 afw::geom::Box2I
const& bbox = afw::geom::Box2I(),
157 std::vector<MatchT>
const _matches;
158 afw::geom::Box2I
mutable _bbox;
160 CONST_PTR(afw::image::Wcs) _linearWcs;
163 int const _sipOrder, _reverseSipOrder;
165 Eigen::MatrixXd _sipA, _sipB;
166 Eigen::MatrixXd _sipAp, _sipBp;
168 PTR(afw::image::TanWcs) _newWcs;
170 void _calculateForwardMatrices();
171 void _calculateReverseMatrices();
173 afw::geom::Point2D _getCrvalAsGeomPoint() const;
177 template<class MatchT>
179 std::vector<MatchT> const & matches,
180 afw::image::Wcs const& linearWcs,
182 afw::geom::Box2I const& bbox = afw::geom::Box2I(),
int getOrder() const
Return the number of terms in the SIP matrix.
int getNPoints() const
Return the number of points in the catalogue.
double getScatterInPixels() const
Compute the median separation, in pixels, between items in this object's match list.
int getNGrid() const
Return the number of grid points (on each axis) used in inverse SIP transform.
CreateWcsWithSip< MatchT > makeCreateWcsWithSip(std::vector< MatchT > const &matches, afw::image::Wcs const &linearWcs, int const order, afw::geom::Box2I const &bbox=afw::geom::Box2I(), int const ngrid=0)
Factory function for CreateWcsWithSip.
std::shared_ptr< CreateWcsWithSip > Ptr
CreateWcsWithSip(std::vector< MatchT > const &matches, afw::image::Wcs const &linearWcs, int const order, afw::geom::Box2I const &bbox=afw::geom::Box2I(), int const ngrid=0)
Construct a CreateWcsWithSip.
double getLinearScatterInPixels() const
Compute the median radial separation between items in this object's match list.
afw::geom::Angle getLinearScatterOnSky() const
Compute the median on-sky separation between items in this object's match list,.
boost::shared_ptr< afw::image::TanWcs > getNewWcs()
std::shared_ptr< CreateWcsWithSip const > ConstPtr
Measure the distortions in an image plane and express them a SIP polynomials.
afw::geom::Angle getScatterOnSky() const
Compute the median on-sky separation between items in this object's match list.