lsst.meas.extensions.psfex  13.0-5-gd2c5893+38
 All Classes Namespaces Files Functions Variables Friends Macros Groups
field.cc
Go to the documentation of this file.
1 /*
2  * LSST Data Management System
3  * * This product includes software developed by the
4  * LSST Project (http://www.lsst.org/).
5  * See the COPYRIGHT file
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the LSST License Statement and
18  * the GNU General Public License along with this program. If not,
19  * see <https://www.lsstcorp.org/LegalNotices/>.
20  */
21 #include "pybind11/pybind11.h"
22 #include "pybind11/stl.h"
23 
24 #include "lsst/meas/extensions/psfex/Field.hh"
25 
26 #undef PI // defined by psfex, clashes with afw
27 
28 #include "lsst/afw/image/Wcs.h"
29 
30 namespace py = pybind11;
31 using namespace pybind11::literals;
32 
33 namespace lsst {
34 namespace meas {
35 namespace extensions {
36 namespace psfex {
37 
39  py::module mod("field");
40 
41  py::class_<Field, std::shared_ptr<Field>> clsField(mod, "Field");
42 
43  clsField.def(py::init<std::string const&>(),
44  "ident"_a="unknown");
45 
46  clsField.def("finalize", &Field::finalize);
47  clsField.def("addExt", &Field::addExt);
48  clsField.def("getNext", &Field::getNext);
49  clsField.def("getPsfs", &Field::getPsfs);
50 
51  mod.def("makeit", makeit,
52  "fields"_a, "sets"_a);
53 
54  return mod.ptr();
55 }
56 
57 } // fieldex
58 } // extensions
59 } // meas
60 } // lsst