lsst.meas.algorithms  17.0.1-12-g7a9f9e2c+1
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | List of all members
lsst::meas::algorithms::PcaPsf Class Reference

Represent a PSF as a linear combination of PCA (== Karhunen-Loeve) basis functions. More...

#include <PcaPsf.h>

Inheritance diagram for lsst::meas::algorithms::PcaPsf:
lsst::afw::table::io::PersistableFacade< PcaPsf > 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::daf::base::Citizen 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)
 

Public Member Functions

 PcaPsf (boost::shared_ptr< afw::math::LinearCombinationKernel > kernel, geom::Point2D const &averagePosition=geom::Point2D())
 Constructor for a PcaPsf. More...
 
boost::shared_ptr< afw::detection::Psfclone () const override
 Polymorphic deep copy; should usually be unnecessary as Psfs are immutable.x. More...
 
boost::shared_ptr< afw::detection::Psfresized (int width, int height) const override
 Return a clone with specified kernel dimensions. More...
 
boost::shared_ptr< afw::math::LinearCombinationKernel const > getKernel () const
 PcaPsf always has a LinearCombinationKernel, so we can override getKernel to make it more useful. More...
 
geom::Point2D getAveragePosition () const override
 Return average position of stars; used as default position. More...
 
bool isPersistable () const noexcept override
 Whether this object is persistable; just delegates to the kernel. More...
 
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
 
std::size_t getCacheCapacity () const
 
void setCacheCapacity (std::size_t capacity)
 
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::string repr () const
 
void markPersistent (void)
 
memId getId () const
 

Static Public Member Functions

static std::shared_ptr< PcaPsfreadFits (fits::Fits &fitsfile)
 
static std::shared_ptr< PcaPsfreadFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
 
static std::shared_ptr< PcaPsfreadFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
 
static std::shared_ptr< PcaPsfdynamicCast (std::shared_ptr< Persistable > const &ptr)
 
static std::shared_ptr< KernelPsfreadFits (fits::Fits &fitsfile)
 
static std::shared_ptr< KernelPsfreadFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
 
static std::shared_ptr< KernelPsfreadFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
 
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< KernelPsfdynamicCast (std::shared_ptr< Persistable > const &ptr)
 
static std::shared_ptr< ImagePsfdynamicCast (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)
 
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

std::string getPythonModule () const override
 
void write (OutputArchiveHandle &handle) const override
 
virtual void write (OutputArchiveHandle &handle) const
 
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
 

Detailed Description

Represent a PSF as a linear combination of PCA (== Karhunen-Loeve) basis functions.

Definition at line 37 of file PcaPsf.h.

Constructor & Destructor Documentation

◆ PcaPsf()

lsst::meas::algorithms::PcaPsf::PcaPsf ( boost::shared_ptr< afw::math::LinearCombinationKernel kernel,
geom::Point2D const &  averagePosition = geom::Point2D() 
)
explicit

Constructor for a PcaPsf.

Parameters
[in]kernelKernel that defines the Psf.
[in]averagePositionAverage position of stars used to construct the Psf.

Member Function Documentation

◆ clone()

boost::shared_ptr< afw::detection::Psf > lsst::meas::algorithms::PcaPsf::clone ( ) const
overridevirtual

Polymorphic deep copy; should usually be unnecessary as Psfs are immutable.x.

Reimplemented from lsst::meas::algorithms::KernelPsf.

◆ doComputeApertureFlux()

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

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

Definition at line 56 of file ImagePsf.cc.

◆ getAveragePosition()

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

Return average position of stars; used as default position.

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

Definition at line 47 of file KernelPsf.cc.

◆ getKernel()

boost::shared_ptr< afw::math::LinearCombinationKernel const > lsst::meas::algorithms::PcaPsf::getKernel ( ) const

PcaPsf always has a LinearCombinationKernel, so we can override getKernel to make it more useful.

◆ getPythonModule()

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

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

Definition at line 72 of file KernelPsf.cc.

◆ isPersistable()

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

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 68 of file KernelPsf.cc.

◆ resized()

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

Return a clone with specified kernel dimensions.

Reimplemented from lsst::meas::algorithms::KernelPsf.

◆ write()

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

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

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

Definition at line 74 of file KernelPsf.cc.


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