LSST Applications g04e9c324dd+8c5ae1fdc5,g134cb467dc+b203dec576,g18429d2f64+358861cd2c,g199a45376c+0ba108daf9,g1fd858c14a+dd066899e3,g262e1987ae+ebfced1d55,g29ae962dfc+72fd90588e,g2cef7863aa+aef1011c0b,g35bb328faa+8c5ae1fdc5,g3fd5ace14f+b668f15bc5,g4595892280+3897dae354,g47891489e3+abcf9c3559,g4d44eb3520+fb4ddce128,g53246c7159+8c5ae1fdc5,g67b6fd64d1+abcf9c3559,g67fd3c3899+1f72b5a9f7,g74acd417e5+cb6b47f07b,g786e29fd12+668abc6043,g87389fa792+8856018cbb,g89139ef638+abcf9c3559,g8d7436a09f+bcf525d20c,g8ea07a8fe4+9f5ccc88ac,g90f42f885a+6054cc57f1,g97be763408+06f794da49,g9dd6db0277+1f72b5a9f7,ga681d05dcb+7e36ad54cd,gabf8522325+735880ea63,gac2eed3f23+abcf9c3559,gb89ab40317+abcf9c3559,gbf99507273+8c5ae1fdc5,gd8ff7fe66e+1f72b5a9f7,gdab6d2f7ff+cb6b47f07b,gdc713202bf+1f72b5a9f7,gdfd2d52018+8225f2b331,ge365c994fd+375fc21c71,ge410e46f29+abcf9c3559,geaed405ab2+562b3308c0,gf9a733ac38+8c5ae1fdc5,w.2025.35
LSST Data Management Base Package
Loading...
Searching...
No Matches
_sphgeom.cc
Go to the documentation of this file.
1/*
2 * This file is part of sphgeom.
3 *
4 * Developed for the LSST Data Management System.
5 * This product includes software developed by the LSST Project
6 * (http://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 software is dual licensed under the GNU General Public License and also
11 * under a 3-clause BSD license. Recipients may choose which of these licenses
12 * to use; please see the files gpl-3.0.txt and/or bsd_license.txt,
13 * respectively. If you choose the GPL option then the following text applies
14 * (but note that there is still no warranty even if you opt for BSD instead):
15 *
16 * This program is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 */
29#include "pybind11/pybind11.h"
30
31#include "lsst/sphgeom/python.h"
32
33#include "lsst/sphgeom/Angle.h"
35#include "lsst/sphgeom/Box.h"
36#include "lsst/sphgeom/Box3d.h"
38#include "lsst/sphgeom/Circle.h"
44#include "lsst/sphgeom/LonLat.h"
52#include "lsst/sphgeom/Region.h"
55
56namespace py = pybind11;
57
58namespace lsst {
59namespace sphgeom {
60
61void defineCurve(py::module&);
62void defineOrientation(py::module&);
63void defineRelationship(py::module&);
64void defineUtils(py::module&);
65
66namespace {
67
68PYBIND11_MODULE(_sphgeom, mod) {
69 // Create all Python class instances up front, then define them.
70 //
71 // This results in docstrings containing only Python type names, even
72 // when there are circular dependencies in C++.
73
74 py::classh<Angle> angle(mod, "Angle");
75 py::classh<NormalizedAngle> normalizedAngle(mod, "NormalizedAngle");
76 py::classh<LonLat> lonLat(mod, "LonLat");
77 py::classh<Vector3d> vector3d(mod, "Vector3d");
78 py::classh<UnitVector3d> unitVector3d(mod, "UnitVector3d");
79 py::classh<Matrix3d> matrix3d(mod, "Matrix3d");
80
81 py::classh<AngleInterval> angleInterval(mod, "AngleInterval");
82 py::classh<NormalizedAngleInterval> normalizedAngleInterval(mod, "NormalizedAngleInterval");
83 py::classh<Interval1d> interval1d(mod, "Interval1d");
84
85 py::classh<Box3d> box3d(mod, "Box3d");
86
87 py::classh<Region> region(mod, "Region");
88 py::classh<Box, Region> box(mod, "Box");
89 py::classh<Circle, Region> circle(mod, "Circle");
90 py::classh<ConvexPolygon, Region> convexPolygon(mod, "ConvexPolygon");
91 py::classh<Ellipse, Region> ellipse(mod,
92 "Ellipse");
93 py::classh<CompoundRegion, Region> compoundRegion(mod, "CompoundRegion");
94 py::classh<UnionRegion, CompoundRegion> unionRegion(mod, "UnionRegion");
95 py::classh<IntersectionRegion, CompoundRegion> intersectionRegion(mod, "IntersectionRegion");
96
97 py::classh<RangeSet> rangeSet(mod, "RangeSet");
98
99 py::classh<Pixelization> pixelization(mod, "Pixelization");
100 py::classh<HtmPixelization, Pixelization> htmPixelization(mod, "HtmPixelization");
101 py::classh<Mq3cPixelization, Pixelization> mq3cPixelization(mod, "Mq3cPixelization");
102 py::classh<Q3cPixelization, Pixelization> q3cPixelization(mod, "Q3cPixelization");
103
104 py::classh<Chunker> chunker(mod, "Chunker");
105
106 defineClass(angle);
107 defineClass(normalizedAngle);
108 defineClass(lonLat);
109 defineClass(vector3d);
110 defineClass(unitVector3d);
111 defineClass(matrix3d);
112
113 defineClass(angleInterval);
114 defineClass(normalizedAngleInterval);
115 defineClass(interval1d);
116
117 defineClass(box3d);
118
119 defineClass(region);
120 defineClass(box);
121 defineClass(circle);
122 defineClass(convexPolygon);
123 defineClass(ellipse);
124 defineClass(compoundRegion);
125 defineClass(unionRegion);
126 defineClass(intersectionRegion);
127
128 defineClass(rangeSet);
129
130 defineClass(pixelization);
131 defineClass(htmPixelization);
132 defineClass(mq3cPixelization);
133 defineClass(q3cPixelization);
134
135 defineClass(chunker);
136
137 // Define C++ functions.
138
139 defineCurve(mod);
142 defineUtils(mod);
143}
144
145} // <anonymous>
146} // sphgeom
147} // 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...
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(_gauss2d, m)
Definition pybind11.cc:31
void defineOrientation(py::module &mod)
void defineClass(Pybind11Class &cls)
void defineCurve(py::module &mod)
Definition _curve.cc:39
void defineRelationship(py::module &mod)
void defineUtils(py::module &)
Definition _utils.cc:44
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.