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
addToCoadd.cc
Go to the documentation of this file.
1 /*
2  * LSST Data Management System
3  *
4  * This product includes software developed by the
5  * LSST Project (http://www.lsst.org/).
6  * See the COPYRIGHT file
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the LSST License Statement and
19  * the GNU General Public License along with this program. If not,
20  * see <https://www.lsstcorp.org/LegalNotices/>.
21  */
22 #include "pybind11/pybind11.h"
23 
24 #include <cstdint>
25 
27 
28 namespace py = pybind11;
29 using namespace pybind11::literals;
30 
31 namespace lsst {
32 namespace coadd {
33 namespace chisquared {
34 
35 namespace {
36 
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);
48 }
49 
50 } // namespace
51 
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 }
65 
66 } // namespace chisquared
67 } // namespace coadd
68 } // namespace lsst
A base class for image defects.
PYBIND11_MODULE(addToCoadd, mod)
Definition: addToCoadd.cc:56