Class CoaddPsf

Inheritance Relationships

Base Types

Class Documentation

class CoaddPsf : public lsst::afw::table::io::PersistableFacade<CoaddPsf>, public lsst::meas::algorithms::ImagePsf

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.

Public 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.

The ExposureCatalog contains info about each visit/ccd in Coadd; this must be provided to the constructor, and cannot be changed.

Parameters
  • [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

CoaddPsf(afw::table::ExposureCatalog const &catalog, afw::geom::SkyWcs const &coaddWcs, CoaddPsfControl const &ctrl, std::string const &weightFieldName = "weight")

Constructor for CoaddPsf.

The ExposureCatalog contains info about each visit/ccd in Coadd; this must be provided to the constructor, and cannot be changed.

Parameters
  • [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”.

PTR(afw::detection::Psf) const

Polymorphic deep copy. Usually unnecessary, as Psfs are immutable.

PTR(afw::detection::Psf)

Return a clone with specified kernel dimensions.

geom::Point2D getAveragePosition() const

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.

afw::geom::SkyWcs getCoaddWcs()

Return the Wcs of the coadd (defines the coordinate system of the Psf).

int getComponentCount() const

Return the number of component Psfs in this CoaddPsf.

CONST_PTR(afw::detection::Psf)

Get the Psf of the component image at index.

Return

Corresponding Psf.

Parameters
  • [in] index: Index of component for which the Psf will be fetched.

Exceptions
  • RangeError: Index of component is out of range.

afw::geom::SkyWcs getWcs(int index)

Get the Wcs of the component image at index.

Return

Corresponding Wcs.

Parameters
  • [in] index: Index of component for which the Wcs will be fetched.

Exceptions
  • RangeError: Index of component is out of range.

double getWeight(int index)

Get the weight of the component image at index.

Return

Corresponding weight.

Parameters
  • [in] index: Index of component for which the weight will be fetched.

Exceptions
  • RangeError: Index of component is out of range.

afw::table::RecordId getId(int index)

Get the exposure ID of the component image at index.

Return

Corresponding exposure ID.

Parameters
  • [in] index: Index of component for which the exposure ID will be fetched.

Exceptions
  • RangeError: Index of component is out of range.

geom::Box2I getBBox(int index)

Get the bounding box (in component image Pixel coordinates) of the component image at index.

Return

Corresponding bounding box.

Parameters
  • [in] index: Index of component for which the bounding box will be fetched.

Exceptions
  • RangeError: Index of component is out of range.

CONST_PTR(afw::geom::polygon::Polygon)

Get the validPolygon (in component image Pixel coordinates) of the component image at index.

Return

Corresponding validPolygon.

Parameters
  • [in] index: Index of component for which the bounding box will be fetched.

Exceptions
  • RangeError: Index of component is out of range.

bool isPersistable() const

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.

Public Members

int height const lsst::meas::algorithms::CoaddPsf::override

Protected Functions

std::string getPersistenceName() const
std::string getPythonModule() const
void write(OutputArchiveHandle &handle) const
CoaddPsf(afw::table::ExposureCatalog const &catalog, afw::geom::SkyWcs const &coaddWcs, geom::Point2D const &averagePosition, std::string const &warpingKernelName = "lanczos3", int cacheSize = 10000)

Parameters
  • catalog: Unpersisted catalog

  • coaddWcs: WCS for the coadd

  • averagePosition: Default position for accessors

  • warpingKernelName: Warping kernel name

  • cacheSize: Kernel cache size