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;
122 int getComponentCount()
const;
131 CONST_PTR(afw::detection::Psf) getPsf(
int index);
140 CONST_PTR(afw::image::Wcs) getWcs(
int index);
149 double getWeight(
int index);
158 afw::table::RecordId getId(
int index);
167 afw::geom::Box2I getBBox(
int index);
176 CONST_PTR(afw::geom::polygon::Polygon) getValidPolygon(
int index);
194 PTR(afw::detection::Psf::Image) doComputeKernelImage(
195 afw::geom::Point2D
const & ccdXY,
196 afw::image::Color
const & color
199 virtual afw::geom::Box2I doComputeBBox(
200 afw::geom::Point2D
const & position,
201 afw::image::Color
const & color
205 virtual std::string getPersistenceName()
const;
208 virtual std::string getPythonModule()
const;
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;
boost::shared_ptr< afw::image::Wcs const > getCoaddWcs()
Return the Wcs of the coadd (defines the coordinate system of the Psf).
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.
CoaddPsfControl(std::string _warpingKernelName="lanczos3", int _cacheSize=10000)
virtual bool isPersistable() const
Return true if the CoaddPsf persistable (always true).
std::string warpingKernelName
"Name of warping kernel; choices: lanczos3,lanczos4,lanczos5,bilinear,nearest" ;
virtual afw::geom::Point2D getAveragePosition() const
Return the average of the positions of the stars that went into this Psf.
An intermediate base class for Psfs that use an image representation.
tbl::PointKey< double > averagePosition
int cacheSize
"Warping kernel cache size" ;