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(),
122 double getScatterInPixels()
const;
130 afw::geom::Angle getScatterOnSky()
const;
138 double getLinearScatterInPixels()
const;
146 afw::geom::Angle getLinearScatterOnSky()
const;
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.
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
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.
int getNGrid() const
Return the number of grid points (on each axis) used in inverse SIP transform.