24 # if !defined(LSST_MEAS_EXTENSIONS_PSFEX_PSFEX_H)
25 #define LSST_MEAS_EXTENSIONS_PSFEX_PSFEX_H 1
27 #include "lsst/meas/algorithms/ImagePsf.h"
28 #include "lsst/meas/extensions/psfex/psf.hh"
30 namespace lsst {
namespace meas {
namespace extensions {
namespace psfex {
38 class PsfexPsf :
public lsst::afw::table::io::PersistableFacade<PsfexPsf>,
39 public lsst::meas::algorithms::ImagePsf {
46 lsst::meas::extensions::psfex::Psf
const& psf,
47 lsst::afw::geom::Point2D
const &
averagePosition=lsst::afw::geom::Point2D()
53 virtual PTR(lsst::afw::detection::Psf)
clone() const;
56 virtual PTR(afw::detection::Psf)
resized(
int width,
int height) const;
63 PTR(lsst::afw::math::LinearCombinationKernel
const)
65 lsst::afw::geom::Point2D(std::numeric_limits<
double>::quiet_NaN())) const;
70 void write(lsst::afw::table::io::OutputArchiveHandle & handle)
const;
72 lsst::afw::geom::Point2D _averagePosition;
76 std::vector<int>
_size;
77 std::vector<float>
_comp;
78 std::vector<std::pair<double, double> > _context;
79 mutable PTR(lsst::afw::math::LinearCombinationKernel) _kernel;
85 virtual PTR(lsst::afw::detection::Psf::Image) _doComputeImage(
86 lsst::afw::geom::Point2D const & position,
87 lsst::afw::image::Color const& color,
88 lsst::afw::geom::Point2D const& center
92 virtual PTR(lsst::afw::detection::Psf::Image) doComputeKernelImage(
93 lsst::afw::geom::Point2D const & position,
94 lsst::afw::image::Color const& color
98 virtual PTR(lsst::afw::detection::Psf::Image) doComputeImage(
99 lsst::afw::geom::Point2D const & position,
100 lsst::afw::image::Color const& color
104 virtual lsst::afw::geom::Box2I doComputeBBox(
105 lsst::afw::geom::Point2D const & position,
106 lsst::afw::image::Color const & color
112 lsst::afw::geom::Box2I _doComputeBBox(
113 lsst::afw::geom::Point2D const & position,
114 lsst::afw::geom::Point2D const & center
118 virtual std::
string getPersistenceName() const;
120 virtual std::
string getPythonModule() const;
125 #endif // !LSST_MEAS_EXTENSIONS_PSFEX_PSFEX_H
virtual boost::shared_ptr< lsst::afw::detection::Psf > clone() const
Polymorphic deep copy; should usually be unnecessary as Psfs are immutable.x.
virtual lsst::afw::geom::Point2D getAveragePosition() const
Return average position of stars; used as default position.
Represent a PSF as a linear combination of PSFEX (== Karhunen-Loeve) basis functions.
boost::shared_ptr< lsst::afw::math::LinearCombinationKernel const > getKernel(lsst::afw::geom::Point2D=lsst::afw::geom::Point2D(std::numeric_limits< double >::quiet_NaN())) const
Return the PSF's basis functions as a spatially-invariant LinearCombinationKernel with unit weights...
void write(lsst::afw::table::io::OutputArchiveHandle &handle) const
table::Key< table::Array< int > > _size
table::Key< table::Array< float > > _comp
virtual bool isPersistable() const
Is this object persistable?
table::Key< float > _pixstep
table::PointKey< double > averagePosition
virtual boost::shared_ptr< afw::detection::Psf > resized(int width, int height) const
Return a clone with specified kernel dimensions.