LSSTApplications  16.0-10-g9d3e444,16.0-11-g09ed895+3,16.0-11-g12e47bd+6,16.0-12-g5c924a4+14,16.0-12-g71e5ef5+3,16.0-15-g7af1f30,16.0-15-gdd5ca33+2,16.0-16-gf0259e2+1,16.0-17-g5cf0468+7,16.0-18-ga4d4bcb+8,16.0-18-gcf94535+6,16.0-18-geff7d6b+3,16.0-19-g9d290d5+6,16.0-2-g0febb12+22,16.0-2-g9d5294e+73,16.0-2-ga8830df+7,16.0-21-gdae7b8c,16.0-23-g11577836,16.0-28-gfc9ea6c+13,16.0-29-g79c42fc,16.0-29-ge8801f9+6,16.0-3-ge00e371+41,16.0-4-g18f3627+17,16.0-4-g5f3a788+21,16.0-4-ga3eb747+11,16.0-4-gabf74b7+36,16.0-4-gb13d127+7,16.0-5-g27fb78a+14,16.0-5-g6a53317+41,16.0-5-gb3f8a4b+94,16.0-54-gbf35a124+1,16.0-6-g9321be7+5,16.0-6-gcbc7b31+51,16.0-6-gf49912c+37,16.0-75-gbf7a9a820,16.0-8-g21fd5fe+38,16.0-8-g3a9f023+24,16.0-8-gc11f1cf+4,16.0-9-gf3bc169+4,16.0-9-gf5c1f43+12,master-gc237143d49+1,w.2019.03
LSSTDataManagementBasePackage
Namespaces | Functions
lsst::coadd::chisquared Namespace Reference

Namespaces

 coadd
 
 version
 

Functions

template<typename CoaddPixelT , typename WeightPixelT >
lsst::afw::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 and associated weight map using the chi squared algorithm More...
 
 PYBIND11_MODULE (addToCoadd, mod)
 

Function Documentation

◆ addToCoadd()

template<typename CoaddPixelT , typename WeightPixelT >
lsst::afw::geom::Box2I lsst::coadd::chisquared::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 and associated weight map using the chi squared algorithm

For good pixels (image.mask & badPixelMask == 0), coadd and weightMap are altered as follows: coadd.image += image.image**2 / image.variance coadd.mask |= image.mask weightMap += weight For bad pixels, coadd and weightMap are not altered.

Note that coadd.variance is not altered.

Returns
overlapBBox: overlapping bounding box, relative to parent image (hence xy0 is taken into account)
Exceptions
pexExcept::InvalidParameterErrorif coadd and weightMap dimensions or xy0 do not match.
Parameters
[in,out]coaddcoadd to be modified
[in,out]weightMapweight map to be modified
maskedImagemasked image to add to coadd
badPixelMaskskip input pixel if input mask & badPixelMask !=0
weightrelative weight of this image

◆ PYBIND11_MODULE()

lsst::coadd::chisquared::PYBIND11_MODULE ( addToCoadd  ,
mod   
)

Definition at line 52 of file addToCoadd.cc.

52  {
53  py::module::import("lsst.afw.geom");
54  py::module::import("lsst.afw.image");
55 
56  declareAddToCoadd<double, double>(mod);
57  declareAddToCoadd<double, float>(mod);
58  declareAddToCoadd<double, int>(mod);
59  declareAddToCoadd<double, std::uint16_t>(mod);
60  declareAddToCoadd<float, double>(mod);
61  declareAddToCoadd<float, float>(mod);
62  declareAddToCoadd<float, int>(mod);
63  declareAddToCoadd<float, std::uint16_t>(mod);
64 }