22 #include "pybind11/pybind11.h"
28 namespace py = pybind11;
29 using namespace pybind11::literals;
33 namespace chisquared {
44 template <
typename CoaddPixelT,
typename WeightPixelT>
45 void declareAddToCoadd(py::module& mod) {
46 mod.def(
"addToCoadd", &addToCoadd<CoaddPixelT, WeightPixelT>,
"coadd"_a,
"weightMap"_a,
"maskedImage"_a,
47 "badPixelMask"_a,
"weight"_a);
53 py::module::import(
"lsst.afw.geom");
54 py::module::import(
"lsst.afw.image");
56 py::module mod(
"addToCoadd");
58 declareAddToCoadd<double, double>(mod);
59 declareAddToCoadd<double, float>(mod);
60 declareAddToCoadd<double, int>(mod);
61 declareAddToCoadd<double, std::uint16_t>(mod);
62 declareAddToCoadd<float, double>(mod);
63 declareAddToCoadd<float, float>(mod);
64 declareAddToCoadd<float, int>(mod);
65 declareAddToCoadd<float, std::uint16_t>(mod);
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 algori...
PYBIND11_PLUGIN(addToCoadd)