File addToCoadd.h

Author

Russell Owen

namespace lsst

Class for a simple mapping implementing a generic AstrometryTransform.

Remove all non-astronomical counts from the Chunk Exposure’s pixels.

Forward declarations for lsst::utils::Cache

For details on the Cache class, see the Cache.h file.

It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.

A base class for image defects

Numeric constants used by the Integrate.h integrator routines.

Compute Image Statistics

Note

Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.

Note

The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.

namespace coadd
namespace utils

Functions

template<typename CoaddPixelT, typename WeightPixelT>
lsst::geom::Box2I addToCoadd(lsst::afw::image::Image<CoaddPixelT> &coadd, lsst::afw::image::Image<WeightPixelT> &weightMap, lsst::afw::image::Image<CoaddPixelT> const &image, WeightPixelT weight)

add good pixels from an image to a coadd and associated weight map

Parameters
  • coadd: coadd to be modified

  • weightMap: weight map to be modified; this is the sum of weights of all images contributing each pixel of the coadd

  • image: image to add to coadd

  • weight: relative weight of this image

The images are assumed to be registered to the same wcs and parent origin, thus: coadd[i+coadd.x0, j+coadd.y0] += image[i+image.x0, j+image.y0] weightMap[i+weightMap.x0, j+weightMap.y0] += weight for all good image pixels that overlap a coadd pixel. Good pixels are those that are not NaN (thus they do include +/- inf).

Return

overlapBBox: overlapping bounding box, relative to parent image (hence xy0 is taken into account)

Exceptions
  • pexExcept::InvalidParameterError: if coadd and weightMap dimensions or xy0 do not match.

template<typename CoaddPixelT, typename WeightPixelT>
lsst::geom::Box2I addToCoadd(lsst::afw::image::MaskedImage<CoaddPixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel> &coadd, lsst::afw::image::Image<WeightPixelT> &weightMap, lsst::afw::image::MaskedImage<CoaddPixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel> const &maskedImage, lsst::afw::image::MaskPixel const badPixelMask, WeightPixelT weight)

add good pixels from a masked image to a coadd image and associated weight map

Parameters
  • coadd: coadd to be modified

  • weightMap: weight map to be modified; this is the sum of weights of all images contributing each pixel of the coadd

  • maskedImage: masked image to add to coadd

  • badPixelMask: skip input pixel if input mask & badPixelMask !=0

  • weight: relative weight of this image

The images are assumed to be registered to the same wcs and parent origin, thus: coadd[i+coadd.x0, j+coadd.y0] += image[i+image.x0, j+image.y0] weightMap[i+weightMap.x0, j+weightMap.y0] += weight for all good image pixels that overlap a coadd pixel. Good pixels are those for which mask & badPixelMask == 0.

Return

overlapBBox: overlapping bounding box, relative to parent image (hence xy0 is taken into account)

Exceptions
  • pexExcept::InvalidParameterError: if coadd and weightMap dimensions or xy0 do not match.