LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+0dd8ce4237,g1470d8bcf6+3ea6592b6f,g2079a07aa2+86d27d4dc4,g2305ad1205+5ca4c0b359,g295015adf3+d10818ec9d,g2a9a014e59+6f9be1b9cd,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+703ba97ebf,g487adcacf7+4fa16da234,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+ffa42b374e,g5a732f18d5+53520f316c,g64a986408d+0dd8ce4237,g858d7b2824+0dd8ce4237,g8a8a8dda67+585e252eca,g99cad8db69+d39438377f,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+f1d96605c8,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+e5339d463f,gc120e1dc64+da31e9920e,gc28159a63d+0e5473021a,gcf0d15dbbd+703ba97ebf,gdaeeff99f8+f9a426f77a,ge6526c86ff+889fc9d533,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf18bd8381d+7268b93478,gff1a9f87cc+0dd8ce4237,w.2024.16
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lsst.sphgeom.pixelization_abc.PixelizationABC Class Reference
Inheritance diagram for lsst.sphgeom.pixelization_abc.PixelizationABC:
lsst.sphgeom._healpixPixelization.HealpixPixelization

Public Member Functions

RangeSet universe (self)
 
Region pixel (self, i)
 
int index (self, UnitVector3d v)
 
str toString (self, int i)
 
 envelope (self, Region region, int maxRanges=0)
 
 interior (self, Region region, int maxRanges=0)
 

Detailed Description

Pixelization ABC class that should be a base for
Python implementations of pixelization.

Definition at line 34 of file pixelization_abc.py.

Member Function Documentation

◆ envelope()

lsst.sphgeom.pixelization_abc.PixelizationABC.envelope ( self,
Region region,
int maxRanges = 0 )
Return the indexes of the pixels intersecting the spherical region.

The ``maxRanges`` parameter can be used to limit both these costs -
setting it to a non-zero value sets a cap on the number of ranges
returned by this method. To meet this constraint, implementations are
allowed to return pixels that do not intersect the region along with
those, that do.
This allows two ranges [a, b) and [c, d), a < b < c < d, to be
merged into one range [a, d) (by adding in the pixels [b, c)). Since
simplification proceeds by adding pixels, the return value will always
be a superset of the intersecting pixels.

Parameters
----------
region : `lsst.sphgeom.Region`
maxRanges : `int`

Returns
-------
rangeSet : `lsst.sphgeom.RangeSet`

Reimplemented in lsst.sphgeom._healpixPixelization.HealpixPixelization.

Definition at line 106 of file pixelization_abc.py.

106 def envelope(self, region: Region, maxRanges: int = 0):
107 """Return the indexes of the pixels intersecting the spherical region.
108
109 The ``maxRanges`` parameter can be used to limit both these costs -
110 setting it to a non-zero value sets a cap on the number of ranges
111 returned by this method. To meet this constraint, implementations are
112 allowed to return pixels that do not intersect the region along with
113 those, that do.
114 This allows two ranges [a, b) and [c, d), a < b < c < d, to be
115 merged into one range [a, d) (by adding in the pixels [b, c)). Since
116 simplification proceeds by adding pixels, the return value will always
117 be a superset of the intersecting pixels.
118
119 Parameters
120 ----------
121 region : `lsst.sphgeom.Region`
122 maxRanges : `int`
123
124 Returns
125 -------
126 rangeSet : `lsst.sphgeom.RangeSet`
127 """
128 pass
129

◆ index()

int lsst.sphgeom.pixelization_abc.PixelizationABC.index ( self,
UnitVector3d v )
Compute the index of the pixel.

Parameters
----------
v : `lsst.sphgeom.UnitVector3d`

Returns
-------
i : `int`
    The index of the pixel.

Reimplemented in lsst.sphgeom._healpixPixelization.HealpixPixelization.

Definition at line 77 of file pixelization_abc.py.

77 def index(self, v: UnitVector3d) -> int:
78 """Compute the index of the pixel.
79
80 Parameters
81 ----------
82 v : `lsst.sphgeom.UnitVector3d`
83
84 Returns
85 -------
86 i : `int`
87 The index of the pixel.
88 """
89 pass
90

◆ interior()

lsst.sphgeom.pixelization_abc.PixelizationABC.interior ( self,
Region region,
int maxRanges = 0 )
Return the indexes of the pixels within the spherical region.

The ``maxRanges`` argument is analogous to the identically named
envelope() argument. The only difference is that implementations must
remove interior pixels to keep the number of ranges at or below the
maximum. The return value is therefore always a subset of the interior
pixels.

Parameters
----------
region : `lsst.sphgeom.Region`
maxRanges : `int`

Returns
-------
rangeSet : `lsst.sphgeom.RangeSet`

Reimplemented in lsst.sphgeom._healpixPixelization.HealpixPixelization.

Definition at line 131 of file pixelization_abc.py.

131 def interior(self, region: Region, maxRanges: int = 0):
132 """Return the indexes of the pixels within the spherical region.
133
134 The ``maxRanges`` argument is analogous to the identically named
135 envelope() argument. The only difference is that implementations must
136 remove interior pixels to keep the number of ranges at or below the
137 maximum. The return value is therefore always a subset of the interior
138 pixels.
139
140 Parameters
141 ----------
142 region : `lsst.sphgeom.Region`
143 maxRanges : `int`
144
145 Returns
146 -------
147 rangeSet : `lsst.sphgeom.RangeSet`
148 """
149 pass

◆ pixel()

Region lsst.sphgeom.pixelization_abc.PixelizationABC.pixel ( self,
i )
Return the spherical region corresponding to the pixel index ``i``.

This region will contain all unit vectors v with ``index(v) == i``.
But it may also contain points with index not equal to ``i``.
To see why, consider a point that lies on the edge of a polygonal
pixel - it is inside the polygons for both pixels sharing the edge,
but must be assigned to exactly one pixel by the pixelization.

Parameters
----------
i : `int`
    Pixel index.

Returns
-------
region : `lsst.sphgeom.Region`
    The spherical region corresponding to the pixel with index ``i``

Raises
------
`InvalidArgumentException`
    Raised if ``i`` is not a valid pixel index.

Reimplemented in lsst.sphgeom._healpixPixelization.HealpixPixelization.

Definition at line 50 of file pixelization_abc.py.

50 def pixel(self, i) -> Region:
51 """Return the spherical region corresponding to the pixel index ``i``.
52
53 This region will contain all unit vectors v with ``index(v) == i``.
54 But it may also contain points with index not equal to ``i``.
55 To see why, consider a point that lies on the edge of a polygonal
56 pixel - it is inside the polygons for both pixels sharing the edge,
57 but must be assigned to exactly one pixel by the pixelization.
58
59 Parameters
60 ----------
61 i : `int`
62 Pixel index.
63
64 Returns
65 -------
66 region : `lsst.sphgeom.Region`
67 The spherical region corresponding to the pixel with index ``i``
68
69 Raises
70 ------
71 `InvalidArgumentException`
72 Raised if ``i`` is not a valid pixel index.
73 """
74 pass
75
table::PointKey< int > pixel

◆ toString()

str lsst.sphgeom.pixelization_abc.PixelizationABC.toString ( self,
int i )
Convert the given pixel index to a human-readable string.

Parameters
----------
i : `int`

Returns
-------
s : `str`

Reimplemented in lsst.sphgeom._healpixPixelization.HealpixPixelization.

Definition at line 92 of file pixelization_abc.py.

92 def toString(self, i: int) -> str:
93 """Convert the given pixel index to a human-readable string.
94
95 Parameters
96 ----------
97 i : `int`
98
99 Returns
100 -------
101 s : `str`
102 """
103 pass
104

◆ universe()

RangeSet lsst.sphgeom.pixelization_abc.PixelizationABC.universe ( self)
Return the set of all pixel indexes for this pixelization.

Returns
-------
rangeSet : `lsst.sphgeom.RangeSet`

Reimplemented in lsst.sphgeom._healpixPixelization.HealpixPixelization.

Definition at line 40 of file pixelization_abc.py.

40 def universe(self) -> RangeSet:
41 """Return the set of all pixel indexes for this pixelization.
42
43 Returns
44 -------
45 rangeSet : `lsst.sphgeom.RangeSet`
46 """
47 pass
48

The documentation for this class was generated from the following file: