46 auto sInv = s.inverted();
60 forwardSipPoly._xCoeffs(1, 0) -= 1;
61 forwardSipPoly._yCoeffs(0, 1) -= 1;
74 forwardSipPoly._xCoeffs(1, 0) -= 1;
75 forwardSipPoly._yCoeffs(0, 1) -= 1;
82 return convert(scaled, pixelOrigin, cdMatrix);
97 result.transformPixelsInPlace(s);
108 reverseSipPoly._xCoeffs(1, 0) -= 1;
109 reverseSipPoly._yCoeffs(0, 1) -= 1;
116 auto reverseSipPoly =
121 reverseSipPoly._xCoeffs(1, 0) -= 1;
122 reverseSipPoly._yCoeffs(0, 1) -= 1;
133 result.transformPixelsInPlace(s);
153 oss <<
"SIP forward and reverse transforms have inconsistent CRPIX: " << sipForward.
getPixelOrigin()
159 oss <<
"SIP forward and reverse transforms have inconsistent CD matrix: " << sipForward.
getCdMatrix()
166 Eigen::MatrixXd sipAP(ndarray::asEigenMatrix(sipReverse.
getPoly().
getXCoeffs()));
167 Eigen::MatrixXd sipBP(ndarray::asEigenMatrix(sipReverse.
getPoly().
getYCoeffs()));
182 switch (nQuarter % 4) {
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
EigenVector const & asEigen() const noexcept(IS_ELEMENT_NOTHROW_COPYABLE)
Return a fixed-size Eigen representation of the coordinate object.
Point in an unspecified spherical coordinate system.
Reports invalid arguments.
std::shared_ptr< TransformPoint2ToPoint2 > makeTransform(lsst::geom::AffineTransform const &affine)
Wrap an lsst::geom::AffineTransform as a Transform.
std::shared_ptr< SkyWcs > makeTanSipWcs(lsst::geom::Point2D const &crpix, lsst::geom::SpherePoint const &crval, Eigen::Matrix2d const &cdMatrix, Eigen::MatrixXd const &sipA, Eigen::MatrixXd const &sipB)
Construct a TAN-SIP SkyWcs with forward SIP distortion terms and an iterative inverse.
std::shared_ptr< SkyWcs > makeModifiedWcs(TransformPoint2ToPoint2 const &pixelTransform, SkyWcs const &wcs, bool modifyActualPixels)
Create a new SkyWcs whose pixels are transformed by pixelTransform, as described below.
Low-level polynomials (including special polynomials) in C++.
AngleUnit constexpr degrees
constant with units of degrees
Extent< double, 2 > Extent2D
std::shared_ptr< afw::geom::SkyWcs > transformWcsPixels(afw::geom::SkyWcs const &wcs, geom::AffineTransform const &s)
Create a new SkyWcs whose pixel coordinate system has been transformed via an affine transform.
PolynomialTransform compose(geom::AffineTransform const &t1, PolynomialTransform const &t2)
Return a PolynomialTransform that is equivalent to the composition t1(t2())
std::shared_ptr< afw::geom::SkyWcs > rotateWcsPixelsBy90(afw::geom::SkyWcs const &wcs, int nQuarter, geom::Extent2I const &dimensions)
Return a new SkyWcs that represents a rotation of the image it corresponds to about the image's cente...
std::shared_ptr< afw::geom::SkyWcs > makeWcs(SipForwardTransform const &sipForward, SipReverseTransform const &sipReverse, geom::SpherePoint const &skyOrigin)
Create a new TAN SIP Wcs from a pair of SIP transforms and the sky origin.