lsst.meas.algorithms  14.0-18-gf7dca964+3
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
lsst::meas::algorithms::WarpedPsf Class Reference

A Psf class that maps an arbitrary Psf through a coordinate transformation. More...

#include <WarpedPsf.h>

Inheritance diagram for lsst::meas::algorithms::WarpedPsf:
lsst::meas::algorithms::ImagePsf lsst::afw::table::io::PersistableFacade< ImagePsf > lsst::afw::detection::Psf lsst::daf::base::Citizen lsst::daf::base::Persistable PersistableFacade< Psf > lsst::afw::table::io::Persistable

Public Types

enum  ImageOwnerEnum
 
typedef math::Kernel::Pixel Pixel
 
typedef image::Image< PixelImage
 
typedef unsigned long memId
 
typedef memId(* memNewCallback) (const memId cid)
 
typedef memId(* memCallback) (const Citizen *ptr)
 
typedef std::shared_ptr< PersistablePtr
 

Public Member Functions

 WarpedPsf (boost::shared_ptr< afw::detection::Psf const > undistortedPsf, boost::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > distortion, boost::shared_ptr< afw::math::WarpingControl const > control)
 Construct WarpedPsf from unwarped psf and distortion. More...
 
 WarpedPsf (boost::shared_ptr< afw::detection::Psf const > undistortedPsf, boost::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > distortion, std::string const &kernelName="lanczos3", unsigned int cache=10000)
 
virtual afw::geom::Point2D getAveragePosition () const
 Return the average of the positions of the stars that went into this Psf. More...
 
virtual boost::shared_ptr< afw::detection::Psfclone () const
 Polymorphic deep copy. Usually unnecessary, as Psfs are immutable. More...
 
virtual boost::shared_ptr< afw::detection::Psfresized (int width, int height) const
 Return a clone with specified kernel dimensions. More...
 
std::shared_ptr< ImagecomputeImage (geom::Point2D position=makeNullPoint(), image::Color color=image::Color(), ImageOwnerEnum owner=COPY) const
 
std::shared_ptr< ImagecomputeKernelImage (geom::Point2D position=makeNullPoint(), image::Color color=image::Color(), ImageOwnerEnum owner=COPY) const
 
double computePeak (geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
 
double computeApertureFlux (double radius, geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
 
geom::ellipses::Quadrupole computeShape (geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
 
std::shared_ptr< math::Kernel const > getLocalKernel (geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
 
image::Color getAverageColor () const
 
geom::Box2I computeBBox (geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
 
void writeFits (std::string const &fileName, std::string const &mode="w") const
 
void writeFits (fits::MemFileManager &manager, std::string const &mode="w") const
 
void writeFits (fits::Fits &fitsfile) const
 
virtual bool isPersistable () const
 
std::string repr () const
 
void markPersistent (void)
 
memId getId () const
 
void serialize (Archive &, unsigned int const)
 

Static Public Member Functions

static std::shared_ptr< ImagePsfreadFits (fits::Fits &fitsfile)
 
static std::shared_ptr< ImagePsfreadFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
 
static std::shared_ptr< ImagePsfreadFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
 
static std::shared_ptr< PsfreadFits (fits::Fits &fitsfile)
 
static std::shared_ptr< PsfreadFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
 
static std::shared_ptr< PsfreadFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
 
static std::shared_ptr< PsfreadFits (fits::Fits &fitsfile)
 
static std::shared_ptr< PsfreadFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
 
static std::shared_ptr< ImagerecenterKernelImage (std::shared_ptr< Image > im, geom::Point2D const &position, std::string const &warpAlgorithm="lanczos5", unsigned int warpBuffer=5)
 
static bool hasBeenCorrupted ()
 
static memId getNextMemId ()
 
static int init ()
 
static int census (int, memId startingMemId=0)
 
static void census (std::ostream &stream, memId startingMemId=0)
 
static const std::vector< const Citizen *> * census ()
 
static int census (int, memId startingMemId=0)
 
static void census (std::ostream &stream, memId startingMemId=0)
 
static const std::vector< const Citizen *> * census ()
 
static memId setNewCallbackId (memId id)
 
static memId setNewCallbackId (memId id)
 
static memId setDeleteCallbackId (memId id)
 
static memId setDeleteCallbackId (memId id)
 
static memNewCallback setNewCallback (memNewCallback func)
 
static memCallback setDeleteCallback (memCallback func)
 
static memCallback setCorruptionCallback (memCallback func)
 

Public Attributes

 COPY
 
 INTERNAL
 
 magicSentinel
 

Protected Types

typedef io::OutputArchiveHandle OutputArchiveHandle
 

Protected Member Functions

virtual boost::shared_ptr< afw::detection::Psf::ImagedoComputeKernelImage (afw::geom::Point2D const &position, afw::image::Color const &color) const
 
virtual double doComputeApertureFlux (double radius, afw::geom::Point2D const &position, afw::image::Color const &color) const
 
virtual afw::geom::ellipses::Quadrupole doComputeShape (afw::geom::Point2D const &position, afw::image::Color const &color) const
 
virtual std::string getPersistenceName () const
 
virtual std::string getPythonModule () const
 
virtual void write (OutputArchiveHandle &handle) const
 
virtual void write (OutputArchiveHandle &handle) const
 

Protected Attributes

boost::shared_ptr< afw::detection::Psf const > _undistortedPsf
 
boost::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > _distortion
 

Detailed Description

A Psf class that maps an arbitrary Psf through a coordinate transformation.

If K_0(x,x') is the unwarped PSF, and f is the coordinate transform, then the warped PSF is defined by

K(f(x),f(x')) = K_0(x,x') (*)

We linearize the coordinate transform in the vicinity of the point where the PSF is computed. The definition (*) does not include the Jacobian of the transformation, since the afw convention is that PSF's are normalized to have integral 1 anyway.

Definition at line 49 of file WarpedPsf.h.

Constructor & Destructor Documentation

◆ WarpedPsf() [1/2]

lsst::meas::algorithms::WarpedPsf::WarpedPsf ( boost::shared_ptr< afw::detection::Psf const >  undistortedPsf,
boost::shared_ptr< afw::geom::TransformPoint2ToPoint2 const >  distortion,
boost::shared_ptr< afw::math::WarpingControl const >  control 
)

Construct WarpedPsf from unwarped psf and distortion.

If p is the nominal pixel position, and p' is the true position on the sky, then our convention for the transform is that p' = distortion.applyForward(p)

Definition at line 139 of file WarpedPsf.cc.

◆ WarpedPsf() [2/2]

lsst::meas::algorithms::WarpedPsf::WarpedPsf ( boost::shared_ptr< afw::detection::Psf const >  undistortedPsf,
boost::shared_ptr< afw::geom::TransformPoint2ToPoint2 const >  distortion,
std::string const &  kernelName = "lanczos3",
unsigned int  cache = 10000 
)

Definition at line 152 of file WarpedPsf.cc.

Member Function Documentation

◆ clone()

boost::shared_ptr< afw::detection::Psf > lsst::meas::algorithms::WarpedPsf::clone ( void  ) const
virtual

Polymorphic deep copy. Usually unnecessary, as Psfs are immutable.

Implements lsst::afw::detection::Psf.

Definition at line 192 of file WarpedPsf.cc.

◆ doComputeApertureFlux()

double lsst::meas::algorithms::ImagePsf::doComputeApertureFlux ( double  radius,
afw::geom::Point2D const &  position,
afw::image::Color const &  color 
) const
protectedvirtualinherited

Definition at line 31 of file ImagePsf.cc.

◆ doComputeKernelImage()

boost::shared_ptr< afw::detection::Psf::Image > lsst::meas::algorithms::WarpedPsf::doComputeKernelImage ( afw::geom::Point2D const &  position,
afw::image::Color const &  color 
) const
protectedvirtual

Definition at line 203 of file WarpedPsf.cc.

◆ doComputeShape()

afw::geom::ellipses::Quadrupole lsst::meas::algorithms::ImagePsf::doComputeShape ( afw::geom::Point2D const &  position,
afw::image::Color const &  color 
) const
protectedvirtualinherited

Definition at line 46 of file ImagePsf.cc.

◆ getAveragePosition()

afw::geom::Point2D lsst::meas::algorithms::WarpedPsf::getAveragePosition ( ) const
virtual

Return the average of the positions of the stars that went into this Psf.

For WarpedPsf, this is just the transform of the undistorted Psf's average position.

Reimplemented from lsst::afw::detection::Psf.

Definition at line 188 of file WarpedPsf.cc.

◆ resized()

boost::shared_ptr< afw::detection::Psf > lsst::meas::algorithms::WarpedPsf::resized ( int  width,
int  height 
) const
virtual

Return a clone with specified kernel dimensions.

Implements lsst::afw::detection::Psf.

Definition at line 196 of file WarpedPsf.cc.

Member Data Documentation

◆ _distortion

boost::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > lsst::meas::algorithms::WarpedPsf::_distortion
protected

Definition at line 91 of file WarpedPsf.h.

◆ _undistortedPsf

boost::shared_ptr< afw::detection::Psf const > lsst::meas::algorithms::WarpedPsf::_undistortedPsf
protected

Definition at line 90 of file WarpedPsf.h.


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