24 #ifndef LSST_AFW_IMAGE_TANWCS_H
25 #define LSST_AFW_IMAGE_TANWCS_H
28 #include "lsst/daf/base/Citizen.h"
29 #include "lsst/daf/base/Persistable.h"
45 namespace formatters {
46 class TanWcsFormatter;
86 double equinox = 2000, std::string
const &raDecSys =
"FK5", std::string
const &cunits1 =
"deg",
87 std::string
const &cunits2 =
"deg");
105 Eigen::MatrixXd
const &sipA, Eigen::MatrixXd
const &sipB, Eigen::MatrixXd
const &sipAp,
106 Eigen::MatrixXd
const &sipBp,
double equinox = 2000, std::string
const &raDecSys =
"FK5",
107 std::string
const &cunits1 =
"deg", std::string
const &cunits2 =
"deg");
112 std::shared_ptr<Wcs>
clone()
const override;
131 std::shared_ptr<daf::base::PropertyList>
getFitsMetadata()
const override;
146 Eigen::MatrixXd
const &sipAp, Eigen::MatrixXd
const &sipBp);
149 Eigen::MatrixXd
const &
getSipA()
const {
return _sipA; }
152 Eigen::MatrixXd
const &
getSipB()
const {
return _sipB; }
155 Eigen::MatrixXd
const &
getSipAp()
const {
return _sipAp; }
158 Eigen::MatrixXd
const &
getSipBp()
const {
return _sipBp; }
170 friend std::shared_ptr<Wcs>
makeWcs(std::shared_ptr<daf::base::PropertySet>
const &metadata,
bool);
174 std::string getPersistenceName()
const override;
178 bool _isSubset(
Wcs const &)
const override;
189 TanWcs(std::shared_ptr<daf::base::PropertySet const>
const &fitsMetadata);
199 Eigen::MatrixXd _sipA, _sipB, _sipAp, _sipBp;
friend class TanWcsFactory
afw::table::PointKey< int > dimensions
Eigen::MatrixXd const & getSipBp() const
Return the SIP reverse distortion matrix for y pixel coordinates.
An object passed to Persistable::write to allow it to persist itself.
void flipImage(int flipLR, int flipTB, lsst::afw::geom::Extent2I dimensions) const override
Flip CD matrix around the y-axis.
void pixelToSkyImpl(double pixel1, double pixel2, geom::Angle skyTmp[2]) const override
Worker routine for pixelToSky.
static void decodeSipHeader(daf::base::PropertySet const &fitsMetadata, std::string const &which, Eigen::MatrixXd &m)
Decode the SIP headers for a given matrix, if present.
Implementation of the WCS standard for a any projection.
geom::Point2D skyToPixelImpl(geom::Angle sky1, geom::Angle sky2) const override
Worker routine for skyToPixel.
std::shared_ptr< daf::base::PropertyList > getFitsMetadata() const override
Return a PropertyList containing FITS header keywords that can be used to save the Wcs...
table::Key< table::Array< double > > cd
void rotateImageBy90(int nQuarter, lsst::afw::geom::Extent2I dimensions) const override
Rotate image by nQuarter times 90 degrees.
bool hasDistortion() const override
A class representing an angle.
Implementation of the WCS standard for the special case of the Gnomonic (tangent plane) projection...
friend std::shared_ptr< Wcs > makeWcs(std::shared_ptr< daf::base::PropertySet > const &metadata, bool)
geom::Point2D undistortPixel(geom::Point2D const &pixel) const
Applies the SIP A and B un-distortion (used in the pixelToSky direction)
bool isPersistable() const override
Whether the object is persistable using afw::table::io archives.
Base class for all records.
lsst::daf::base::PropertySet PropertySet
table::Key< double > equinox
Eigen::MatrixXd const & getSipAp() const
Return the SIP reverse distortion matrix for x pixel coordinates.
table::PointKey< int > pixel
Eigen::MatrixXd const & getSipA() const
Return the SIP forward distortion matrix for the 1st intermediate world coordinate system axis...
table::PointKey< double > crval
geom::Angle pixelScale() const
Returns the pixel scale, in Angle/pixel.
A CRTP facade class for subclasses of Persistable.
void setDistortionMatrices(Eigen::MatrixXd const &sipA, Eigen::MatrixXd const &sipB, Eigen::MatrixXd const &sipAp, Eigen::MatrixXd const &sipBp)
Set the distortion matrices.
table::PointKey< double > crpix
std::shared_ptr< Wcs > clone() const override
Polymorphic deep-copy.
geom::Point2D distortPixel(geom::Point2D const &pixel) const
Applies the SIP AP and BP distortion (used in the skyToPixel direction)
Eigen::MatrixXd const & getSipB() const
Return the SIP forward distortion matrix for the 2st intermediate world coordinate system axis...