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()));
169 return afw::geom::makeTanSipWcs(sipForward.
getPixelOrigin(), skyOrigin,
175 auto affineTransform22 = afw::geom::makeTransform(s);
176 return afw::geom::makeModifiedWcs(*affineTransform22->inverted(),
wcs,
true);
182 switch (nQuarter % 4) {
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
afw::table::PointKey< int > dimensions
table::Key< table::Array< std::uint8_t > > wcs
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.
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.