LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Protected Attributes | List of all members
lsst::afw::image::XYTransformFromWcsPair Class Reference

XYTransformFromWcsPair: An XYTransform obtained by putting two Wcs objects "back to back". More...

#include <Wcs.h>

Inheritance diagram for lsst::afw::image::XYTransformFromWcsPair:
lsst::afw::geom::XYTransform lsst::daf::base::Citizen

Public Member Functions

 XYTransformFromWcsPair (boost::shared_ptr< Wcs const > dst, boost::shared_ptr< Wcs const > src)
 
virtual ~XYTransformFromWcsPair ()
 
virtual boost::shared_ptr
< afw::geom::XYTransform
invert () const
 returns a "deep inverse" in this sense that the forward+inverse transforms do not share state More...
 
virtual boost::shared_ptr
< afw::geom::XYTransform
clone () const
 The following methods are needed to devirtualize the XYTransform parent class. More...
 
virtual Point2D forwardTransform (Point2D const &pixel) const
 virtuals for forward and reverse transforms More...
 
virtual Point2D reverseTransform (Point2D const &pixel) const
 
- Public Member Functions inherited from lsst::afw::geom::XYTransform
 XYTransform ()
 
virtual ~XYTransform ()
 
virtual AffineTransform linearizeForwardTransform (Point2D const &point) const
 linearized forward and reversed transforms More...
 
virtual AffineTransform linearizeReverseTransform (Point2D const &point) const
 
- Public Member Functions inherited from lsst::daf::base::Citizen
 Citizen (const std::type_info &)
 
 Citizen (Citizen const &)
 
 ~Citizen ()
 
Citizenoperator= (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...
 

Protected Attributes

boost::shared_ptr< Wcs const > _dst
 
boost::shared_ptr< Wcs const > _src
 

Additional Inherited Members

- Public Types inherited from lsst::afw::geom::XYTransform
typedef afw::geom::Point2D Point2D
 
typedef afw::geom::AffineTransform AffineTransform
 
- 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)
 
- 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...
 

Detailed Description

XYTransformFromWcsPair: An XYTransform obtained by putting two Wcs objects "back to back".

Eventually there will be an XYTransform subclass which represents a camera distortion. For now we can get a SIP camera distortion in a clunky way, by using an XYTransformFromWcsPair with a SIP-distorted TanWcs and an undistorted Wcs.

Note: this is very similar to class afw::math::detail::WcsPositionFunctor but watch out since the XY0 offset convention is different!!

Definition at line 432 of file Wcs.h.

Constructor & Destructor Documentation

XYTransformFromWcsPair::XYTransformFromWcsPair ( boost::shared_ptr< Wcs const >  dst,
boost::shared_ptr< Wcs const >  src 
)

Definition at line 1284 of file Wcs.cc.

1285  : XYTransform(), _dst(dst), _src(src)
1286 { }
boost::shared_ptr< Wcs const > _src
Definition: Wcs.h:447
boost::shared_ptr< Wcs const > _dst
Definition: Wcs.h:446
virtual lsst::afw::image::XYTransformFromWcsPair::~XYTransformFromWcsPair ( )
inlinevirtual

Definition at line 436 of file Wcs.h.

436 { }

Member Function Documentation

boost::shared_ptr< afwGeom::XYTransform > XYTransformFromWcsPair::clone ( void  ) const
virtual

The following methods are needed to devirtualize the XYTransform parent class.

Implements lsst::afw::geom::XYTransform.

Definition at line 1289 of file Wcs.cc.

1290 {
1291  return boost::make_shared<XYTransformFromWcsPair>(_dst->clone(), _src->clone());
1292 }
boost::shared_ptr< Wcs const > _src
Definition: Wcs.h:447
boost::shared_ptr< Wcs const > _dst
Definition: Wcs.h:446
afwGeom::Point2D XYTransformFromWcsPair::forwardTransform ( Point2D const &  point) const
virtual

virtuals for forward and reverse transforms

These routines are responsible for throwing exceptions if the 'point' arg is outside the domain of the transform.

Implements lsst::afw::geom::XYTransform.

Definition at line 1295 of file Wcs.cc.

1296 {
1297  //
1298  // TODO there is an alternate version of pixelToSky() which is designated for the
1299  // "knowledgeable user in need of performance". This is probably better, but first I need
1300  // to understand exactly which checks are needed (e.g. I think we need to check by hand
1301  // that both Wcs's use the same celestial coordinate system)
1302  //
1303  PTR(afw::coord::Coord) x = _src->pixelToSky(pixel);
1304  return _dst->skyToPixel(*x);
1305 }
lsst::afw::coord::Coord Coord
Definition: misc.h:36
boost::shared_ptr< Wcs const > _src
Definition: Wcs.h:447
boost::shared_ptr< Wcs const > _dst
Definition: Wcs.h:446
#define PTR(...)
Definition: base.h:41
double x
table::PointKey< int > pixel
boost::shared_ptr< afwGeom::XYTransform > XYTransformFromWcsPair::invert ( ) const
virtual

returns a "deep inverse" in this sense that the forward+inverse transforms do not share state

Reimplemented from lsst::afw::geom::XYTransform.

Definition at line 1313 of file Wcs.cc.

1314 {
1315  // just swap src, dst
1316  return boost::make_shared<XYTransformFromWcsPair> (_src, _dst);
1317 }
boost::shared_ptr< Wcs const > _src
Definition: Wcs.h:447
boost::shared_ptr< Wcs const > _dst
Definition: Wcs.h:446
afwGeom::Point2D XYTransformFromWcsPair::reverseTransform ( Point2D const &  pixel) const
virtual

Implements lsst::afw::geom::XYTransform.

Definition at line 1307 of file Wcs.cc.

1308 {
1309  PTR(afw::coord::Coord) x = _dst->pixelToSky(pixel);
1310  return _src->skyToPixel(*x);
1311 }
lsst::afw::coord::Coord Coord
Definition: misc.h:36
boost::shared_ptr< Wcs const > _src
Definition: Wcs.h:447
boost::shared_ptr< Wcs const > _dst
Definition: Wcs.h:446
#define PTR(...)
Definition: base.h:41
double x
table::PointKey< int > pixel

Member Data Documentation

boost::shared_ptr< Wcs const> lsst::afw::image::XYTransformFromWcsPair::_dst
protected

Definition at line 446 of file Wcs.h.

boost::shared_ptr< Wcs const> lsst::afw::image::XYTransformFromWcsPair::_src
protected

Definition at line 447 of file Wcs.h.


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