lsst.meas.algorithms  15.0-3-gd5b9ff95+1
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Friends | 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 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

 PcaPsf (boost::shared_ptr< afw::math::LinearCombinationKernel > kernel, afw::geom::Point2D const &averagePosition=afw::geom::Point2D())
 Constructor for a PcaPsf. More...
 
virtual boost::shared_ptr< afw::detection::Psfclone () const
 Polymorphic deep copy; should usually be unnecessary as Psfs are immutable.x. More...
 
virtual boost::shared_ptr< afw::detection::Psfresized (int width, int height) const
 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...
 
virtual afw::geom::Point2D getAveragePosition () const
 Return average position of stars; used as default position. More...
 
virtual bool isPersistable () const
 Whether this object is persistable; just delegates to the kernel. 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
 
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< 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< 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 std::string getPythonModule () const
 
virtual void write (OutputArchiveHandle &handle) const
 
virtual void write (OutputArchiveHandle &handle) 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
 

Friends

class boost::serialization::access
 

Detailed Description

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

Definition at line 34 of file PcaPsf.h.

Constructor & Destructor Documentation

◆ PcaPsf()

lsst::meas::algorithms::PcaPsf::PcaPsf ( boost::shared_ptr< afw::math::LinearCombinationKernel kernel,
afw::geom::Point2D const &  averagePosition = afw::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()

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

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,
afw::geom::Point2D const &  position,
afw::image::Color const &  color 
) const
protectedvirtualinherited

Definition at line 31 of file ImagePsf.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::KernelPsf::getAveragePosition ( ) const
virtualinherited

Return average position of stars; used as default position.

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

Definition at line 33 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
protectedvirtualinherited

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

Definition at line 60 of file KernelPsf.cc.

◆ isPersistable()

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

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

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

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

Definition at line 56 of file KernelPsf.cc.

◆ resized()

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

Return a clone with specified kernel dimensions.

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

◆ write()

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 62 of file PcaPsf.h.


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