| LSSTApplications
    20.0.0
    LSSTDataManagementBasePackage | 
 
 
 
Go to the documentation of this file.
   38 #include "boost/timer.hpp" 
   61 template <
typename PixelT>
 
   67     Eigen::MatrixXd M = Eigen::MatrixXd::Zero(rows, cols);
 
   83     unsigned int rows = 
mask.getHeight();
 
   84     unsigned int cols = 
mask.getWidth();
 
   85     Eigen::MatrixXi M = Eigen::MatrixXi::Zero(rows, cols);
 
   86     for (
int y = 0; 
y != 
mask.getHeight(); ++
y) {
 
  114 template <
typename PixelT, 
typename BackgroundT>
 
  130                       convolutionKernel, convolutionControl);
 
  136     convolvedMaskedImage -= scienceMaskedImage;
 
  140         convolvedMaskedImage *= -1.0;
 
  143     double time = t.elapsed();
 
  144     LOGL_DEBUG(
"TRACE4.ip.diffim.convolveAndSubtract",
 
  145                "Total compute time to convolve and subtract : %.2f s", time);
 
  147     return convolvedMaskedImage;
 
  165 template <
typename PixelT, 
typename BackgroundT>
 
  181                       convolutionKernel, convolutionControl);
 
  191         *convolvedMaskedImage.
getImage() *= -1.0;
 
  196     double time = t.elapsed();
 
  197     LOGL_DEBUG(
"TRACE4.ip.diffim.convolveAndSubtract",
 
  198                "Total compute time to convolve and subtract : %.2f s", time);
 
  200     return convolvedMaskedImage;
 
  220 #define p_INSTANTIATE_convolveAndSubtract(TEMPLATE_IMAGE_T, TYPE)     \ 
  222     lsst::afw::image::MaskedImage<TYPE> convolveAndSubtract(            \ 
  223         lsst::afw::image::TEMPLATE_IMAGE_T<TYPE> const& templateImage, \ 
  224         lsst::afw::image::MaskedImage<TYPE> const& scienceMaskedImage,  \ 
  225         lsst::afw::math::Kernel const& convolutionKernel,               \ 
  230     afwImage::MaskedImage<TYPE> convolveAndSubtract( \ 
  231         lsst::afw::image::TEMPLATE_IMAGE_T<TYPE> const& templateImage, \ 
  232         lsst::afw::image::MaskedImage<TYPE> const& scienceMaskedImage, \ 
  233         lsst::afw::math::Kernel const& convolutionKernel, \ 
  234         lsst::afw::math::Function2<double> const& backgroundFunction, \ 
  237 #define INSTANTIATE_convolveAndSubtract(TYPE) \ 
  238 p_INSTANTIATE_convolveAndSubtract(Image, TYPE) \ 
  239 p_INSTANTIATE_convolveAndSubtract(MaskedImage, TYPE) 
  
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
void setDoNormalize(bool doNormalize)
void assign(ImageBase const &rhs, lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT)
Copy pixels from another image to a specified subregion of this image.
Class to calculate difference image statistics.
x_iterator row_begin(int y) const
Return an x_iterator to the start of the y'th row.
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.
int getHeight() const
Return the number of rows in the image.
An include file to include the header files for lsst::ip::diffim.
x_iterator row_end(int y) const
Return an x_iterator to the end of the y'th row.
Eigen::MatrixXd imageToEigenMatrix(lsst::afw::image::Image< PixelT > const &img)
Turns a 2-d Image into a 2-d Eigen Matrix.
#define INSTANTIATE_convolveAndSubtract(TYPE)
A base class for image defects.
VariancePtr getVariance() const
Return a (shared_ptr to) the MaskedImage's variance.
lsst::geom::Extent2I getDimensions() const
Return the image's size; useful for passing to constructors.
Parameters to control convolution.
#define LOGL_DEBUG(logger, message...)
Eigen::MatrixXi maskToEigenMatrix(lsst::afw::image::Mask< lsst::afw::image::MaskPixel > const &mask)
Class to accumulate Mask bits.
ImagePtr getImage() const
Return a (shared_ptr to) the MaskedImage's image.
Kernels are used for convolution with MaskedImages and (eventually) Images.
A class to represent a 2-dimensional array of pixels.
MaskPtr getMask() const
Return a (shared_ptr to) the MaskedImage's mask.
LSST DM logging module built on log4cxx.
lsst::geom::Extent2I getDimensions() const
int getWidth() const
Return the number of columns in the image.
Relationship invert(Relationship r)
Given the relationship between two sets A and B (i.e.