lsst.sphgeom gfb2c8f9998+d5e5a0f55b
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)
 
def envelope (self, Region region, int maxRanges=0)
 
def interior (self, Region region, int maxRanges=0)
 

Detailed Description

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

Member Function Documentation

◆ envelope()

def 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.

◆ 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.

◆ interior()

def 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.

◆ 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.

◆ 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.

◆ 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.


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