lsst.jointcal  master-g9041cab851+12
photometryTransfo.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 
23 #include "pybind11/pybind11.h"
24 
26 
27 namespace py = pybind11;
28 using namespace pybind11::literals;
29 
30 namespace lsst {
31 namespace jointcal {
32 namespace {
33 
34 void declarePhotometryTransfo(py::module &mod) {
35  py::class_<PhotometryTransfo, std::shared_ptr<PhotometryTransfo>> cls(mod, "PhotometryTransfo");
36 
37  cls.def("__str__", &PhotometryTransfo::__str__);
38 }
39 
40 void declarePhotometryTransfoSpatiallyInvariant(py::module &mod) {
41  py::class_<PhotometryTransfoSpatiallyInvariant, std::shared_ptr<PhotometryTransfoSpatiallyInvariant>,
42  PhotometryTransfo>
43  cls(mod, "PhotometryTransfoSpatiallyInvariant");
44 
45  cls.def(py::init<double>(), "value"_a = 1);
46 }
47 
48 PYBIND11_PLUGIN(photometryTransfo) {
49  py::module mod("photometryTransfo");
50 
51  declarePhotometryTransfo(mod);
52  declarePhotometryTransfoSpatiallyInvariant(mod);
53 
54  return mod.ptr();
55 }
56 
57 } // namespace
58 } // namespace jointcal
59 } // namespace lsst
Class for a simple mapping implementing a generic Gtransfo.
Definition: Associations.h:24