File ImageSubtract.h

Image Subtraction helper functions.

Author

Andrew Becker, University of Washington

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 ip
namespace diffim

Functions

template<typename PixelT, typename BackgroundT>
lsst::afw::image::MaskedImage<PixelT> convolveAndSubtract(lsst::afw::image::MaskedImage<PixelT> const &templateImage, lsst::afw::image::MaskedImage<PixelT> const &scienceMaskedImage, lsst::afw::math::Kernel const &convolutionKernel, BackgroundT background, bool invert = true)

Execute fundamental task of convolving template and subtracting it from science image.

Note

This version accepts a MaskedImage for the template

Parameters
  • templateImage: MaskedImage to apply convolutionKernel to

  • scienceMaskedImage: MaskedImage from which convolved templateImage is subtracted

  • convolutionKernel: Kernel to apply to templateImage

  • background: Background scalar or function to subtract after convolution

  • invert: Invert the output difference image

template<typename PixelT, typename BackgroundT>
lsst::afw::image::MaskedImage<PixelT> convolveAndSubtract(lsst::afw::image::Image<PixelT> const &templateImage, lsst::afw::image::MaskedImage<PixelT> const &scienceMaskedImage, lsst::afw::math::Kernel const &convolutionKernel, BackgroundT background, bool invert = true)

Execute fundamental task of convolving template and subtracting it from science image.

Note

This version accepts an Image for the template, and is thus faster during convolution

Parameters
  • templateImage: Image to apply convolutionKernel to

  • scienceMaskedImage: MaskedImage from which convolved templateImage is subtracted

  • convolutionKernel: Kernel to apply to templateImage

  • background: Background scalar or function to subtract after convolution

  • invert: Invert the output difference image

template<typename PixelT>
Eigen::MatrixXd imageToEigenMatrix(lsst::afw::image::Image<PixelT> const &img)

Turns a 2-d Image into a 2-d Eigen Matrix.

Parameters
  • img: Image whose pixel values are read into an Eigen::MatrixXd

Eigen::MatrixXi maskToEigenMatrix(lsst::afw::image::Mask<lsst::afw::image::MaskPixel> const &mask)