lsst.meas.algorithms g8d527e0710+abd7d88e05
|
CoaddPsf is the Psf derived to be used for non-PSF-matched Coadd images. More...
#include <CoaddPsf.h>
Classes | |
class | Factory |
Public Types | |
enum | ImageOwnerEnum |
typedef math::Kernel::Pixel | Pixel |
typedef image::Image< Pixel > | Image |
Public Member Functions | |
CoaddPsf (afw::table::ExposureCatalog const &catalog, afw::geom::SkyWcs const &coaddWcs, std::string const &weightFieldName="weight", std::string const &warpingKernelName="lanczos3", int cacheSize=10000) | |
Main constructors for CoaddPsf. More... | |
CoaddPsf (afw::table::ExposureCatalog const &catalog, afw::geom::SkyWcs const &coaddWcs, CoaddPsfControl const &ctrl, std::string const &weightFieldName="weight") | |
Constructor for CoaddPsf. More... | |
CoaddPsf (afw::table::ExposureCatalog const &catalog, afw::geom::SkyWcs const &coaddWcs, geom::Point2D const &averagePosition, std::string const &warpingKernelName="lanczos3", int cacheSize=10000) | |
std::shared_ptr< afw::detection::Psf > | clone () const override |
Polymorphic deep copy. Usually unnecessary, as Psfs are immutable. More... | |
std::shared_ptr< afw::detection::Psf > | resized (int width, int height) const override |
Return a clone with specified kernel dimensions. More... | |
geom::Point2D | getAveragePosition () const override |
Return the average of the positions of the stars that went into this Psf. More... | |
afw::geom::SkyWcs | getCoaddWcs () |
Return the Wcs of the coadd (defines the coordinate system of the Psf). More... | |
int | getComponentCount () const |
Return the number of component Psfs in this CoaddPsf. More... | |
std::shared_ptr< afw::detection::Psf const > | getPsf (int index) |
Get the Psf of the component image at index. More... | |
afw::geom::SkyWcs | getWcs (int index) |
Get the Wcs of the component image at index. More... | |
double | getWeight (int index) |
Get the weight of the component image at index. More... | |
afw::table::RecordId | getId (int index) |
Get the exposure ID of the component image at index. More... | |
geom::Box2I | getBBox (int index) |
Get the bounding box (in component image Pixel coordinates) of the component image at index. More... | |
std::shared_ptr< afw::geom::polygon::Polygon const > | getValidPolygon (int index) |
Get the validPolygon (in component image Pixel coordinates) of the component image at index. More... | |
bool | isPersistable () const noexcept override |
Return true if the CoaddPsf persistable (always true). More... | |
std::shared_ptr< typehandling::Storable > | cloneStorable () const override |
std::shared_ptr< Image > | computeImage (lsst::geom::Point2D position, image::Color color=image::Color(), ImageOwnerEnum owner=COPY) const |
std::shared_ptr< Image > | computeImage () const |
std::shared_ptr< Image > | computeKernelImage (lsst::geom::Point2D position, image::Color color=image::Color(), ImageOwnerEnum owner=COPY) const |
std::shared_ptr< Image > | computeKernelImage () const |
double | computePeak (lsst::geom::Point2D position, image::Color color=image::Color()) const |
double | computePeak () const |
double | computeApertureFlux (double radius, lsst::geom::Point2D position, image::Color color=image::Color()) const |
double | computeApertureFlux (double radius) const |
geom::ellipses::Quadrupole | computeShape (lsst::geom::Point2D position, image::Color color=image::Color()) const |
geom::ellipses::Quadrupole | computeShape () const |
std::shared_ptr< math::Kernel const > | getLocalKernel (lsst::geom::Point2D position, image::Color color=image::Color()) const |
std::shared_ptr< math::Kernel const > | getLocalKernel () const |
image::Color | getAverageColor () const |
lsst::geom::Box2I | computeBBox (lsst::geom::Point2D position, image::Color color=image::Color()) const |
lsst::geom::Box2I | computeBBox () const |
lsst::geom::Box2I | computeImageBBox (lsst::geom::Point2D position, image::Color color=image::Color()) const |
lsst::geom::Box2I | computeImageBBox () const |
lsst::geom::Box2I | computeKernelBBox (lsst::geom::Point2D position, image::Color color=image::Color()) const |
lsst::geom::Box2I | computeKernelBBox () 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::ostream & | operator<< (std::ostream &os, Storable const &storable) |
std::ostream & | operator<< (std::ostream &os, Storable const &storable) |
Static Public Member Functions | |
static std::shared_ptr< T > | readFits (fits::Fits &fitsfile) |
static std::shared_ptr< T > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
static std::shared_ptr< T > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
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< T > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
static std::shared_ptr< T > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
static std::shared_ptr< Psf > | readFits (fits::Fits &fitsfile) |
static std::shared_ptr< Psf > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
static std::shared_ptr< Psf > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
static std::shared_ptr< T > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
static std::shared_ptr< Psf > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
static std::shared_ptr< Image > | recenterKernelImage (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 | |
std::shared_ptr< afw::detection::Psf::Image > | doComputeKernelImage (geom::Point2D const &ccdXY, afw::image::Color const &color) const override |
geom::Box2I | doComputeBBox (geom::Point2D const &position, afw::image::Color const &color) const override |
std::string | getPersistenceName () const override |
std::string | getPythonModule () const override |
void | write (OutputArchiveHandle &handle) const override |
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 std::shared_ptr< Image > | doComputeImage (lsst::geom::Point2D const &position, 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) |
CoaddPsf is the Psf derived to be used for non-PSF-matched Coadd images.
It incorporates the logic of James Jee's Stackfit algorithm for estimating the Psf of coadd by coadding the images of the Psf models of each input exposure.
Definition at line 58 of file CoaddPsf.h.
|
explicit |
Main constructors for CoaddPsf.
The ExposureCatalog contains info about each visit/ccd in Coadd; this must be provided to the constructor, and cannot be changed.
[in] | catalog | ExposureCatalog containing the id, bbox, wcs, psf and weight for each ccd/visit. This is usually the same catalog as the "ccds" catalog in the coadd Exposure's CoaddInputs. |
[in] | coaddWcs | Wcs for the coadd. |
[in] | weightFieldName | Field name that contains the weight of the exposure in the coadd; defaults to "weight". |
[in] | warpingKernelName | Name of warping kernel |
[in] | cacheSize | Warping kernel cache size |
Definition at line 141 of file CoaddPsf.cc.
|
inline |
Constructor for CoaddPsf.
The ExposureCatalog contains info about each visit/ccd in Coadd; this must be provided to the constructor, and cannot be changed.
[in] | catalog | ExposureCatalog containing the id, bbox, wcs, psf and weight for each ccd/visit. This is usually the same catalog as the "ccds" catalog in the coadd Exposure's CoaddInputs. |
[in] | coaddWcs | Wcs for the coadd. |
[in] | ctrl | Configuration options. |
[in] | weightFieldName | Field name that contains the weight of the exposure in the coadd; defaults to "weight". |
Definition at line 93 of file CoaddPsf.h.
|
explicit |
catalog | Unpersisted catalog |
coaddWcs | WCS for the coadd |
averagePosition | Default position for accessors |
warpingKernelName | Warping kernel name |
cacheSize | Kernel cache size |
Definition at line 170 of file CoaddPsf.cc.
|
overridevirtual |
Polymorphic deep copy. Usually unnecessary, as Psfs are immutable.
Implements lsst::afw::detection::Psf.
Definition at line 179 of file CoaddPsf.cc.
|
protectedvirtualinherited |
Implements lsst::afw::detection::Psf.
Definition at line 45 of file ImagePsf.cc.
|
overrideprotectedvirtual |
Implements lsst::afw::detection::Psf.
Definition at line 224 of file CoaddPsf.cc.
|
overrideprotectedvirtual |
Implements lsst::afw::detection::Psf.
Definition at line 246 of file CoaddPsf.cc.
|
protectedvirtualinherited |
Implements lsst::afw::detection::Psf.
Definition at line 56 of file ImagePsf.cc.
|
inlineoverridevirtual |
Return the average of the positions of the stars that went into this Psf.
For CoaddPsf, this is calculated as the weighted average of the average positions of all the component Psfs.
Reimplemented from lsst::afw::detection::Psf.
Definition at line 115 of file CoaddPsf.h.
geom::Box2I lsst::meas::algorithms::CoaddPsf::getBBox | ( | int | index | ) |
Get the bounding box (in component image Pixel coordinates) of the component image at index.
[in] | index | Index of component for which the bounding box will be fetched. |
RangeError | Index of component is out of range. |
Definition at line 328 of file CoaddPsf.cc.
|
inline |
Return the Wcs of the coadd (defines the coordinate system of the Psf).
Definition at line 118 of file CoaddPsf.h.
int lsst::meas::algorithms::CoaddPsf::getComponentCount | ( | ) | const |
Return the number of component Psfs in this CoaddPsf.
Definition at line 291 of file CoaddPsf.cc.
afw::table::RecordId lsst::meas::algorithms::CoaddPsf::getId | ( | int | index | ) |
Get the exposure ID of the component image at index.
[in] | index | Index of component for which the exposure ID will be fetched. |
RangeError | Index of component is out of range. |
Definition at line 321 of file CoaddPsf.cc.
|
overrideprotectedvirtual |
Reimplemented from lsst::afw::detection::Psf.
Definition at line 425 of file CoaddPsf.cc.
std::shared_ptr< afw::detection::Psf const > lsst::meas::algorithms::CoaddPsf::getPsf | ( | int | index | ) |
Get the Psf of the component image at index.
[in] | index | Index of component for which the Psf will be fetched. |
RangeError | Index of component is out of range. |
Definition at line 293 of file CoaddPsf.cc.
|
overrideprotectedvirtual |
Reimplemented from lsst::afw::detection::Psf.
Definition at line 427 of file CoaddPsf.cc.
std::shared_ptr< afw::geom::polygon::Polygon const > lsst::meas::algorithms::CoaddPsf::getValidPolygon | ( | int | index | ) |
Get the validPolygon (in component image Pixel coordinates) of the component image at index.
[in] | index | Index of component for which the bounding box will be fetched. |
RangeError | Index of component is out of range. |
Definition at line 307 of file CoaddPsf.cc.
afw::geom::SkyWcs lsst::meas::algorithms::CoaddPsf::getWcs | ( | int | index | ) |
Get the Wcs of the component image at index.
[in] | index | Index of component for which the Wcs will be fetched. |
RangeError | Index of component is out of range. |
Definition at line 300 of file CoaddPsf.cc.
double lsst::meas::algorithms::CoaddPsf::getWeight | ( | int | index | ) |
Get the weight of the component image at index.
[in] | index | Index of component for which the weight will be fetched. |
RangeError | Index of component is out of range. |
Definition at line 314 of file CoaddPsf.cc.
|
inlineoverridevirtualnoexcept |
Return true if the CoaddPsf persistable (always true).
While it's actually possible to construct a CoaddPsf that isn't persistable (because its nested Psfs and Wcss are not persistable) in artificial situations, in realistic situations it's pretty much impossible, because persistence is a necessary part of how CoaddPsfs are built. And it's simpler and much faster if we just always return true, rather than loop over the elements and check each one.
Reimplemented from lsst::afw::detection::Psf.
Definition at line 186 of file CoaddPsf.h.
|
overridevirtual |
Return a clone with specified kernel dimensions.
Implements lsst::afw::detection::Psf.
Definition at line 181 of file CoaddPsf.cc.
|
overrideprotectedvirtual |
Reimplemented from lsst::afw::detection::Psf.
Definition at line 429 of file CoaddPsf.cc.