LSSTApplications  18.1.0
LSSTDataManagementBasePackage
multiModel.cc
Go to the documentation of this file.
1 // -*- lsst-c++ -*-
2 /*
3  * LSST Data Management System
4  * Copyright 2008-2013 LSST Corporation.
5  *
6  * This product includes software developed by the
7  * LSST Project (http://www.lsst.org/).
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the LSST License Statement and
20  * the GNU General Public License along with this program. If not,
21  * see <http://www.lsstcorp.org/LegalNotices/>.
22  */
23 
24 #include "pybind11/pybind11.h"
25 #include "pybind11/stl.h"
26 
28 
29 namespace py = pybind11;
30 using namespace pybind11::literals;
31 
32 namespace lsst {
33 namespace meas {
34 namespace modelfit {
35 namespace {
36 
37 using PyMultiModel = py::class_<MultiModel, std::shared_ptr<MultiModel>, Model>;
38 
40  py::module::import("lsst.meas.modelfit.model");
41 
42  PyMultiModel cls(mod, "MultiModel");
43  cls.def(py::init<ModelVector, MultiModel::NameVector const &>(), "components"_a, "prefixes"_a);
44  cls.def("getComponents", &MultiModel::getComponents);
45 
46  // All other MultiModel methods are virtuals already inherited from
47  // wrappers for Model.
48 }
49 
50 }
51 }
52 }
53 } // namespace lsst::meas::modelfit::anonymous
PYBIND11_MODULE(camera, mod)
Definition: camera.cc:34
A base class for image defects.