LSST Applications g0b6bd0c080+a72a5dd7e6,g1182afd7b4+2a019aa3bb,g17e5ecfddb+2b8207f7de,g1d67935e3f+06cf436103,g38293774b4+ac198e9f13,g396055baef+6a2097e274,g3b44f30a73+6611e0205b,g480783c3b1+98f8679e14,g48ccf36440+89c08d0516,g4b93dc025c+98f8679e14,g5c4744a4d9+a302e8c7f0,g613e996a0d+e1c447f2e0,g6c8d09e9e7+25247a063c,g7271f0639c+98f8679e14,g7a9cd813b8+124095ede6,g9d27549199+a302e8c7f0,ga1cf026fa3+ac198e9f13,ga32aa97882+7403ac30ac,ga786bb30fb+7a139211af,gaa63f70f4e+9994eb9896,gabf319e997+ade567573c,gba47b54d5d+94dc90c3ea,gbec6a3398f+06cf436103,gc6308e37c7+07dd123edb,gc655b1545f+ade567573c,gcc9029db3c+ab229f5caf,gd01420fc67+06cf436103,gd877ba84e5+06cf436103,gdb4cecd868+6f279b5b48,ge2d134c3d5+cc4dbb2e3f,ge448b5faa6+86d1ceac1d,gecc7e12556+98f8679e14,gf3ee170dca+25247a063c,gf4ac96e456+ade567573c,gf9f5ea5b4d+ac198e9f13,gff490e6085+8c2580be5c,w.2022.27
LSST Data Management Base Package
_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
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
A base class for image defects.
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.