24 #if !defined(LSST_MEAS_ALGORITHMS_COADDPSF_H)
25 #define LSST_MEAS_ALGORITHMS_COADDPSF_H
28 #include "lsst/base.h"
30 #include "lsst/afw/image/Wcs.h"
31 #include "lsst/afw/table/Exposure.h"
32 #include "lsst/afw/table/types.h"
33 #include "lsst/afw/geom/Box.h"
34 #include "lsst/afw/geom/polygon/Polygon.h"
35 #include "lsst/afw/math/warpExposure.h"
37 namespace lsst {
namespace meas {
namespace algorithms {
64 afw::table::ExposureCatalog
const & catalog,
66 std::string
const & weightFieldName =
"weight",
72 virtual PTR(afw::detection::Psf)
clone()
const;
75 virtual PTR(afw::detection::Psf)
resized(
int width,
int height)
const;
85 PTR(afw::image::Wcs
const)
getCoaddWcs() {
return _coaddWcs; }
97 CONST_PTR(afw::detection::Psf)
getPsf(
int index);
106 CONST_PTR(afw::image::Wcs)
getWcs(
int index);
124 afw::table::RecordId
getId(
int index);
133 afw::geom::Box2I
getBBox(
int index);
161 afw::geom::Point2D const & ccdXY,
162 afw::image::Color const & color
166 afw::geom::Point2D const & position,
167 afw::image::Color const & color
177 virtual
void write(OutputArchiveHandle & handle) const;
181 afw::table::ExposureCatalog const & catalog,
182 PTR(afw::image::Wcs const) coaddWcs,
190 afw::table::ExposureCatalog _catalog;
191 CONST_PTR(afw::image::Wcs) _coaddWcs;
192 afw::table::Key<
double> _weightKey;
193 afw::geom::Point2D _averagePosition;
194 std::
string _warpingKernelName;
195 CONST_PTR(afw::math::WarpingControl) _warpingControl;
virtual bool isPersistable() const
Return true if the CoaddPsf persistable (always true).
afw::geom::Box2I getBBox(int index)
Get the bounding box (in component image Pixel coordinates) of the component image at index...
double getWeight(int index)
Get the weight of the component image at index.
boost::shared_ptr< afw::image::Wcs const > getWcs(int index)
Get the Wcs of the component image at index.
CoaddPsf(afw::table::ExposureCatalog const &catalog, afw::image::Wcs const &coaddWcs, std::string const &weightFieldName="weight", std::string const &warpingKernelName="lanczos3", int cacheSize=10000)
Main constructors for CoaddPsf.
boost::shared_ptr< afw::detection::Psf::Image > doComputeKernelImage(afw::geom::Point2D const &ccdXY, afw::image::Color const &color) const
tbl::Key< int > cacheSize
boost::shared_ptr< afw::image::Wcs const > getCoaddWcs()
Return the Wcs of the coadd (defines the coordinate system of the Psf).
afw::table::RecordId getId(int index)
Get the exposure ID of the component image at index.
virtual std::string getPersistenceName() const
CoaddPsf is the Psf derived to be used for non-PSF-matched Coadd images.
int getComponentCount() const
Return the number of component Psfs in this CoaddPsf.
tbl::Key< std::string > warpingKernelName
virtual afw::geom::Box2I doComputeBBox(afw::geom::Point2D const &position, afw::image::Color const &color) const
An intermediate base class for Psfs that use an image representation.
virtual void write(OutputArchiveHandle &handle) const
tbl::PointKey< double > averagePosition
virtual std::string getPythonModule() const
virtual boost::shared_ptr< afw::detection::Psf > resized(int width, int height) const
Return a clone with specified kernel dimensions.
virtual afw::geom::Point2D getAveragePosition() const
Return the average of the positions of the stars that went into this Psf.
boost::shared_ptr< afw::detection::Psf const > getPsf(int index)
Get the Psf of the component image at index.
boost::shared_ptr< afw::geom::polygon::Polygon const > getValidPolygon(int index)
Get the validPolygon (in component image Pixel coordinates) of the component image at index...
virtual boost::shared_ptr< afw::detection::Psf > clone() const
Polymorphic deep copy. Usually unnecessary, as Psfs are immutable.