23 #ifndef LSST_AFW_GEOM_SipApproximation_h_INCLUDED 24 #define LSST_AFW_GEOM_SipApproximation_h_INCLUDED 35 namespace lsst {
namespace afw {
namespace geom {
130 Eigen::Matrix2d
const &
cd,
134 bool useInverse=
true,
135 double svdThreshold=-1
179 Eigen::Matrix2d
const & cd,
182 ndarray::Array<double const, 2>
const &
a,
183 ndarray::Array<double const, 2>
const &
b,
184 ndarray::Array<double const, 2>
const & ap,
185 ndarray::Array<double const, 2>
const & bp,
211 double getA(
int p,
int q)
const;
220 double getB(
int p,
int q)
const;
229 double getAP(
int p,
int q)
const;
238 double getBP(
int p,
int q)
const;
241 Eigen::MatrixXd
getA()
const noexcept;
244 Eigen::MatrixXd
getB()
const noexcept;
247 Eigen::MatrixXd
getAP()
const noexcept;
250 Eigen::MatrixXd
getBP()
const noexcept;
338 void fit(
int order,
double svdThreshold=-1);
370 #endif // !LSST_AFW_GEOM_SipApproximation_h_INCLUDED Eigen::MatrixXd getA() const noexcept
Return the coefficients of the forward transform polynomial.
Point2D getPixelOrigin() const noexcept
Return the pixel origin of the WCS being approximated.
Eigen::Matrix2d getCdMatrix() const noexcept
Return the CD matrix of the WCS being approximated.
SipApproximation(std::shared_ptr< TransformPoint2ToPoint2 > pixelToIwc, Point2D const &crpix, Eigen::Matrix2d const &cd, Box2D const &bbox, Extent2I const &gridShape, int order, bool useInverse=true, double svdThreshold=-1)
Construct a new approximation by fitting on a grid of points.
A fitter and results class for approximating a general Transform in a form compatible with FITS WCS p...
table::Key< table::Array< double > > cd
A floating-point coordinate rectangle geometry.
table::PointKey< double > crpix
~SipApproximation() noexcept
Point2D applyForward(Point2D const &pix) const
Convert a point from pixels to intermediate world coordinates.
Point< double, 2 > Point2D
Eigen::MatrixXd getB() const noexcept
Return the coefficients of the forward transform polynomial.
A base class for image defects.
Eigen::MatrixXd getBP() const noexcept
Return the coefficients of the reverse transform polynomial.
Point2D applyInverse(Point2D const &iwcs) const
Convert a point from intermediate world coordinates to pixels.
Eigen::MatrixXd getAP() const noexcept
Return the coefficients of the reverse transform polynomial.
Extent2D getGridStep() const noexcept
Return the distance between grid points in pixels.
void refineGrid(int factor=2)
Update the grid by making it finer by a given integer factor.
std::pair< double, double > computeMaxDeviation() const noexcept
Return the maximum deviation of the solution from the exact transform on the current grid...
Extent2I getGridShape() const noexcept
Return the number of grid points in x and y.
void fit(int order, double svdThreshold=-1)
Obtain a new solution at the given order with the current grid.
SipApproximation & operator=(SipApproximation const &)=delete
Box2D getBBox() const noexcept
Return the pixel-coordinate bounding box over which the approximation should be valid.
void updateGrid(Extent2I const &shape)
Update the grid to the given number of points in x and y.
int getOrder() const noexcept
Return the polynomial order of the current solution (same for forward and reverse).