lsst.meas.algorithms  21.0.0-31-gbc33d95d+8a31557bbc
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
lsst::meas::algorithms::WarpedPsf Class Referencefinal

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

#include <WarpedPsf.h>

Inheritance diagram for lsst::meas::algorithms::WarpedPsf:
lsst::afw::table::io::PersistableFacade< WarpedPsf > lsst::meas::algorithms::ImagePsf lsst::afw::table::io::PersistableFacade< ImagePsf > lsst::afw::detection::Psf PersistableFacade< Psf > lsst::afw::typehandling::Storable lsst::afw::table::io::Persistable

Public Types

enum  ImageOwnerEnum
 
typedef math::Kernel::Pixel Pixel
 
typedef image::Image< PixelImage
 

Public Member Functions

 WarpedPsf (std::shared_ptr< afw::detection::Psf const > undistortedPsf, std::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > distortion, std::shared_ptr< afw::math::WarpingControl const > control)
 Construct WarpedPsf from unwarped psf and distortion. More...
 
 WarpedPsf (std::shared_ptr< afw::detection::Psf const > undistortedPsf, std::shared_ptr< afw::geom::TransformPoint2ToPoint2 const > distortion, std::string const &kernelName="lanczos3", unsigned int cache=10000)
 
geom::Point2D getAveragePosition () const override
 Return the average of the positions of the stars that went into this Psf. More...
 
std::shared_ptr< afw::detection::Psfclone () const override
 Polymorphic deep copy. Usually unnecessary, as Psfs are immutable. More...
 
std::shared_ptr< afw::detection::Psfresized (int width, int height) const override
 Return a clone with specified kernel dimensions. More...
 
bool isPersistable () const noexcept override
 
std::shared_ptr< typehandling::Storable > cloneStorable () const override
 
std::shared_ptr< ImagecomputeImage (lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color(), ImageOwnerEnum owner=COPY) const
 
std::shared_ptr< ImagecomputeKernelImage (lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color(), ImageOwnerEnum owner=COPY) const
 
double computePeak (lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
 
double computeApertureFlux (double radius, lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
 
geom::ellipses::Quadrupole computeShape (lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
 
std::shared_ptr< math::Kernel const > getLocalKernel (lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
 
image::Color getAverageColor () const
 
lsst::geom::Box2I computeBBox (lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
 
lsst::geom::Box2I computeImageBBox (lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
 
lsst::geom::Box2I computeKernelBBox (lsst::geom::Point2D position=makeNullPoint(), image::Color color=image::Color()) const
 
std::size_t getCacheCapacity () const
 
void setCacheCapacity (std::size_t capacity)
 
virtual std::string toString () const
 
virtual std::size_t hash_value () const
 
virtual bool equals (Storable const &other) const noexcept
 
virtual bool equals (Storable const &other) const noexcept
 
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
 
std::ostreamoperator<< (std::ostream &os, Storable const &storable)
 
std::ostreamoperator<< (std::ostream &os, Storable const &storable)
 

Static Public Member Functions

static std::shared_ptr< T > readFits (fits::Fits &fitsfile)
 
static std::shared_ptr< T > readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
 
static std::shared_ptr< T > readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
 
static std::shared_ptr< T > dynamicCast (std::shared_ptr< Persistable > const &ptr)
 
static std::shared_ptr< T > readFits (fits::Fits &fitsfile)
 
static std::shared_ptr< T > readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
 
static std::shared_ptr< T > readFits (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< T > dynamicCast (std::shared_ptr< Persistable > const &ptr)
 
static std::shared_ptr< PsfdynamicCast (std::shared_ptr< Persistable > const &ptr)
 
static std::shared_ptr< ImagerecenterKernelImage (std::shared_ptr< Image > im, lsst::geom::Point2D const &position, std::string const &warpAlgorithm="lanczos5", unsigned int warpBuffer=5)
 

Public Attributes

 COPY
 
 INTERNAL
 

Protected Types

typedef io::OutputArchiveHandle OutputArchiveHandle
 

Protected Member Functions

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

Static Protected Member Functions

static bool singleClassEquals (T const &lhs, Storable const &rhs)
 
static bool singleClassEquals (T const &lhs, Storable const &rhs)
 

Protected Attributes

std::shared_ptr< afw::detection::Psf const > _undistortedPsf
 
std::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 52 of file WarpedPsf.h.

Constructor & Destructor Documentation

◆ WarpedPsf() [1/2]

lsst::meas::algorithms::WarpedPsf::WarpedPsf ( std::shared_ptr< afw::detection::Psf const >  undistortedPsf,
std::shared_ptr< afw::geom::TransformPoint2ToPoint2 const >  distortion,
std::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 153 of file WarpedPsf.cc.

◆ WarpedPsf() [2/2]

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

Definition at line 163 of file WarpedPsf.cc.

Member Function Documentation

◆ clone()

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

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

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

Definition at line 191 of file WarpedPsf.cc.

◆ doComputeApertureFlux()

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

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

Definition at line 45 of file ImagePsf.cc.

◆ doComputeKernelImage()

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

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

Definition at line 202 of file WarpedPsf.cc.

◆ doComputeShape()

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

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

Definition at line 56 of file ImagePsf.cc.

◆ getAveragePosition()

geom::Point2D lsst::meas::algorithms::WarpedPsf::getAveragePosition ( ) const
overridevirtual

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 187 of file WarpedPsf.cc.

◆ getPersistenceName()

std::string lsst::meas::algorithms::WarpedPsf::getPersistenceName ( ) const
overrideprotectedvirtual

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

Definition at line 286 of file WarpedPsf.cc.

◆ getPythonModule()

std::string lsst::meas::algorithms::WarpedPsf::getPythonModule ( ) const
overrideprotectedvirtual

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

Definition at line 287 of file WarpedPsf.cc.

◆ isPersistable()

bool lsst::meas::algorithms::WarpedPsf::isPersistable ( ) const
inlineoverridevirtualnoexcept

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

Definition at line 80 of file WarpedPsf.h.

◆ resized()

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

Return a clone with specified kernel dimensions.

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

Definition at line 195 of file WarpedPsf.cc.

◆ write()

void lsst::meas::algorithms::WarpedPsf::write ( OutputArchiveHandle handle) const
overrideprotectedvirtual

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

Definition at line 289 of file WarpedPsf.cc.

Member Data Documentation

◆ _distortion

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

Definition at line 94 of file WarpedPsf.h.

◆ _undistortedPsf

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

Definition at line 93 of file WarpedPsf.h.


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