lsst.afw  13.0-73-gb2a4e38
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
lsst::afw::geom::detail Namespace Reference

Functions

std::shared_ptr< ast::SkyFrame > getSkyFrame (ast::FrameSet const &frameSet, int index, bool copy)
 Get the specified frame of a FrameSet as a SkyFrame. More...
 
std::shared_ptr
< daf::base::PropertyList > 
makeTanWcsMetadata (Point2D const &crpix, coord::IcrsCoord const &crval, Eigen::Matrix2d const &cdMatrix)
 Make FITS metadata for a pure tangent WCS. More...
 
std::shared_ptr< ast::FrameSet > readFitsWcs (daf::base::PropertyList &metadata, bool strip=true)
 Read a FITS convention WCS FrameSet from FITS metadata. More...
 
std::shared_ptr< ast::FrameSet > readLsstSkyWcs (daf::base::PropertyList &metadata, bool strip=true)
 Read an LSST sky WCS FrameSet from a FITS header: 0,0 is the lower left corner of the parent image. More...
 
template<int N>
double computeExtentNorm (Extent< double, N > const &s)
 
template<int N>
int computeExtentNorm (Extent< int, N > const &s)
 

Function Documentation

template<int N>
double lsst::afw::geom::detail::computeExtentNorm ( Extent< double, N > const &  s)

Definition at line 45 of file Extent.h.

template<int N>
int lsst::afw::geom::detail::computeExtentNorm ( Extent< int, N > const &  s)

Definition at line 50 of file Extent.h.

std::shared_ptr<ast::SkyFrame> lsst::afw::geom::detail::getSkyFrame ( ast::FrameSet const &  frameSet,
int  index,
bool  copy 
)

Get the specified frame of a FrameSet as a SkyFrame.

Parameters
[in]frameSetFrameSet from which to get the SkyFrame
[in]indexIndex of SkyFrame. This value should lie in the range 1 to the number of frames in the FrameSet (as given by getNFrame). A value of FrameSet::Base or FrameSet::CURRENT may be given to specify the base Frame or the current Frame, respectively.
[in]copyIf true return a deep copy of the SkyFrame, else a shallow copy
std::shared_ptr<daf::base::PropertyList> lsst::afw::geom::detail::makeTanWcsMetadata ( Point2D const &  crpix,
coord::IcrsCoord const &  crval,
Eigen::Matrix2d const &  cdMatrix 
)

Make FITS metadata for a pure tangent WCS.

Parameters
[in]crpixCenter of projection on the CCD using the LSST convention: 0, 0 is the lower left pixel of the 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]
std::shared_ptr<ast::FrameSet> lsst::afw::geom::detail::readFitsWcs ( daf::base::PropertyList &  metadata,
bool  strip = true 
)

Read a FITS convention WCS FrameSet from FITS metadata.

The resulting FrameSet may be any kind of WCS supported by FITS; if it is a celestial WCS then 1,1 will be the lower left corner of the image (the FITS convention, not the LSST convention).

Parameters
[in,out]metadataFITS header cards
[in]stripIf true strip items from metadata that are used to create the WCS
std::shared_ptr<ast::FrameSet> lsst::afw::geom::detail::readLsstSkyWcs ( daf::base::PropertyList &  metadata,
bool  strip = true 
)

Read an LSST sky WCS FrameSet from a FITS header: 0,0 is the lower left corner of the parent image.

Read standard FITS WCS header cards including IRAF standard "LTV1" and "LTV2" cards, which, if found, specify the position of the subimage in the parent image.

Set the output SkyFrame's SkyRef to CRVAL and SkyRefIs="Ignore" so the SkyRef is ignored instead of being treated as an offset.

Warning
the general SkyWcs generated by LSST software cannot be exactly represented using standard WCS FITS cards, and so this function cannot read those. This function is intended for two purposes:
  • Read the standard FITS WCS found in raw data and other images from non-LSST observatories and convert it to the LSST pixel convention.
  • Read the approximate FITS WCS that LSST writes to FITS images (for use by non-LSST code).

The frames of the returned WCS will be as follows:

  • base: an ast::Frame with domain "PIXELS0": pixels with 0,0 the lower left corner of the parent image
  • current: an ast::SkyFrame: ICRS RA, Dec
Parameters
[in,out]metadataFITS header cards
[in]stripIf true strip items from metadata that are used to create the WCS, excluding LTV1 and LTV2, which are always retained.