LSST Applications  21.0.0-131-g8cabc107+a69ba78d82,22.0.0+04ba422108,22.0.0+11a2aa21cd,22.0.0+304ef9150d,22.0.0+555561a960,22.0.0+64c1bc5aa5,22.0.0+7b3a3f865e,22.0.0+c6621b99e5,22.0.0+d3217bb6e3,22.0.0+f68d4e2320,22.0.1-1-g1b65d06+2b73cf3c80,22.0.1-1-g7058be7+1cf78af69b,22.0.1-1-g7dab645+500ce2b9ed,22.0.1-1-g8760c09+64c1bc5aa5,22.0.1-1-g949febb+64c1bc5aa5,22.0.1-1-ga324b9c+304ef9150d,22.0.1-1-ga86695c+f68d4e2320,22.0.1-1-gf9d8b05+04ba422108,22.0.1-10-g781e53d+66adffc818,22.0.1-10-gba590ab+e809fee73e,22.0.1-13-g00a9d746+721f44a764,22.0.1-13-g76f9b8d+f68d4e2320,22.0.1-18-g3db9cf4b+f395498f22,22.0.1-18-gb17765a+e9e2fc23a5,22.0.1-2-gcb770ba+65b32d44ce,22.0.1-22-gf1d71818e+4206820b0d,22.0.1-3-g7aa11f2+f68d4e2320,22.0.1-3-g8c1d971+f253ffa91f,22.0.1-3-g997b569+3720ea777b,22.0.1-4-g1930a60+6871d0c7f6,22.0.1-4-g5b7b756+6b209d634c,22.0.1-6-ga02864e+6871d0c7f6,22.0.1-7-g3402376+eb203fffe3,22.0.1-7-g65f59fa+912a8ccb80,master-gcc5351303a+555561a960,w.2021.31
LSST Data Management Base Package
_orientation.cc
Go to the documentation of this file.
1 /*
2  * This file is part of afw.
3  *
4  * Developed for the LSST Data Management System.
5  * This product includes software developed by the LSST Project
6  * (https://www.lsst.org).
7  * See the COPYRIGHT file at the top-level directory of this distribution
8  * for details of code ownership.
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <https://www.gnu.org/licenses/>.
22  */
23 
24 #include <pybind11/pybind11.h>
25 #include <lsst/utils/python.h>
26 
28 
29 namespace py = pybind11;
30 using namespace py::literals;
31 
32 namespace lsst {
33 namespace afw {
34 namespace cameraGeom {
35 
37  wrappers.addSignatureDependency("lsst.geom");
38  wrappers.wrapType(py::class_<Orientation>(wrappers.module, "Orientation"), [](auto &mod, auto &cls) {
39  /* Constructors */
40  cls.def(py::init<lsst::geom::Point2D, lsst::geom::Point2D, lsst::geom::Angle, lsst::geom::Angle,
41  lsst::geom::Angle>(),
42  "fpPosition"_a = lsst::geom::Point2D(0, 0), "refPoint"_a = lsst::geom::Point2D(-0.5, -0.5),
43  "yaw"_a = lsst::geom::Angle(0), "pitch"_a = lsst::geom::Angle(0),
44  "roll"_a = lsst::geom::Angle(0));
45 
46  /* Operators */
47 
48  /* Members */
49  cls.def("getFpPosition", &Orientation::getFpPosition);
50  cls.def("getReferencePoint", &Orientation::getReferencePoint);
51  cls.def("getYaw", &Orientation::getYaw);
52  cls.def("getPitch", &Orientation::getPitch);
53  cls.def("getRoll", &Orientation::getRoll);
54  cls.def("getNQuarter", &Orientation::getNQuarter);
55  cls.def("makePixelFpTransform", &Orientation::makePixelFpTransform, "pixelSizeMm"_a);
56  cls.def("makeFpPixelTransform", &Orientation::makeFpPixelTransform, "pixelSizeMm"_a);
57  cls.def("getFpPosition", &Orientation::getFpPosition);
58  cls.def("getFpPosition", &Orientation::getFpPosition);
59  cls.def("getFpPosition", &Orientation::getFpPosition);
60  cls.def("getFpPosition", &Orientation::getFpPosition);
61  });
62 }
63 } // namespace cameraGeom
64 } // namespace afw
65 } // namespace lsst
A helper class for subdividing pybind11 module across multiple translation units (i....
Definition: python.h:242
pybind11::module module
The module object passed to the PYBIND11_MODULE block that contains this WrapperCollection.
Definition: python.h:448
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 addSignatureDependency(std::string const &name)
Indicate an external module that provides a type used in function/method signatures.
Definition: python.h:357
void wrapOrientation(lsst::utils::python::WrapperCollection &)
Definition: _orientation.cc:36
A base class for image defects.