|
LSSTApplications
8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
|
Implementation of the WCS standard for the special case of the Gnomonic (tangent plane) projection. More...
#include <TanWcs.h>
Public Types | |
| typedef boost::shared_ptr < lsst::afw::image::TanWcs > | Ptr |
| typedef boost::shared_ptr < lsst::afw::image::TanWcs const > | ConstPtr |
Public Types inherited from lsst::afw::image::Wcs | |
| typedef boost::shared_ptr< Wcs > | Ptr |
| typedef boost::shared_ptr< Wcs const > | ConstPtr |
Public Types inherited from lsst::daf::base::Persistable | |
| typedef boost::shared_ptr < Persistable > | Ptr |
Public Types inherited from lsst::daf::base::Citizen | |
| enum | { magicSentinel = 0xdeadbeef } |
| typedef unsigned long | memId |
| Type of the block's ID. More... | |
| typedef memId(* | memNewCallback )(const memId cid) |
| A function used to register a callback. More... | |
| typedef memId(* | memCallback )(const Citizen *ptr) |
Public Member Functions | |
| TanWcs (geom::Point2D const &crval, geom::Point2D const &crpix, Eigen::Matrix2d const &cd, double equinox=2000, std::string const &raDecSys="FK5", std::string const &cunits1="deg", std::string const &cunits2="deg") | |
| Construct a tangent plane wcs without distortion terms. More... | |
| TanWcs (geom::Point2D const &crval, geom::Point2D const &crpix, Eigen::Matrix2d const &cd, Eigen::MatrixXd const &sipA, Eigen::MatrixXd const &sipB, Eigen::MatrixXd const &sipAp, Eigen::MatrixXd const &sipBp, double equinox=2000, std::string const &raDecSys="FK5", std::string const &cunits1="deg", std::string const &cunits2="deg") | |
| Construct a tangent plane wcs with distortion terms. More... | |
| virtual | ~TanWcs () |
| virtual boost::shared_ptr< Wcs > | clone () const |
| Polymorphic deep-copy. More... | |
| geom::Angle | pixelScale () const |
| Returns the pixel scale, in Angle/pixel. More... | |
| geom::Point2D | distortPixel (geom::Point2D const &pixel) const |
| Applies the SIP AP and BP distortion (used in the skyToPixel direction) More... | |
| geom::Point2D | undistortPixel (geom::Point2D const &pixel) const |
| Applies the SIP A and B un-distortion (used in the pixelToSky direction) More... | |
| bool | hasDistortion () const |
| boost::shared_ptr < daf::base::PropertyList > | getFitsMetadata () const |
| Return a PropertyList containing FITS header keywords that can be used to save the Wcs.x. More... | |
| void | setDistortionMatrices (Eigen::MatrixXd const &sipA, Eigen::MatrixXd const &sipB, Eigen::MatrixXd const &sipAp, Eigen::MatrixXd const &sipBp) |
| Set the distortion matrices. More... | |
Public Member Functions inherited from lsst::afw::image::Wcs | |
| Wcs (lsst::afw::geom::Point2D const &crval, lsst::afw::geom::Point2D const &crpix, Eigen::Matrix2d const &CD, std::string const &ctype1="RA---TAN", std::string const &ctype2="DEC--TAN", double equinox=2000, std::string const &raDecSys="ICRS", std::string const &cunits1="deg", std::string const &cunits2="deg") | |
| Create a Wcs object with some known information. More... | |
| virtual | ~Wcs () |
| bool | operator== (Wcs const &other) const |
| bool | operator!= (Wcs const &other) const |
| lsst::afw::coord::Coord::Ptr | getSkyOrigin () const |
| Returns CRVAL. More... | |
| lsst::afw::geom::Point2D | getPixelOrigin () const |
| Returns CRPIX (corrected to LSST convention). More... | |
| Eigen::Matrix2d | getCDMatrix () const |
| Returns CD matrix. You would never have guessed that from the name. More... | |
| virtual void | flipImage (int flipLR, int flipTB, lsst::afw::geom::Extent2I dimensions) const |
| Flip CD matrix around the y-axis. More... | |
| virtual void | rotateImageBy90 (int nQuarter, lsst::afw::geom::Extent2I dimensions) const |
| bool | isFlipped () const |
| double | pixArea (lsst::afw::geom::Point2D pix00) const |
Sky area covered by a pixel at position pix00 in units of square degrees. More... | |
| geom::Angle | pixelScale () const |
| Returns the pixel scale [Angle/pixel]. More... | |
| boost::shared_ptr< coord::Coord > | pixelToSky (double pix1, double pix2) const |
| Convert from celestial coordinates to pixel coordinates. More... | |
| boost::shared_ptr< coord::Coord > | pixelToSky (lsst::afw::geom::Point2D const &pixel) const |
| Convert from celestial coordiantes to pixel coordinates. More... | |
| void | pixelToSky (double pixel1, double pixel2, geom::Angle &sky1, geom::Angle &sky2) const |
| Convert from celestial coordiantes to pixel coordinates. More... | |
| geom::Point2D | skyToPixel (geom::Angle sky1, geom::Angle sky2) const |
| Convert from sky coordinates (e.g ra/dec) to pixel positions. More... | |
| geom::Point2D | skyToPixel (coord::Coord const &coord) const |
| Convert from sky coordinates (e.g ra/dec) to pixel positions. More... | |
| geom::Point2D | skyToIntermediateWorldCoord (coord::Coord const &coord) const |
| Convert from sky coordinates (e.g ra/dec) to intermediate world coordinates. More... | |
| geom::LinearTransform | getLinearTransform () const |
| geom::AffineTransform | linearizePixelToSky (coord::Coord const &coord, geom::AngleUnit skyUnit=geom::degrees) const |
| Return the local linear approximation to Wcs::pixelToSky at a point given in sky coordinates. More... | |
| geom::AffineTransform | linearizePixelToSky (geom::Point2D const &pix, geom::AngleUnit skyUnit=geom::degrees) const |
| Return the local linear approximation to Wcs::pixelToSky at a point given in pixel coordinates. More... | |
| geom::AffineTransform | linearizeSkyToPixel (coord::Coord const &coord, geom::AngleUnit skyUnit=geom::degrees) const |
| Return the local linear approximation to Wcs::skyToPixel at a point given in sky coordinates. More... | |
| geom::AffineTransform | linearizeSkyToPixel (geom::Point2D const &pix, geom::AngleUnit skyUnit=geom::degrees) const |
| Return the local linear approximation to Wcs::skyToPixel at a point given in pixel coordinates. More... | |
| void | shiftReferencePixel (geom::Extent2D const &d) |
| void | shiftReferencePixel (double dx, double dy) |
| Move the pixel reference position by (dx, dy) Used when persisting and retrieving sub-images. The lsst convention is that Wcs returns pixel position (which is based on position in the parent image), but the fits convention is to return pixel index (which is bases on position in the sub-image). In order that the fits files we create make sense to other fits viewers, we change to the fits convention when writing out images. More... | |
| virtual bool | isPersistable () const |
| Whether the Wcs is persistable using afw::table::io archives. More... | |
Public Member Functions inherited from lsst::daf::base::Persistable | |
| Persistable (void) | |
| virtual | ~Persistable (void) |
| template<class Archive > | |
| void | serialize (Archive &, unsigned int const) |
Public Member Functions inherited from lsst::daf::base::Citizen | |
| Citizen (const std::type_info &) | |
| Citizen (Citizen const &) | |
| ~Citizen () | |
| Citizen & | operator= (Citizen const &) |
| std::string | repr () const |
| Return a string representation of a Citizen. More... | |
| void | markPersistent (void) |
| Mark a Citizen as persistent and not destroyed until process end. More... | |
| memId | getId () const |
| Return the Citizen's ID. More... | |
Public Member Functions inherited from lsst::afw::table::io::Persistable | |
| void | writeFits (std::string const &fileName, std::string const &mode="w") const |
| Write the object to a regular FITS file. More... | |
| void | writeFits (fits::MemFileManager &manager, std::string const &mode="w") const |
| Write the object to a FITS image in memory. More... | |
| void | writeFits (fits::Fits &fitsfile) const |
| Write the object to an already-open FITS object. More... | |
| virtual | ~Persistable () |
Static Public Member Functions | |
| 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. More... | |
Static Public Member Functions inherited from lsst::afw::table::io::PersistableFacade< TanWcs > | |
| static boost::shared_ptr< TanWcs > | readFits (fits::Fits &fitsfile) |
| Read an object from an already open FITS object. More... | |
| static boost::shared_ptr< TanWcs > | readFits (std::string const &fileName, int hdu=0) |
| Read an object from a regular FITS file. More... | |
| static boost::shared_ptr< TanWcs > | readFits (fits::MemFileManager &manager, int hdu=0) |
| Read an object from a FITS file in memory. More... | |
Static Public Member Functions inherited from lsst::daf::base::Citizen | |
| static bool | hasBeenCorrupted () |
| Check all allocated blocks for corruption. More... | |
| static memId | getNextMemId () |
| Return the memId of the next object to be allocated. More... | |
| static int | init () |
| Called once when the memory system is being initialised. More... | |
| static int | census (int, memId startingMemId=0) |
| How many active Citizens are there? More... | |
| static void | census (std::ostream &stream, memId startingMemId=0) |
| Print a list of all active Citizens to stream, sorted by ID. More... | |
| static const std::vector < const Citizen * > * | census () |
| Return a (newly allocated) std::vector of active Citizens sorted by ID. More... | |
| static memId | setNewCallbackId (memId id) |
| Call the NewCallback when block is allocated. More... | |
| static memId | setDeleteCallbackId (memId id) |
| Call the current DeleteCallback when block is deleted. More... | |
| static memNewCallback | setNewCallback (memNewCallback func) |
| Set the NewCallback function. More... | |
| static memCallback | setDeleteCallback (memCallback func) |
| Set the DeleteCallback function. More... | |
| static memCallback | setCorruptionCallback (memCallback func) |
| Set the CorruptionCallback function. More... | |
Static Public Member Functions inherited from lsst::afw::table::io::PersistableFacade< Wcs > | |
| static boost::shared_ptr< Wcs > | readFits (fits::Fits &fitsfile) |
| Read an object from an already open FITS object. More... | |
| static boost::shared_ptr< Wcs > | readFits (std::string const &fileName, int hdu=0) |
| Read an object from a regular FITS file. More... | |
| static boost::shared_ptr< Wcs > | readFits (fits::MemFileManager &manager, int hdu=0) |
| Read an object from a FITS file in memory. More... | |
Private Member Functions | |
| virtual std::string | getPersistenceName () const |
| Return the unique name used to persist this object and look up its factory. More... | |
| virtual void | write (OutputArchiveHandle &handle) const |
| Write the object to one or more catalogs. More... | |
| virtual bool | _isSubset (Wcs const &) const |
| TanWcs () | |
| TanWcs (boost::shared_ptr< daf::base::PropertySet const > const &fitsMetadata) | |
| TanWcs (TanWcs const &rhs) | |
| TanWcs (afw::table::BaseRecord const &mainRecord, boost::shared_ptr< afw::table::BaseRecord const > sipRecord) | |
| TanWcs & | operator= (const TanWcs &) |
| virtual void | pixelToSkyImpl (double pixel1, double pixel2, geom::Angle skyTmp[2]) const |
| virtual geom::Point2D | skyToPixelImpl (geom::Angle sky1, geom::Angle sky2) const |
Private Attributes | |
| bool | _hasDistortion |
| Eigen::MatrixXd | _sipA |
| Eigen::MatrixXd | _sipB |
| Eigen::MatrixXd | _sipAp |
| Eigen::MatrixXd | _sipBp |
Friends | |
| class | TanWcsFactory |
| boost::shared_ptr< Wcs > | makeWcs (boost::shared_ptr< daf::base::PropertySet > const &metadata, bool) |
Additional Inherited Members | |
Protected Types inherited from lsst::afw::table::io::Persistable | |
| typedef io::OutputArchiveHandle | OutputArchiveHandle |
Protected Member Functions inherited from lsst::afw::image::Wcs | |
| virtual std::string | getPythonModule () const |
| Return the fully-qualified Python module that should be imported to guarantee that its factory is registered. More... | |
| Wcs () | |
| Construct an invalid Wcs given no arguments. More... | |
| Wcs (boost::shared_ptr< lsst::daf::base::PropertySet const > const &fitsMetadata) | |
| Wcs (afw::table::BaseRecord const &record) | |
| Wcs (Wcs const &rhs) | |
| Copy constructor. More... | |
| Wcs & | operator= (const Wcs &) |
| afw::coord::Coord::Ptr | makeCorrectCoord (geom::Angle sky0, geom::Angle sky1) const |
| Given a sky position, use the values stored in ctype and radesys to return the correct sub-class of Coord. More... | |
| afw::coord::Coord::Ptr | convertCoordToSky (coord::Coord const &coord) const |
| virtual geom::AffineTransform | linearizePixelToSkyInternal (geom::Point2D const &pix, coord::Coord const &coord, geom::AngleUnit skyUnit) const |
| virtual geom::AffineTransform | linearizeSkyToPixelInternal (geom::Point2D const &pix, coord::Coord const &coord, geom::AngleUnit skyUnit) const |
| void | initWcsLibFromFits (boost::shared_ptr< lsst::daf::base::PropertySet const > const &fitsMetadata) |
| Parse a fits header, extract the relevant metadata and create a Wcs object. More... | |
| void | _initWcs () |
| void | _setWcslibParams () |
Protected Member Functions inherited from lsst::afw::table::io::Persistable | |
| Persistable () | |
| Persistable (Persistable const &other) | |
| void | operator= (Persistable const &other) |
Protected Attributes inherited from lsst::afw::image::Wcs | |
| struct wcsprm * | _wcsInfo |
| int | _nWcsInfo |
| int | _relax |
| Degree of permissiveness for wcspih (0 for strict); see wcshdr.h for details. More... | |
| int | _wcsfixCtrl |
| Do potentially unsafe translations of non-standard unit strings? 0/1 = no/yes. More... | |
| int | _wcshdrCtrl |
| Controls messages to stderr from wcshdr (0 for none); see wcshdr.h for details. More... | |
| int | _nReject |
| coord::CoordSystem | _coordSystem |
Implementation of the WCS standard for the special case of the Gnomonic (tangent plane) projection.
This class treats the special case of tangent plane projection. It extends the Wcs standard by optionally accounting for distortion in the image plane using the Simple Imaging Polynomial (SIP) convention. This convention is described in Shupe et al. (2005) (Astronomical Data Analysis Software and Systems XIV, Asp Conf. Series Vol XXX, Ed: Shopbell et al.), and descibed in some more detail in http://web.ipac.caltech.edu/staff/fmasci/home/wise/codeVdist.html
To convert from pixel coordintates to radec ("intermediate world coordinates"), first use the matrices _sipA and _sipB to calculate undistorted coorinates (i.e where on the chip the image would lie if the optics gave undistorted images), then pass these undistorted coorinates wcsp2s() to calculate radec.
For the reverse, radec -> pixels, convert the radec to undistorted coords, and then use the _sipAp and _sipBp matrices to add in the distortion terms.
| typedef boost::shared_ptr<lsst::afw::image::TanWcs const> lsst::afw::image::TanWcs::ConstPtr |
| typedef boost::shared_ptr<lsst::afw::image::TanWcs> lsst::afw::image::TanWcs::Ptr |
| lsst::afw::image::TanWcs::TanWcs | ( | geom::Point2D const & | crval, |
| geom::Point2D const & | crpix, | ||
| Eigen::Matrix2d const & | cd, | ||
| double | equinox = 2000, |
||
| std::string const & | raDecSys = "FK5", |
||
| std::string const & | cunits1 = "deg", |
||
| std::string const & | cunits2 = "deg" |
||
| ) |
Construct a tangent plane wcs without distortion terms.
| crval | The sky position of the reference point |
| crpix | The pixel position corresponding to crval in Lsst units |
| cd | Matrix describing transformations from pixel to sky positions |
| equinox | Equinox of coordinate system, eg 2000 (Julian) or 1950 (Besselian) |
| raDecSys | System used to describe right ascension or declination, e.g FK4, FK5 or ICRS |
| cunits1 | Units of sky position. One of deg, arcmin or arcsec |
| cunits2 | Units of sky position. One of deg, arcmin or arcsec |
| lsst::afw::image::TanWcs::TanWcs | ( | geom::Point2D const & | crval, |
| geom::Point2D const & | crpix, | ||
| Eigen::Matrix2d const & | cd, | ||
| Eigen::MatrixXd const & | sipA, | ||
| Eigen::MatrixXd const & | sipB, | ||
| Eigen::MatrixXd const & | sipAp, | ||
| Eigen::MatrixXd const & | sipBp, | ||
| double | equinox = 2000, |
||
| std::string const & | raDecSys = "FK5", |
||
| std::string const & | cunits1 = "deg", |
||
| std::string const & | cunits2 = "deg" |
||
| ) |
Construct a tangent plane wcs with distortion terms.
| crval | The sky position of the reference point |
| crpix | The pixel position corresponding to crval in Lsst units |
| cd | Matrix describing transformations from pixel to sky positions |
| sipA | Forward distortion matrix for axis 1 |
| sipB | Forward distortion matrix for axis 2 |
| sipAp | Reverse distortion matrix for axis 1 |
| sipBp | Reverse distortion matrix for axis 2 |
| equinox | Equinox of coordinate system, eg 2000 (Julian) or 1950 (Besselian) |
| raDecSys | System used to describe right ascension or declination, e.g FK4, FK5 or ICRS |
| cunits1 | Units of sky position. One of deg, arcmin or arcsec |
| cunits2 | Units of sky position. One of deg, arcmin or arcsec |
|
inlinevirtual |
|
private |
|
private |
|
private |
|
private |
|
privatevirtual |
Reimplemented from lsst::afw::image::Wcs.
|
virtual |
Polymorphic deep-copy.
Reimplemented from lsst::afw::image::Wcs.
|
static |
Decode the SIP headers for a given matrix, if present.
| geom::Point2D lsst::afw::image::TanWcs::distortPixel | ( | geom::Point2D const & | pixel | ) | const |
Applies the SIP AP and BP distortion (used in the skyToPixel direction)
|
virtual |
Return a PropertyList containing FITS header keywords that can be used to save the Wcs.x.
Return the Wcs as a fits header.
Reimplemented from lsst::afw::image::Wcs.
|
privatevirtual |
Return the unique name used to persist this object and look up its factory.
Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.
Reimplemented from lsst::afw::image::Wcs.
|
inlinevirtual |
| geom::Angle lsst::afw::image::TanWcs::pixelScale | ( | ) | const |
Returns the pixel scale, in Angle/pixel.
|
privatevirtual |
Reimplemented from lsst::afw::image::Wcs.
| void lsst::afw::image::TanWcs::setDistortionMatrices | ( | Eigen::MatrixXd const & | sipA, |
| Eigen::MatrixXd const & | sipB, | ||
| Eigen::MatrixXd const & | sipAp, | ||
| Eigen::MatrixXd const & | sipBp | ||
| ) |
Set the distortion matrices.
| sipA | Forward distortion matrix for 1st axis |
| sipB | Forward distortion matrix for 2nd axis |
| sipAp | Reverse distortion matrix for 1st axis |
| sipBp | Reverse distortion matrix for 2nd axis |
Because the base class provides the option of creating a Wcs without distortion coefficients we supply a way of setting them here. This also help make code neater by breaking an enormous constructor (above) into two small pieces.
|
privatevirtual |
Reimplemented from lsst::afw::image::Wcs.
| geom::Point2D lsst::afw::image::TanWcs::undistortPixel | ( | geom::Point2D const & | pixel | ) | const |
Applies the SIP A and B un-distortion (used in the pixelToSky direction)
|
privatevirtual |
Write the object to one or more catalogs.
The handle object passed to this function provides an interface for adding new catalogs and adding nested objects to the same archive (while checking for duplicates). See OutputArchiveHandle for more information.
Reimplemented from lsst::afw::image::Wcs.
|
friend |
1.8.5