lsst.meas.algorithms gb4bc36e013+fb8383d0bf
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
lsst::meas::algorithms::KernelPsf Class Reference

A Psf defined by a Kernel. More...

#include <KernelPsf.h>

Inheritance diagram for lsst::meas::algorithms::KernelPsf:
lsst::afw::table::io::PersistableFacade< KernelPsf > lsst::meas::algorithms::ImagePsf lsst::afw::table::io::PersistableFacade< ImagePsf > lsst::afw::detection::Psf lsst::afw::typehandling::Storable lsst::afw::table::io::Persistable lsst::meas::algorithms::DoubleGaussianPsf lsst::meas::algorithms::PcaPsf lsst::meas::algorithms::SingleGaussianPsf

Public Types

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

Public Member Functions

 KernelPsf (afw::math::Kernel const &kernel, geom::Point2D const &averagePosition=geom::Point2D())
 Construct a KernelPsf with a clone of the given kernel. More...
 
std::shared_ptr< afw::math::Kernel const > getKernel () const
 Return the Kernel used to define this Psf. More...
 
geom::Point2D getAveragePosition () const override
 Return average position of stars; used as default position. More...
 
std::shared_ptr< afw::detection::Psfclone () const override
 Polymorphic deep copy. 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
 Whether this object is persistable; just delegates to the kernel. More...
 
std::shared_ptr< typehandling::Storable > cloneStorable () const override
 
std::shared_ptr< ImagecomputeImage (lsst::geom::Point2D position, image::Color color=image::Color(), ImageOwnerEnum owner=COPY) const
 
std::shared_ptr< ImagecomputeImage () const
 
std::shared_ptr< ImagecomputeKernelImage (lsst::geom::Point2D position, image::Color color=image::Color(), ImageOwnerEnum owner=COPY) const
 
std::shared_ptr< ImagecomputeKernelImage () const
 
double computePeak (lsst::geom::Point2D position, image::Color color=image::Color()) const
 
double computePeak () const
 
double computeApertureFlux (double radius, lsst::geom::Point2D position, image::Color color=image::Color()) const
 
double computeApertureFlux (double radius) const
 
geom::ellipses::Quadrupole computeShape (lsst::geom::Point2D position, image::Color color=image::Color()) const
 
geom::ellipses::Quadrupole computeShape () const
 
std::shared_ptr< math::Kernel const > getLocalKernel (lsst::geom::Point2D position, image::Color color=image::Color()) const
 
std::shared_ptr< math::Kernel const > getLocalKernel () const
 
image::Color getAverageColor () const
 
lsst::geom::Box2I computeBBox (lsst::geom::Point2D position, image::Color color=image::Color()) const
 
lsst::geom::Box2I computeBBox () const
 
lsst::geom::Box2I computeImageBBox (lsst::geom::Point2D position, image::Color color=image::Color()) const
 
lsst::geom::Box2I computeImageBBox () const
 
lsst::geom::Box2I computeKernelBBox (lsst::geom::Point2D position, image::Color color=image::Color()) const
 
lsst::geom::Box2I computeKernelBBox () 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< 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

 KernelPsf (std::shared_ptr< afw::math::Kernel > kernel, geom::Point2D const &averagePosition=geom::Point2D())
 Construct a KernelPsf with the given kernel; it should not be modified afterwards. More...
 
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)
 

Friends

template<typename T , typename K >
class KernelPsfFactory
 

Detailed Description

A Psf defined by a Kernel.

Definition at line 36 of file KernelPsf.h.

Constructor & Destructor Documentation

◆ KernelPsf() [1/2]

lsst::meas::algorithms::KernelPsf::KernelPsf ( afw::math::Kernel const &  kernel,
geom::Point2D const &  averagePosition = geom::Point2D() 
)
explicit

Construct a KernelPsf with a clone of the given kernel.

We clone the Kernel in the public constructor to ensure the Psf is immutable after construction (we don't want someone with another copy of the Kernel to be able to modify the one held by the Psf).

Derived classes may use the protected constructor, which takes a shared_ptr to Kernel and does not copy it.

Definition at line 33 of file KernelPsf.cc.

◆ KernelPsf() [2/2]

lsst::meas::algorithms::KernelPsf::KernelPsf ( std::shared_ptr< afw::math::Kernel kernel,
geom::Point2D const &  averagePosition = geom::Point2D() 
)
explicitprotected

Construct a KernelPsf with the given kernel; it should not be modified afterwards.

Definition at line 38 of file KernelPsf.cc.

Member Function Documentation

◆ clone()

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

Polymorphic deep copy.

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

Reimplemented in lsst::meas::algorithms::PcaPsf, and lsst::meas::algorithms::SingleGaussianPsf.

Definition at line 41 of file KernelPsf.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.

◆ 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 65 of file ImagePsf.cc.

◆ getAveragePosition()

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

Return average position of stars; used as default position.

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

Definition at line 47 of file KernelPsf.cc.

◆ getKernel()

std::shared_ptr< afw::math::Kernel const > lsst::meas::algorithms::KernelPsf::getKernel ( ) const
inline

Return the Kernel used to define this Psf.

Definition at line 52 of file KernelPsf.h.

◆ getPersistenceName()

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

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

Reimplemented in lsst::meas::algorithms::SingleGaussianPsf.

Definition at line 68 of file KernelPsf.cc.

◆ getPythonModule()

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

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

Definition at line 70 of file KernelPsf.cc.

◆ isPersistable()

bool lsst::meas::algorithms::KernelPsf::isPersistable ( ) const
overridevirtualnoexcept

Whether this object is persistable; just delegates to the kernel.

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

Reimplemented in lsst::meas::algorithms::SingleGaussianPsf.

Definition at line 66 of file KernelPsf.cc.

◆ resized()

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

Return a clone with specified kernel dimensions.

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

Reimplemented in lsst::meas::algorithms::PcaPsf, and lsst::meas::algorithms::SingleGaussianPsf.

Definition at line 43 of file KernelPsf.cc.

◆ write()

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

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

Reimplemented in lsst::meas::algorithms::SingleGaussianPsf.

Definition at line 72 of file KernelPsf.cc.

Friends And Related Function Documentation

◆ KernelPsfFactory

template<typename T , typename K >
friend class KernelPsfFactory
friend

Definition at line 81 of file KernelPsf.h.


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