lsst.meas.extensions.psfex g33ac35c1f1+8a040a3aa1
Loading...
Searching...
No Matches
lsst::meas::extensions::psfex::PsfexPsf Class Reference

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

#include <PsfexPsf.h>

Inheritance diagram for lsst::meas::extensions::psfex::PsfexPsf:
lsst::afw::table::io::PersistableFacade< PsfexPsf > lsst::meas::algorithms::ImagePsf lsst::afw::table::io::PersistableFacade< ImagePsf > lsst::afw::detection::Psf lsst::afw::table::io::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

 PsfexPsf (lsst::meas::extensions::psfex::Psf const &psf, lsst::geom::Point2D const &averagePosition=lsst::geom::Point2D())
 Constructor for a PsfexPsf.
 ~PsfexPsf () override
std::shared_ptr< lsst::afw::detection::Psfclone () const override
 Polymorphic deep copy; should usually be unnecessary as Psfs are immutable.x.
std::shared_ptr< afw::detection::Psfresized (int width, int height) const override
 Return a clone with specified kernel dimensions.
lsst::geom::Point2D getAveragePosition () const override
 Return average position of stars; used as default position.
std::shared_ptr< lsst::afw::math::LinearCombinationKernel const > getKernel (lsst::geom::Point2D=lsst::geom::Point2D(std::numeric_limits< double >::quiet_NaN())) const
 Return the PSF's basis functions as a spatially-invariant LinearCombinationKernel with unit weights.
bool isPersistable () const noexcept override
 Is this object persistable?
void write (lsst::afw::table::io::OutputArchiveHandle &handle) const override
int getNdim () const
 Return the number of dependency parameters in the psfex polynomial fit.
PsfexPsfSerializationData getSerializationData () const
 Return a representation suitable for serialization.
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< ImagecomputeKernelImage (lsst::geom::Point2D position, image::Color color=image::Color(), ImageOwnerEnum owner=COPY) const
double computePeak (lsst::geom::Point2D position, image::Color color=image::Color()) const
double computeApertureFlux (double radius, lsst::geom::Point2D position, image::Color color=image::Color()) const
geom::ellipses::Quadrupole computeShape (lsst::geom::Point2D position, image::Color color=image::Color()) const
std::shared_ptr< math::Kernel const > getLocalKernel (lsst::geom::Point2D position, image::Color color=image::Color()) const
image::Color getAverageColor () const
lsst::geom::Box2I computeBBox (lsst::geom::Point2D position, image::Color color=image::Color()) const
lsst::geom::Box2I computeImageBBox (lsst::geom::Point2D position, image::Color color=image::Color()) const
lsst::geom::Box2I computeKernelBBox (lsst::geom::Point2D position, 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< PsfexPsffromSerializationData (PsfexPsfSerializationData const &data)
 Construct from serialization data.
static std::shared_ptr< T > readFits (fits::Fits &fitsfile)
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< PsfreadFits (fits::Fits &fitsfile)
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< T > dynamicCast (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

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 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)

Private Member Functions

virtual std::shared_ptr< lsst::afw::detection::Psf::Image_doComputeImage (lsst::geom::Point2D const &position, lsst::afw::image::Color const &color, lsst::geom::Point2D const &center) const
 Compute an image of the Psf at the specified position/colour, at pixel position in the output image.
std::shared_ptr< lsst::afw::detection::Psf::ImagedoComputeKernelImage (lsst::geom::Point2D const &position, lsst::afw::image::Color const &color) const override
 Compute an image of the Psf at the specified position/colour, at pixel (0.0, 0.0) in the output image.
std::shared_ptr< lsst::afw::detection::Psf::ImagedoComputeImage (lsst::geom::Point2D const &position, lsst::afw::image::Color const &color) const override
 Compute an image of the Psf at the specified position/colour, at pixel position in the output image.
lsst::geom::Box2I doComputeBBox (lsst::geom::Point2D const &position, lsst::afw::image::Color const &color) const override
 Compute the bbox of the kernel image at the specified position/color.
std::string getPersistenceName () const override
 Name used in table persistence.
std::string getPythonModule () const override
 The python module name (for use in table persistence).

Friends

class detail::PsfexPsfFactory

Detailed Description

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

Definition at line 54 of file PsfexPsf.h.

Constructor & Destructor Documentation

◆ PsfexPsf()

lsst::meas::extensions::psfex::PsfexPsf::PsfexPsf ( lsst::meas::extensions::psfex::Psf const & psf,
lsst::geom::Point2D const & averagePosition = lsst::geom::Point2D() )
explicit

Constructor for a PsfexPsf.

Parameters
[in]psfPsfex PSF model to be wrapped into an LSST Psf
[in]averagePositionAverage position of stars used to construct the Psf.

Definition at line 64 of file PsfexPsf.cc.

◆ ~PsfexPsf()

lsst::meas::extensions::psfex::PsfexPsf::~PsfexPsf ( )
override

Definition at line 98 of file PsfexPsf.cc.

Member Function Documentation

◆ _doComputeImage()

std::shared_ptr< afw::detection::Psf::Image > lsst::meas::extensions::psfex::PsfexPsf::_doComputeImage ( lsst::geom::Point2D const & position,
lsst::afw::image::Color const & color,
lsst::geom::Point2D const & center ) const
privatevirtual

Compute an image of the Psf at the specified position/colour, at pixel position in the output image.

Parameters
positionposition within the chip
colorcolour of object
centerposition of center of image in the output image

Definition at line 229 of file PsfexPsf.cc.

◆ clone()

std::shared_ptr< afw::detection::Psf > lsst::meas::extensions::psfex::PsfexPsf::clone ( ) const
overridevirtual

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

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

Definition at line 104 of file PsfexPsf.cc.

◆ doComputeBBox()

geom::Box2I lsst::meas::extensions::psfex::PsfexPsf::doComputeBBox ( lsst::geom::Point2D const & position,
lsst::afw::image::Color const & color ) const
overrideprivatevirtual

Compute the bbox of the kernel image at the specified position/color.

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

Definition at line 200 of file PsfexPsf.cc.

◆ doComputeImage()

std::shared_ptr< afw::detection::Psf::Image > lsst::meas::extensions::psfex::PsfexPsf::doComputeImage ( lsst::geom::Point2D const & position,
lsst::afw::image::Color const & color ) const
overrideprivatevirtual

Compute an image of the Psf at the specified position/colour, at pixel position in the output image.

Parameters
positionposition within the chip
colorcolour of object

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

Definition at line 188 of file PsfexPsf.cc.

◆ doComputeKernelImage()

std::shared_ptr< afw::detection::Psf::Image > lsst::meas::extensions::psfex::PsfexPsf::doComputeKernelImage ( lsst::geom::Point2D const & position,
lsst::afw::image::Color const & color ) const
overrideprivatevirtual

Compute an image of the Psf at the specified position/colour, at pixel (0.0, 0.0) in the output image.

Parameters
positionposition within the chip
colorcolour of object

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

Definition at line 194 of file PsfexPsf.cc.

◆ fromSerializationData()

std::shared_ptr< PsfexPsf > lsst::meas::extensions::psfex::PsfexPsf::fromSerializationData ( PsfexPsfSerializationData const & data)
static

Construct from serialization data.

Definition at line 549 of file PsfexPsf.cc.

◆ getAveragePosition()

lsst::geom::Point2D lsst::meas::extensions::psfex::PsfexPsf::getAveragePosition ( ) const
inlineoverridevirtual

Return average position of stars; used as default position.

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

Definition at line 75 of file PsfexPsf.h.

◆ getKernel()

std::shared_ptr< afw::math::LinearCombinationKernel const > lsst::meas::extensions::psfex::PsfexPsf::getKernel ( lsst::geom::Point2D position = lsst::geom::Point2D(std::numeric_limits<double>::quiet_NaN())) const

Return the PSF's basis functions as a spatially-invariant LinearCombinationKernel with unit weights.

Definition at line 118 of file PsfexPsf.cc.

◆ getNdim()

int lsst::meas::extensions::psfex::PsfexPsf::getNdim ( ) const

Return the number of dependency parameters in the psfex polynomial fit.

Definition at line 113 of file PsfexPsf.cc.

◆ getPersistenceName()

std::string lsst::meas::extensions::psfex::PsfexPsf::getPersistenceName ( ) const
overrideprivatevirtual

Name used in table persistence.

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

Definition at line 481 of file PsfexPsf.cc.

◆ getPythonModule()

std::string lsst::meas::extensions::psfex::PsfexPsf::getPythonModule ( ) const
overrideprivatevirtual

The python module name (for use in table persistence).

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

Definition at line 479 of file PsfexPsf.cc.

◆ getSerializationData()

PsfexPsfSerializationData lsst::meas::extensions::psfex::PsfexPsf::getSerializationData ( ) const

Return a representation suitable for serialization.

Definition at line 575 of file PsfexPsf.cc.

◆ isPersistable()

bool lsst::meas::extensions::psfex::PsfexPsf::isPersistable ( ) const
inlineoverridevirtualnoexcept

Is this object persistable?

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

Definition at line 84 of file PsfexPsf.h.

◆ resized()

std::shared_ptr< afw::detection::Psf > lsst::meas::extensions::psfex::PsfexPsf::resized ( int width,
int height ) const
overridevirtual

Return a clone with specified kernel dimensions.

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

Definition at line 109 of file PsfexPsf.cc.

◆ write()

void lsst::meas::extensions::psfex::PsfexPsf::write ( lsst::afw::table::io::OutputArchiveHandle & handle) const
overridevirtual

Reimplemented from lsst::afw::table::io::Persistable.

Definition at line 483 of file PsfexPsf.cc.

◆ detail::PsfexPsfFactory

friend class detail::PsfexPsfFactory
friend

Definition at line 56 of file PsfexPsf.h.


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