LSSTApplications
19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
24 #ifndef LSST_AFW_GEOM_SKYWCS_H
25 #define LSST_AFW_GEOM_SKYWCS_H
335 return _transform->applyForward(
pixel);
341 return _transform->applyForward(pixels);
350 return _transform->applyInverse(sky);
353 return _transform->applyInverse(sky);
473 void _computeCache() {
474 _transform = std::make_shared<TransformPoint2ToSpherePoint>(*_frameDict->
getMapping(),
true);
518 bool modifyActualPixels);
548 Eigen::Matrix2d
const &cdMatrix,
std::string const &projection =
"TAN");
583 Eigen::Matrix2d
const &cdMatrix, Eigen::MatrixXd
const &sipA,
584 Eigen::MatrixXd
const &sipB);
600 Eigen::Matrix2d
const &cdMatrix, Eigen::MatrixXd
const &sipA,
601 Eigen::MatrixXd
const &sipB, Eigen::MatrixXd
const &sipAp,
602 Eigen::MatrixXd
const &sipBp);
620 bool simplify =
true);
628 bool simplify =
true);
constexpr AngleUnit degrees
constant with units of degrees
std::shared_ptr< Mapping > getMapping(int from, std::string const &to) const
Variant of FrameSet::getMapping with the second frame specified by domain.
lsst::geom::AffineTransform linearizeSkyToPixel(lsst::geom::SpherePoint const &coord, lsst::geom::AngleUnit const &skyUnit) const
Return the local linear approximation to skyToPixel at a point given in sky coordinates.
bool isFits() const
Return true getFitsMetadata(true) will succeed, false if not.
std::string getPersistenceName() const override
Return the unique name used to persist this object and look up its factory.
bool isFlipped() const
Does the WCS follow the convention of North=Up, East=Left?
static std::shared_ptr< SkyWcs > readString(std::string &str)
Deserialize a SkyWcs from a string, using the same format as readStream.
table::Key< table::Array< std::uint8_t > > wcs
int orientation(UnitVector3d const &a, UnitVector3d const &b, UnitVector3d const &c)
orientation computes and returns the orientations of 3 unit vectors a, b and c.
std::string toString() const override
Create a string representation of this object.
std::shared_ptr< SkyWcs > copyAtShiftedPixelOrigin(lsst::geom::Extent2D const &shift) const
Return a copy of this SkyWcs with the pixel origin shifted by the specified amount.
bool isPersistable() const noexcept override
Return true if this particular object can be persisted using afw::table::io.
A FrameSet whose frames can be referenced by domain name.
SkyWcs & operator=(SkyWcs const &)=delete
std::string getPythonModule() const override
Return the fully-qualified Python module that should be imported to guarantee that its factory is reg...
std::vector< lsst::geom::Point2D > skyToPixel(std::vector< lsst::geom::SpherePoint > const &sky) const
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.
bool operator!=(SkyWcs const &other) const
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
Interface supporting iteration over heterogenous containers.
table::PointKey< double > crval
void write(OutputArchiveHandle &handle) const override
Write the object to one or more catalogs.
std::shared_ptr< RecordT > src
std::shared_ptr< typehandling::Storable > cloneStorable() const override
Create a new SkyWcs that is a copy of this one.
SkyWcs(SkyWcs const &)=default
std::ostream & operator<<(std::ostream &os, GenericEndpoint const &endpoint)
Print "GenericEndpoint(_n_)" to the ostream where _n_ is the number of axes, e.g. "GenericAxes(4)".
SkyWcs(SkyWcs &&)=default
std::shared_ptr< TransformPoint2ToPoint2 > getPixelToIntermediateWorldCoords(SkyWcs const &wcs, bool simplify=true)
Return a transform from pixel coordinates to intermediate world coordinates.
std::vector< lsst::geom::SpherePoint > pixelToSky(std::vector< lsst::geom::Point2D > const &pixels) const
static std::string getShortClassName()
lsst::geom::Point2D skyToPixel(lsst::geom::SpherePoint const &sky) const
Compute pixel position(s) from sky position(s)
bool operator==(SkyWcs const &other) const
Equality is based on the string representations being equal.
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.
table::PointKey< double > crpix
Eigen::Matrix2d getCdMatrix() const
Get the 2x2 CD matrix at the pixel origin.
ItemVariant const * other
bool equals(typehandling::Storable const &other) const noexcept override
Compare this object to another Storable.
std::shared_ptr< SkyWcs > makeFlippedWcs(SkyWcs const &wcs, bool flipLR, bool flipTB, lsst::geom::Point2D const ¢er)
Return a copy of a FITS-WCS with pixel positions flipped around a specified center.
Transform< Point2Endpoint, Point2Endpoint > TransformPoint2ToPoint2
SkyWcs & operator=(SkyWcs &&)=delete
table::PointKey< int > pixel
lsst::geom::SpherePoint pixelToSky(lsst::geom::Point2D const &pixel) const
Compute sky position(s) from pixel position(s)
A base class for image defects.
std::shared_ptr< TransformPoint2ToSpherePoint > getIntermediateWorldCoordsToSky(SkyWcs const &wcs, bool simplify=true)
Return a transform from intermediate world coordinates to sky.
lsst::geom::AffineTransform linearizePixelToSky(lsst::geom::SpherePoint const &coord, lsst::geom::AngleUnit const &skyUnit) const
Return the local linear approximation to pixelToSky at a point given in sky coordinates.
std::shared_ptr< SkyWcs > getTanWcs(lsst::geom::Point2D const &pixel) const
Get a local TAN WCS approximation to this WCS at the specified pixel position.
std::shared_ptr< const ast::FrameDict > getFrameDict() const
Get the contained FrameDict.
Eigen::Matrix2d makeCdMatrix(lsst::geom::Angle const &scale, lsst::geom::Angle const &orientation=0 *lsst::geom::degrees, bool flipX=false)
Make a WCS CD matrix.
std::shared_ptr< TransformPoint2ToPoint2 > makeWcsPairTransform(SkyWcs const &src, SkyWcs const &dst)
A Transform obtained by putting two SkyWcs objects "back to back".
A coordinate class intended to represent absolute positions.
std::shared_ptr< daf::base::PropertyList > getFitsMetadata(bool precise=false) const
Return the WCS as FITS WCS metadata.
A CRTP facade class for subclasses of Persistable.
A class used to convert scalar POD types such as double to Angle.
lsst::geom::Angle getPixelScale() const
Get the pixel scale at the pixel origin.
bool hasFitsApproximation() const
Does this SkyWcs have an approximate SkyWcs that can be represented as standard FITS WCS?
A class representing an angle.
Class for storing generic metadata.
def scale(algorithm, min, max=None, frame=None)
std::shared_ptr< SkyWcs > makeSkyWcs(daf::base::PropertySet &metadata, bool strip=false)
Construct a SkyWcs from FITS keywords.
lsst::geom::Point2D getPixelOrigin() const
Get the pixel origin, in pixels, using the LSST convention.
Point in an unspecified spherical coordinate system.
std::string writeString() const
Serialize this SkyWcs to a string, using the same format as writeStream.
static std::shared_ptr< SkyWcs > readStream(std::istream &is)
Deserialize a SkyWcs from an input stream.
std::shared_ptr< const TransformPoint2ToSpherePoint > getTransform() const
Get a TransformPoint2ToSpherePoint that transforms pixels to sky in the forward direction and sky to ...
lsst::geom::SpherePoint getSkyOrigin() const
Get the sky origin, the celestial fiducial point.
io::OutputArchiveHandle OutputArchiveHandle
A coordinate class intended to represent offsets and dimensions.
void writeStream(std::ostream &os) const
Serialize this SkyWcs to an output stream.
~SkyWcs() override=default
lsst::geom::SpherePoint pixelToSky(double x, double y) const