LSSTApplications  19.0.0-11-g2ce9f25+2,20.0.0+1,20.0.0+11,20.0.0+2,20.0.0+3,20.0.0+4,20.0.0+5,20.0.0+8,20.0.0+9,20.0.0-1-g009f3de,20.0.0-1-g10df615+8,20.0.0-1-g253301a+4,20.0.0-1-g32a200e+8,20.0.0-1-g596936a+9,20.0.0-1-g8a53f90+1,20.0.0-1-gc96f8cb+10,20.0.0-1-gd1c87d7+1,20.0.0-15-g34741e2+3,20.0.0-2-g04cfba9+2,20.0.0-2-gec03fae+2,20.0.0-3-g082faa5+1,20.0.0-3-g2fa8bb8+6,20.0.0-3-gbdbfa727+1,20.0.0-4-gde602ef96+3,20.0.0-4-ge48a6ca+4,20.0.0-8-g1acaa36,20.0.0-8-g7eef53f7+5,w.2020.27
LSSTDataManagementBasePackage
utils.cc
Go to the documentation of this file.
1 /*
2  * LSST Data Management System
3  * See COPYRIGHT file at the top of the source tree.
4  *
5  * This product includes software developed by the
6  * LSST Project (http://www.lsst.org/).
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"
23 
24 #include "lsst/sphgeom/Angle.h"
26 #include "lsst/sphgeom/utils.h"
27 #include "lsst/sphgeom/Vector3d.h"
28 
29 namespace py = pybind11;
30 using namespace pybind11::literals;
31 
32 namespace lsst {
33 namespace sphgeom {
34 namespace {
35 
36 PYBIND11_MODULE(utils, mod) {
37  mod.def("getMinSquaredChordLength", &getMinSquaredChordLength, "v"_a, "a"_a,
38  "b"_a, "n"_a);
39  mod.def("getMaxSquaredChordLength", &getMaxSquaredChordLength, "v"_a, "a"_a,
40  "b"_a, "n"_a);
41  mod.def("getMinAngleToCircle", &getMinAngleToCircle, "x"_a, "c"_a);
42  mod.def("getMaxAngleToCircle", &getMaxAngleToCircle, "x"_a, "c"_a);
43  mod.def("getWeightedCentroid", &getWeightedCentroid, "vector0"_a,
44  "vector1"_a, "vector2"_a);
45 }
46 
47 } // <anonymous>
48 } // sphgeom
49 } // lsst
UnitVector3d.h
This file declares a class for representing unit vectors in ℝ³.
Angle.h
This file declares a class for representing angles.
Vector3d.h
This file declares a class for representing vectors in ℝ³.
lsst::sphgeom::getMinAngleToCircle
Angle getMinAngleToCircle(Angle x, Angle c)
getMinAngleToCircle returns the minimum angular separation between a point at latitude x and the poin...
Definition: utils.h:62
utils.h
This file declares miscellaneous utility functions.
lsst::sphgeom::getMaxSquaredChordLength
double getMaxSquaredChordLength(Vector3d const &v, Vector3d const &a, Vector3d const &b, Vector3d const &n)
Let p be the unit vector furthest from v that lies on the plane with normal n in the direction of the...
Definition: utils.cc:58
lsst
A base class for image defects.
Definition: imageAlgorithm.dox:1
lsst::sphgeom::getMaxAngleToCircle
Angle getMaxAngleToCircle(Angle x, Angle c)
getMaxAngleToCircle returns the maximum angular separation between a point at latitude x and the poin...
Definition: utils.h:68
pybind11
Definition: _GenericMap.cc:40
lsst::sphgeom::getMinSquaredChordLength
double getMinSquaredChordLength(Vector3d const &v, Vector3d const &a, Vector3d const &b, Vector3d const &n)
Let p be the unit vector closest to v that lies on the plane with normal n in the direction of the cr...
Definition: utils.cc:36
lsst::sphgeom::getWeightedCentroid
Vector3d getWeightedCentroid(UnitVector3d const &v0, UnitVector3d const &v1, UnitVector3d const &v2)
getWeightedCentroid returns the center of mass of the given spherical triangle (assuming a uniform ma...
Definition: utils.cc:79
lsst::afw::cameraGeom::PYBIND11_MODULE
PYBIND11_MODULE(camera, mod)
Definition: camera.cc:133