24 #if !defined(LSST_MEAS_ALGORITHMS_COADDPSF_H)
25 #define LSST_MEAS_ALGORITHMS_COADDPSF_H
28 #include "lsst/base.h"
29 #include "lsst/pex/config.h"
31 #include "lsst/afw/image/Wcs.h"
32 #include "lsst/afw/table/Exposure.h"
33 #include "lsst/afw/table/types.h"
34 #include "lsst/afw/geom/Box.h"
35 #include "lsst/afw/geom/polygon/Polygon.h"
36 #include "lsst/afw/math/warpExposure.h"
38 namespace lsst {
namespace meas {
namespace algorithms {
44 "Name of warping kernel; choices: lanczos3,lanczos4,lanczos5,bilinear,nearest");
45 LSST_CONTROL_FIELD(
cacheSize,
int,
"Warping kernel cache size");
47 explicit CoaddPsfControl(std::string _warpingKernelName=
"lanczos3",
int _cacheSize=10000) :
77 afw::table::ExposureCatalog
const & catalog,
79 std::string
const & weightFieldName =
"weight",
99 afw::table::ExposureCatalog
const & catalog,
100 afw::image::Wcs
const & coaddWcs,
102 std::string
const & weightFieldName =
"weight"
106 virtual PTR(afw::detection::Psf)
clone() const;
109 virtual PTR(afw::detection::Psf)
resized(
int width,
int height) const;
131 CONST_PTR(afw::detection::Psf)
getPsf(
int index);
140 CONST_PTR(afw::image::Wcs)
getWcs(
int index);
158 afw::table::RecordId
getId(
int index);
167 afw::geom::Box2I
getBBox(
int index);
195 afw::geom::Point2D const & ccdXY,
196 afw::image::Color const & color
200 afw::geom::Point2D const & position,
201 afw::image::Color const & color
211 virtual
void write(OutputArchiveHandle & handle) const;
215 afw::table::ExposureCatalog const & catalog,
216 PTR(afw::image::Wcs const) coaddWcs,
224 afw::table::ExposureCatalog _catalog;
225 CONST_PTR(afw::image::Wcs) _coaddWcs;
226 afw::table::Key<
double> _weightKey;
227 afw::geom::Point2D _averagePosition;
228 std::
string _warpingKernelName;
229 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< std::string > warpingKernelName
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(afw::table::ExposureCatalog const &catalog, afw::image::Wcs const &coaddWcs, CoaddPsfControl const &ctrl, std::string const &weightFieldName="weight")
Constructor for CoaddPsf.
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.
CoaddPsfControl(std::string _warpingKernelName="lanczos3", int _cacheSize=10000)
std::string warpingKernelName
"Name of warping kernel; choices: lanczos3,lanczos4,lanczos5,bilinear,nearest" ;
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...
tbl::Key< int > cacheSize
int cacheSize
"Warping kernel cache size" ;
virtual boost::shared_ptr< afw::detection::Psf > clone() const
Polymorphic deep copy. Usually unnecessary, as Psfs are immutable.