LSST Applications 26.0.0,g0265f82a02+6660c170cc,g07994bdeae+30b05a742e,g0a0026dc87+17526d298f,g0a60f58ba1+17526d298f,g0e4bf8285c+96dd2c2ea9,g0ecae5effc+c266a536c8,g1e7d6db67d+6f7cb1f4bb,g26482f50c6+6346c0633c,g2bbee38e9b+6660c170cc,g2cc88a2952+0a4e78cd49,g3273194fdb+f6908454ef,g337abbeb29+6660c170cc,g337c41fc51+9a8f8f0815,g37c6e7c3d5+7bbafe9d37,g44018dc512+6660c170cc,g4a941329ef+4f7594a38e,g4c90b7bd52+5145c320d2,g58be5f913a+bea990ba40,g635b316a6c+8d6b3a3e56,g67924a670a+bfead8c487,g6ae5381d9b+81bc2a20b4,g93c4d6e787+26b17396bd,g98cecbdb62+ed2cb6d659,g98ffbb4407+81bc2a20b4,g9ddcbc5298+7f7571301f,ga1e77700b3+99e9273977,gae46bcf261+6660c170cc,gb2715bf1a1+17526d298f,gc86a011abf+17526d298f,gcf0d15dbbd+96dd2c2ea9,gdaeeff99f8+0d8dbea60f,gdb4ec4c597+6660c170cc,ge23793e450+96dd2c2ea9,gf041782ebf+171108ac67
LSST Data Management Base Package
Loading...
Searching...
No Matches
_sphgeom.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/python.h"
25
26#include "lsst/sphgeom/Angle.h"
28#include "lsst/sphgeom/Box.h"
29#include "lsst/sphgeom/Box3d.h"
31#include "lsst/sphgeom/Circle.h"
37#include "lsst/sphgeom/LonLat.h"
45#include "lsst/sphgeom/Region.h"
48
49namespace py = pybind11;
50
51namespace lsst {
52namespace sphgeom {
53
54void defineCurve(py::module&);
55void defineOrientation(py::module&);
56void defineRelationship(py::module&);
57void defineUtils(py::module&);
58
59namespace {
60
61PYBIND11_MODULE(_sphgeom, mod) {
62 // Create all Python class instances up front, then define them.
63 //
64 // This results in docstrings containing only Python type names, even
65 // when there are circular dependencies in C++.
66
67 py::class_<Angle> angle(mod, "Angle");
68 py::class_<NormalizedAngle> normalizedAngle(mod, "NormalizedAngle");
69 py::class_<LonLat, std::shared_ptr<LonLat>> lonLat(mod, "LonLat");
70 py::class_<Vector3d, std::shared_ptr<Vector3d>> vector3d(mod, "Vector3d");
71 py::class_<UnitVector3d, std::shared_ptr<UnitVector3d>> unitVector3d(
72 mod, "UnitVector3d");
73 py::class_<Matrix3d, std::shared_ptr<Matrix3d>> matrix3d(mod, "Matrix3d");
74
75 py::class_<AngleInterval, std::shared_ptr<AngleInterval>> angleInterval(
76 mod, "AngleInterval");
77 py::class_<NormalizedAngleInterval,
79 normalizedAngleInterval(mod, "NormalizedAngleInterval");
80 py::class_<Interval1d, std::shared_ptr<Interval1d>> interval1d(
81 mod, "Interval1d");
82
83 py::class_<Box3d, std::shared_ptr<Box3d>> box3d(mod, "Box3d");
84
85 py::class_<Region, std::unique_ptr<Region>> region(mod, "Region");
86 py::class_<Box, std::unique_ptr<Box>, Region> box(mod, "Box");
87 py::class_<Circle, std::unique_ptr<Circle>, Region> circle(mod, "Circle");
88 py::class_<ConvexPolygon, std::unique_ptr<ConvexPolygon>, Region>
89 convexPolygon(mod, "ConvexPolygon");
90 py::class_<Ellipse, std::unique_ptr<Ellipse>, Region> ellipse(mod,
91 "Ellipse");
92 py::class_<CompoundRegion, std::unique_ptr<CompoundRegion>, Region> compoundRegion(mod, "CompoundRegion");
93 py::class_<UnionRegion, std::unique_ptr<UnionRegion>, CompoundRegion> unionRegion(mod, "UnionRegion");
94 py::class_<IntersectionRegion, std::unique_ptr<IntersectionRegion>, CompoundRegion>
95 intersectionRegion(mod, "IntersectionRegion");
96
97 py::class_<RangeSet, std::shared_ptr<RangeSet>> rangeSet(mod, "RangeSet");
98
99 py::class_<Pixelization> pixelization(mod, "Pixelization");
100 py::class_<HtmPixelization, Pixelization> htmPixelization(
101 mod, "HtmPixelization");
102 py::class_<Mq3cPixelization, Pixelization> mq3cPixelization(
103 mod, "Mq3cPixelization");
104 py::class_<Q3cPixelization, Pixelization> q3cPixelization(
105 mod, "Q3cPixelization");
106
107 py::class_<Chunker, std::shared_ptr<Chunker>> chunker(mod, "Chunker");
108
110 defineClass(normalizedAngle);
111 defineClass(lonLat);
112 defineClass(vector3d);
113 defineClass(unitVector3d);
114 defineClass(matrix3d);
115
116 defineClass(angleInterval);
117 defineClass(normalizedAngleInterval);
118 defineClass(interval1d);
119
120 defineClass(box3d);
121
122 defineClass(region);
123 defineClass(box);
124 defineClass(circle);
125 defineClass(convexPolygon);
126 defineClass(ellipse);
127 defineClass(compoundRegion);
128 defineClass(unionRegion);
129 defineClass(intersectionRegion);
130
131 defineClass(rangeSet);
132
133 defineClass(pixelization);
134 defineClass(htmPixelization);
135 defineClass(mq3cPixelization);
136 defineClass(q3cPixelization);
137
138 defineClass(chunker);
139
140 // Define C++ functions.
141
142 defineCurve(mod);
145 defineUtils(mod);
146}
147
148} // <anonymous>
149} // sphgeom
150} // lsst
This file defines a class for representing angle intervals.
This file declares a class for representing axis-aligned bounding boxes in ℝ³.
This file declares a class for partitioning the sky into chunks and sub-chunks.
This file declares a class for representing circular regions on the unit sphere.
This file declares classes for representing compound regions on the unit sphere.
This file declares a class for representing convex polygons with great circle edges on the unit spher...
table::Key< double > angle
This file declares a Pixelization subclass for the HTM indexing scheme.
This file defines a class for representing intervals of ℝ.
This file contains a class representing spherical coordinates.
This file contains a class representing 3x3 real matrices.
This file declares a Pixelization subclass for the modified Q3C indexing scheme.
This file declares a class for representing normalized angles.
This file declares a class representing closed intervals of normalized angles, i.e.
This file defines an interface for pixelizations of the sphere.
This file declares a Pixelization subclass for the Q3C indexing scheme.
This file provides a type for representing integer sets.
This file defines an interface for spherical regions.
This file declares a class for representing unit vectors in ℝ³.
This file declares a class for representing vectors in ℝ³.
PYBIND11_MODULE(_cameraGeom, mod)
void defineOrientation(py::module &mod)
void defineClass(Pybind11Class &cls)
void defineCurve(py::module &mod)
Definition _curve.cc:32
void defineRelationship(py::module &mod)
void defineUtils(py::module &)
Definition _utils.cc:37
This file declares a class for representing angles.
This file declares a class for representing longitude/latitude angle boxes on the unit sphere.
This file declares a class for representing elliptical regions on the unit sphere.