LSST Applications g070148d5b3+33e5256705,g0d53e28543+25c8b88941,g0da5cf3356+2dd1178308,g1081da9e2a+62d12e78cb,g17e5ecfddb+7e422d6136,g1c76d35bf8+ede3a706f7,g295839609d+225697d880,g2e2c1a68ba+cc1f6f037e,g2ffcdf413f+853cd4dcde,g38293774b4+62d12e78cb,g3b44f30a73+d953f1ac34,g48ccf36440+885b902d19,g4b2f1765b6+7dedbde6d2,g5320a0a9f6+0c5d6105b6,g56b687f8c9+ede3a706f7,g5c4744a4d9+ef6ac23297,g5ffd174ac0+0c5d6105b6,g6075d09f38+66af417445,g667d525e37+2ced63db88,g670421136f+2ced63db88,g71f27ac40c+2ced63db88,g774830318a+463cbe8d1f,g7876bc68e5+1d137996f1,g7985c39107+62d12e78cb,g7fdac2220c+0fd8241c05,g96f01af41f+368e6903a7,g9ca82378b8+2ced63db88,g9d27549199+ef6ac23297,gabe93b2c52+e3573e3735,gb065e2a02a+3dfbe639da,gbc3249ced9+0c5d6105b6,gbec6a3398f+0c5d6105b6,gc9534b9d65+35b9f25267,gd01420fc67+0c5d6105b6,geee7ff78d7+a14128c129,gf63283c776+ede3a706f7,gfed783d017+0c5d6105b6,w.2022.47
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)
Definition: _cameraGeom.cc:38
void defineOrientation(py::module &mod)
Definition: _orientation.cc:32
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.