lsst.afw  13.0-73-gb2a4e38
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
lsst::afw::geom::SkyWcs Class Reference

A WCS that transform pixels to ICRS RA/Dec using the LSST standard for pixels. More...

#include <SkyWcs.h>

Inheritance diagram for lsst::afw::geom::SkyWcs:
lsst::afw::geom::Transform< Point2Endpoint, IcrsCoordEndpoint >

Public Member Functions

 SkyWcs (SkyWcs const &)=default
 
 SkyWcs (SkyWcs &&)=default
 
SkyWcs & operator= (SkyWcs const &)=delete
 
SkyWcs & operator= (SkyWcs &&)=delete
 
 SkyWcs (Point2D const &crpix, coord::IcrsCoord const &crval, Eigen::Matrix2d const &cdMatrix)
 Construct a pure tangent SkyWcs. More...
 
 SkyWcs (daf::base::PropertyList &metadata, bool strip=true)
 Construct a WCS from FITS keywords. More...
 
 SkyWcs (ast::FrameSet const &frameSet)
 Construct a WCS from an ast::FrameSet. More...
 
 ~SkyWcs ()
 
Angle getPixelScale (Point2D const &pixel) const
 Get the pixel scale at the specified pixel position. More...
 
Angle getPixelScale () const
 Get the pixel scale at the pixel origin. More...
 
Point2D getPixelOrigin () const
 Get CRPIX, the pixel origin, using the LSST convention. More...
 
coord::IcrsCoord getSkyOrigin () const
 Get CRVAL, the sky origin or celestial fiducial point. More...
 
Eigen::Matrix2d getCdMatrix (Point2D const &pixel) const
 Get the 2x2 CD matrix at the specified pixel position. More...
 
Eigen::Matrix2d getCdMatrix () const
 Get the 2x2 CD matrix at the pixel origin. More...
 
SkyWcs getTanWcs (Point2D const &pixel) const
 Get a local TAN WCS approximation to this WCS at the specified pixel position. More...
 
SkyWcs copyAtShiftedPixelOrigin (Extent2D const &shift) const
 Return a copy of this SkyWcs with the pixel origin by the specified amount. More...
 
std::pair< Angle, Angle > pixelToSky (double x, double y) const
 Compute sky position(s) from pixel position(s) More...
 
coord::IcrsCoord pixelToSky (Point2D const &pixel) const
 Compute sky position(s) from pixel position(s) More...
 
std::vector< coord::IcrsCoord > pixelToSky (std::vector< Point2D > const &pixels) const
 Compute sky position(s) from pixel position(s) More...
 
std::pair< double, double > skyToPixel (Angle const &ra, Angle const &dec) const
 Compute pixel position(s) from sky position(s) More...
 
Point2D skyToPixel (coord::IcrsCoord const &sky) const
 Compute pixel position(s) from sky position(s) More...
 
std::vector< Point2D > skyToPixel (std::vector< coord::IcrsCoord > const &sky) const
 Compute pixel position(s) from sky position(s) More...
 
- Public Member Functions inherited from lsst::afw::geom::Transform< Point2Endpoint, IcrsCoordEndpoint >
 Transform (Transform const &)=default
 
 Transform (Transform &&)=default
 
 Transform (ast::Mapping const &mapping, bool simplify=true)
 Construct a Transform from a deep copy of an ast::Mapping. More...
 
 Transform (ast::FrameSet const &frameSet, bool simplify=true)
 Construct a Transform from a deep copy of a FrameSet. More...
 
Transform & operator= (Transform const &)=delete
 
Transform & operator= (Transform &&)=delete
 
virtual ~Transform ()
 
bool hasForward () const
 Test if this method has a forward transform. More...
 
bool hasInverse () const
 Test if this method has an inverse transform. More...
 
Point2Endpoint getFromEndpoint () const
 Get the "from" endpoint. More...
 
std::shared_ptr< const
ast::FrameSet > 
getFrameSet () const
 Get the contained frameset. More...
 
IcrsCoordEndpoint getToEndpoint () const
 Get the "to" endpoint. More...
 
ToPoint applyForward (FromPoint const &point) const
 Transform one point in the forward direction ("from" to "to") More...
 
ToArray applyForward (FromArray const &array) const
 Transform an array of points in the forward direction ("from" to "to") More...
 
FromPoint applyInverse (ToPoint const &point) const
 Transform one point in the inverse direction ("to" to "from") More...
 
FromArray applyInverse (ToArray const &array) const
 Transform an array of points in the inverse direction ("to" to "from") More...
 
Transform< IcrsCoordEndpoint,
Point2Endpoint > 
getInverse () const
 The inverse of this Transform. More...
 
Eigen::MatrixXd getJacobian (FromPoint const &x) const
 The Jacobian matrix of this Transform. More...
 
Transform< Point2Endpoint,
NextToEndpoint > 
then (Transform< IcrsCoordEndpoint, NextToEndpoint > const &next) const
 Concatenate two Transforms. More...
 

Additional Inherited Members

- Public Types inherited from lsst::afw::geom::Transform< Point2Endpoint, IcrsCoordEndpoint >
using FromArray = typename Point2Endpoint::Array
 
using FromPoint = typename Point2Endpoint::Point
 
using ToArray = typename IcrsCoordEndpoint::Array
 
using ToPoint = typename IcrsCoordEndpoint::Point
 
- Protected Member Functions inherited from lsst::afw::geom::Transform< Point2Endpoint, IcrsCoordEndpoint >
 Transform (std::shared_ptr< ast::FrameSet > &&frameSet)
 Construct a Transform from a shared pointer to a FrameSet. More...
 

Detailed Description

A WCS that transform pixels to ICRS RA/Dec using the LSST standard for pixels.

The LSST standard for pixel position is: 0,0 is the center of the lower left pixel of the parent image (unlike FITS standard, which uses 1,1 as the center of the lower left pixel of the subimage).

The forward direction transforms from pixels (actual, if known, else nominal) to ICRS RA, Dec.

The contained ast::FrameSet must have the following frames. All are of class ast::Frame except the sky frame. The domain is listed first, if set:

If ACTUAL_PIXEL0 is present then it will be the base frame (the starting point for forward transformations else PIXEL0 will be the base frame. The SkyFrame is always the current frame (the ending point for forward transformations).

Constructors must set the following properties of the contained ast::FrameSet:

Definition at line 97 of file SkyWcs.h.

Constructor & Destructor Documentation

lsst::afw::geom::SkyWcs::SkyWcs ( SkyWcs const &  )
default
lsst::afw::geom::SkyWcs::SkyWcs ( SkyWcs &&  )
default
lsst::afw::geom::SkyWcs::SkyWcs ( Point2D const &  crpix,
coord::IcrsCoord const &  crval,
Eigen::Matrix2d const &  cdMatrix 
)
explicit

Construct a pure tangent SkyWcs.

Parameters
[in]crpixCenter of projection on the CCD using the LSST convention: 0, 0 is the lower left pixel of the parent image
[in]crvalCenter of projection on the sky
[in]cdMatrixCD matrix, where element (i-1, j-1) corresponds to FITS keyword CDi_j and i, j have range [1, 2]. May be computed by calling makeCdMatrix.
lsst::afw::geom::SkyWcs::SkyWcs ( daf::base::PropertyList &  metadata,
bool  strip = true 
)
explicit

Construct a WCS from FITS keywords.

In addition to standard FITS WCS keywords uses these IRAF keywords: LTV1, LTV2: offset of subimage with respect to parent image

Parameters
[in]metadataFITS header metadata
[in]stripStrip keywords used to create the SkyWcs? Even if true. keywords that might used for other purposes are retained, including LTV1, LTV2 and all date and time keywords except EQUINOX
lsst::afw::geom::SkyWcs::SkyWcs ( ast::FrameSet const &  frameSet)
explicit

Construct a WCS from an ast::FrameSet.

This is the most general constructor; it can be used to define any celestial WCS as long as it contains the required frames.

Exceptions
lsst::pex::exceptions::InvalidParameterErrorif frameSet is missing any of the required frames.
lsst::afw::geom::SkyWcs::~SkyWcs ( )
inline

Definition at line 139 of file SkyWcs.h.

Member Function Documentation

SkyWcs lsst::afw::geom::SkyWcs::copyAtShiftedPixelOrigin ( Extent2D const &  shift) const

Return a copy of this SkyWcs with the pixel origin by the specified amount.

Eigen::Matrix2d lsst::afw::geom::SkyWcs::getCdMatrix ( Point2D const &  pixel) const

Get the 2x2 CD matrix at the specified pixel position.

Eigen::Matrix2d lsst::afw::geom::SkyWcs::getCdMatrix ( ) const

Get the 2x2 CD matrix at the pixel origin.

Point2D lsst::afw::geom::SkyWcs::getPixelOrigin ( ) const

Get CRPIX, the pixel origin, using the LSST convention.

Angle lsst::afw::geom::SkyWcs::getPixelScale ( Point2D const &  pixel) const

Get the pixel scale at the specified pixel position.

The scale is the square root of the area of the specified pixel on the sky.

Angle lsst::afw::geom::SkyWcs::getPixelScale ( ) const

Get the pixel scale at the pixel origin.

The scale is the square root of the area of the specified pixel on the sky.

coord::IcrsCoord lsst::afw::geom::SkyWcs::getSkyOrigin ( ) const

Get CRVAL, the sky origin or celestial fiducial point.

SkyWcs lsst::afw::geom::SkyWcs::getTanWcs ( Point2D const &  pixel) const

Get a local TAN WCS approximation to this WCS at the specified pixel position.

SkyWcs& lsst::afw::geom::SkyWcs::operator= ( SkyWcs const &  )
delete
SkyWcs& lsst::afw::geom::SkyWcs::operator= ( SkyWcs &&  )
delete
std::pair<Angle, Angle> lsst::afw::geom::SkyWcs::pixelToSky ( double  x,
double  y 
) const

Compute sky position(s) from pixel position(s)

This is another name for applyForward, plus an overload that takes a pair of doubles.

coord::IcrsCoord lsst::afw::geom::SkyWcs::pixelToSky ( Point2D const &  pixel) const
inline

Compute sky position(s) from pixel position(s)

This is another name for applyForward, plus an overload that takes a pair of doubles.

Definition at line 192 of file SkyWcs.h.

std::vector<coord::IcrsCoord> lsst::afw::geom::SkyWcs::pixelToSky ( std::vector< Point2D > const &  pixels) const
inline

Compute sky position(s) from pixel position(s)

This is another name for applyForward, plus an overload that takes a pair of doubles.

Definition at line 193 of file SkyWcs.h.

std::pair<double, double> lsst::afw::geom::SkyWcs::skyToPixel ( Angle const &  ra,
Angle const &  dec 
) const

Compute pixel position(s) from sky position(s)

This is another name for applyInverse, plus an overload that takes a pair of lsst:afw::geom::Angle.

Point2D lsst::afw::geom::SkyWcs::skyToPixel ( coord::IcrsCoord const &  sky) const
inline

Compute pixel position(s) from sky position(s)

This is another name for applyInverse, plus an overload that takes a pair of lsst:afw::geom::Angle.

Definition at line 205 of file SkyWcs.h.

std::vector<Point2D> lsst::afw::geom::SkyWcs::skyToPixel ( std::vector< coord::IcrsCoord > const &  sky) const
inline

Compute pixel position(s) from sky position(s)

This is another name for applyInverse, plus an overload that takes a pair of lsst:afw::geom::Angle.

Definition at line 206 of file SkyWcs.h.


The documentation for this class was generated from the following file: