LSSTApplications  20.0.0
LSSTDataManagementBasePackage
setCoaddEdgeBits.cc
Go to the documentation of this file.
1 /*
2  * LSST Data Management System
3  * Copyright 2008-2016 AURA/LSST.
4  *
5  * This product includes software developed by the
6  * LSST Project (http://www.lsst.org/).
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 
23 #include "pybind11/pybind11.h"
24 
26 
27 namespace py = pybind11;
28 using namespace pybind11::literals;
29 
30 namespace lsst {
31 namespace coadd {
32 namespace utils {
33 
34 namespace {
35 
36 template <typename WeightPixelT>
37 void declareSetCoaddEdgeBits(py::module &mod) {
38  namespace afwImage = lsst::afw::image;
39 
40  mod.def("setCoaddEdgeBits",
43  "coaddMask"_a, "weightMap"_a);
44 }
45 
46 } // namespace
47 
49  py::module::import("lsst.afw.image");
50 
51  declareSetCoaddEdgeBits<double>(mod);
52  declareSetCoaddEdgeBits<float>(mod);
53  declareSetCoaddEdgeBits<int>(mod);
54  declareSetCoaddEdgeBits<std::uint16_t>(mod);
55 }
56 
57 } // namespace utils
58 } // namespace coadd
59 } // namespace lsst
lsst::afw::image
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
Definition: imageAlgorithm.dox:1
lsst::afw::image::Mask
Represent a 2-dimensional array of bitmask pixels.
Definition: Mask.h:77
lsst::coadd::utils::PYBIND11_MODULE
PYBIND11_MODULE(setCoaddEdgeBits, mod)
Definition: setCoaddEdgeBits.cc:48
image
afw::table::Key< afw::table::Array< ImagePixelT > > image
Definition: HeavyFootprint.cc:216
lsst
A base class for image defects.
Definition: imageAlgorithm.dox:1
lsst::coadd::utils::setCoaddEdgeBits
void setCoaddEdgeBits(lsst::afw::image::Mask< lsst::afw::image::MaskPixel > &coaddMask, lsst::afw::image::Image< WeightPixelT > const &weightMap)
set edge bits of coadd mask based on weight map
Definition: setCoaddEdgeBits.cc:42
pybind11
Definition: _GenericMap.cc:40
lsst::afw::image::Image
A class to represent a 2-dimensional array of pixels.
Definition: Image.h:58
setCoaddEdgeBits.h
lsst::meas::modelfit.psf.psfContinued.module
module
Definition: psfContinued.py:42