LSST Applications g011c388f00+f985364e28,g0265f82a02+cefac37fe7,g16a3bce237+cefac37fe7,g2079a07aa2+b9108c1c87,g2bbee38e9b+cefac37fe7,g337abbeb29+cefac37fe7,g3ddfee87b4+425a3f5e02,g4cf46543a9+2ef32aa566,g50ff169b8f+8309cf5058,g52b1c1532d+43dac7135f,g5d89126706+46afc7f72d,g83996f0134+2fb8039c37,g858d7b2824+59f22cc8bb,g87e100324b+59f22cc8bb,g8a8a8dda67+43dac7135f,g99855d9996+1ea0a8cf94,g9d147d8712+4559cd7206,g9ddcbc5298+389b8f2b7e,ga1e77700b3+4bafba478f,ga8c6da7877+1b58c58f75,gae46bcf261+cefac37fe7,gb700894bec+f0b514b300,gb8350603e9+4979c46fed,gba4ed39666+fb465f0d3e,gbeb006f7da+bf3b4a8997,gc86a011abf+59f22cc8bb,gcf0d15dbbd+425a3f5e02,gd162630629+d0c22ff203,gd44f2fa1a7+91fd017016,gdaeeff99f8+6b435c3f92,ge79ae78c31+cefac37fe7,ge9008a0c34+425a3f5e02,gee10cc3b42+43dac7135f,gf041782ebf+713927f999,gf1cff7945b+59f22cc8bb,w.2024.07
LSST Data Management Base Package
Loading...
Searching...
No Matches
kernelCandidateDetection.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"
24#include "pybind11/stl.h"
25
26#include <memory>
27#include <string>
28
30
31namespace py = pybind11;
32using namespace pybind11::literals;
33
34namespace lsst {
35namespace ip {
36namespace diffim {
37
38namespace {
39
47template <typename PixelT>
48void declareKernelCandidateDetection(lsst::cpputils::python::WrapperCollection &wrappers, std::string const &suffix) {
49 using PyKernelCandidateDetection =
50 py::class_<KernelCandidateDetection<PixelT>, std::shared_ptr<KernelCandidateDetection<PixelT>>>;
51
52 std::string name = "KernelCandidateDetection" + suffix;
53 wrappers.wrapType(PyKernelCandidateDetection(wrappers.module, name.c_str()), [](auto &mod, auto &cls) {
54 cls.def(py::init<daf::base::PropertySet const &>(), "ps"_a);
55
56 cls.def("apply", &KernelCandidateDetection<PixelT>::apply, "templateMaskedImage"_a,
57 "scienceMaskedImage"_a);
58 cls.def("growCandidate", &KernelCandidateDetection<PixelT>::growCandidate, "footprint"_a, "fpGrowPix"_a,
59 "templateMaskedImage"_a, "scienceMaskedImage"_a);
60 cls.def("getFootprints", &KernelCandidateDetection<PixelT>::getFootprints);
61 });
62}
63
64} // namespace lsst::ip::diffim::<anonymous>
65
67 declareKernelCandidateDetection<float>(wrappers, "F");
68}
69
70} // diffim
71} // ip
72} // lsst
table::Key< std::string > name
Definition Amplifier.cc:116
Detect candidates for kernels within 2 images.
A helper class for subdividing pybind11 module across multiple translation units (i....
Definition python.h:242
PyType wrapType(PyType cls, ClassWrapperCallback function, bool setModuleName=true)
Add a type (class or enum) wrapper, deferring method and other attribute definitions until finish() i...
Definition python.h:391
void wrapKernelCandidateDetection(WrapperCollection &wrappers)