-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5961e7a
commit ec0e000
Showing
14 changed files
with
236 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,6 @@ config.log | |
*.cfgc | ||
*.pyc | ||
*.fits | ||
*_wrap.cc | ||
*Lib.py | ||
doc/html | ||
doc/*.tag | ||
doc/*.inc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# -*- python -*- | ||
from lsst.sconsUtils import scripts | ||
scripts.BasicSConscript.python(['utilsLib']) | ||
scripts.BasicSConscript.pybind11(['addToCoadd', | ||
'copyGoodPixels', | ||
'setCoaddEdgeBits']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* LSST Data Management System | ||
* Copyright 2008-2016 AURA/LSST. | ||
* | ||
* This product includes software developed by the | ||
* LSST Project (http://www.lsst.org/). | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the LSST License Statement and | ||
* the GNU General Public License along with this program. If not, | ||
* see <https://www.lsstcorp.org/LegalNotices/>. | ||
*/ | ||
|
||
#include <pybind11/pybind11.h> | ||
//#include <pybind11/stl.h> | ||
|
||
#include "lsst/coadd/utils/addToCoadd.h" | ||
|
||
namespace py = pybind11; | ||
using namespace pybind11::literals; | ||
|
||
namespace lsst { | ||
namespace coadd { | ||
namespace utils { | ||
|
||
namespace { | ||
template <typename CoaddPixelT, typename WeightPixelT> | ||
void declareAddToCoadd(py::module & mod) { | ||
namespace afwGeom = lsst::afw::geom; | ||
namespace afwImage = lsst::afw::image; | ||
|
||
mod.def("addToCoadd", (afwGeom::Box2I (*) (afwImage::Image<CoaddPixelT> &, | ||
afwImage::Image<WeightPixelT> &, | ||
afwImage::Image<CoaddPixelT> const &, | ||
WeightPixelT)) &addToCoadd, | ||
"coadd"_a, "weightMap"_a, "image"_a, "weight"_a); | ||
mod.def("addToCoadd", (afwGeom::Box2I (*) (afwImage::MaskedImage<CoaddPixelT> &, | ||
afwImage::Image<WeightPixelT> &, | ||
afwImage::MaskedImage<CoaddPixelT> const &, | ||
afwImage::MaskPixel const, | ||
WeightPixelT)) &addToCoadd, | ||
"coadd"_a, "weightMap"_a, "maskedImage"_a, "badPixelMask"_a, "weight"_a); | ||
} | ||
} | ||
|
||
PYBIND11_PLUGIN(_addToCoadd) { | ||
py::module mod("_addToCoadd", "Python wrapper for afw _addToCoadd library"); | ||
|
||
/* Module level */ | ||
declareAddToCoadd<double, double>(mod); | ||
declareAddToCoadd<double, float>(mod); | ||
declareAddToCoadd<double, int>(mod); | ||
declareAddToCoadd<double, std::uint16_t>(mod); | ||
declareAddToCoadd<float, double>(mod); | ||
declareAddToCoadd<float, float>(mod); | ||
declareAddToCoadd<float, int>(mod); | ||
declareAddToCoadd<float, std::uint16_t>(mod); | ||
|
||
/* Member types and enums */ | ||
|
||
/* Constructors */ | ||
|
||
/* Operators */ | ||
|
||
/* Members */ | ||
|
||
return mod.ptr(); | ||
} | ||
|
||
}}} // lsst::coadd::utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* LSST Data Management System | ||
* Copyright 2008-2016 AURA/LSST. | ||
* | ||
* This product includes software developed by the | ||
* LSST Project (http://www.lsst.org/). | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the LSST License Statement and | ||
* the GNU General Public License along with this program. If not, | ||
* see <https://www.lsstcorp.org/LegalNotices/>. | ||
*/ | ||
|
||
#include <pybind11/pybind11.h> | ||
//#include <pybind11/stl.h> | ||
|
||
#include "lsst/coadd/utils/copyGoodPixels.h" | ||
|
||
namespace py = pybind11; | ||
using namespace pybind11::literals; | ||
|
||
namespace lsst { | ||
namespace coadd { | ||
namespace utils { | ||
|
||
namespace { | ||
template <typename ImagePixelT> | ||
void declareCopyGoodPixels(py::module & mod) { | ||
namespace afwImage = lsst::afw::image; | ||
|
||
mod.def("copyGoodPixels", (int (*) (afwImage::Image<ImagePixelT> &, | ||
afwImage::Image<ImagePixelT> const &)) ©GoodPixels, | ||
"destImage"_a, "srcImage"_a); | ||
mod.def("copyGoodPixels", (int (*) (afwImage::MaskedImage<ImagePixelT> &, | ||
afwImage::MaskedImage<ImagePixelT> const &, | ||
afwImage::MaskPixel const)) ©GoodPixels, | ||
"destImage"_a, "srcImage"_a, "badPixelMask"_a); | ||
} | ||
} | ||
|
||
PYBIND11_PLUGIN(_copyGoodPixels) { | ||
py::module mod("_copyGoodPixels", "Python wrapper for afw _copyGoodPixels library"); | ||
|
||
/* Module level */ | ||
declareCopyGoodPixels<double>(mod); | ||
declareCopyGoodPixels<float>(mod); | ||
declareCopyGoodPixels<int>(mod); | ||
declareCopyGoodPixels<std::uint16_t>(mod); | ||
|
||
/* Member types and enums */ | ||
|
||
/* Constructors */ | ||
|
||
/* Operators */ | ||
|
||
/* Members */ | ||
|
||
return mod.ptr(); | ||
} | ||
|
||
}}} // lsst::coadd::utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* LSST Data Management System | ||
* Copyright 2008-2016 AURA/LSST. | ||
* | ||
* This product includes software developed by the | ||
* LSST Project (http://www.lsst.org/). | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the LSST License Statement and | ||
* the GNU General Public License along with this program. If not, | ||
* see <https://www.lsstcorp.org/LegalNotices/>. | ||
*/ | ||
|
||
#include <pybind11/pybind11.h> | ||
//#include <pybind11/stl.h> | ||
|
||
#include "lsst/coadd/utils/setCoaddEdgeBits.h" | ||
|
||
namespace py = pybind11; | ||
using namespace pybind11::literals; | ||
|
||
namespace lsst { | ||
namespace coadd { | ||
namespace utils { | ||
|
||
namespace { | ||
template <typename WeightPixelT> | ||
void declareSetCoaddEdgeBits(py::module & mod) { | ||
namespace afwImage = lsst::afw::image; | ||
|
||
mod.def("setCoaddEdgeBits", (void (*) (afwImage::Mask<afwImage::MaskPixel> &, | ||
afwImage::Image<WeightPixelT> const &)) &setCoaddEdgeBits, | ||
"coaddMask"_a, "weightMap"_a); | ||
} | ||
} | ||
|
||
PYBIND11_PLUGIN(_setCoaddEdgeBits) { | ||
py::module mod("_setCoaddEdgeBits", "Python wrapper for afw _setCoaddEdgeBits library"); | ||
|
||
/* Module level */ | ||
declareSetCoaddEdgeBits<double>(mod); | ||
declareSetCoaddEdgeBits<float>(mod); | ||
declareSetCoaddEdgeBits<int>(mod); | ||
declareSetCoaddEdgeBits<std::uint16_t>(mod); | ||
|
||
/* Member types and enums */ | ||
|
||
/* Constructors */ | ||
|
||
/* Operators */ | ||
|
||
/* Members */ | ||
|
||
return mod.ptr(); | ||
} | ||
|
||
}}} // lsst::coadd::utils |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from __future__ import absolute_import | ||
from ._addToCoadd import * | ||
from ._copyGoodPixels import * | ||
from ._setCoaddEdgeBits import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# -*- python -*- | ||
import os | ||
from lsst.sconsUtils import scripts, env | ||
|
||
scripts.BasicSConscript.tests() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters