lsst.sphgeom gbd998247f1+585e252eca
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
lsst.sphgeom._healpixPixelization.HealpixPixelization Class Reference
Inheritance diagram for lsst.sphgeom._healpixPixelization.HealpixPixelization:
lsst.sphgeom.pixelization_abc.PixelizationABC

Public Member Functions

 __init__ (self, int level)
 
 nside (self)
 
 getLevel (self)
 
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)
 
 __eq__ (self, other)
 
 __repr__ (self)
 
 __reduce__ (self)
 

Static Public Attributes

int MAX_LEVEL = 17
 

Protected Member Functions

 _interior_pixels_from_region (self, int nside, Region region)
 

Protected Attributes

 _level
 
 _nside
 
 _npix
 
 _bit_shift
 
 _nside_highres
 

Properties

 level = property(getLevel)
 

Detailed Description

HEALPix pixelization class.

Parameters
----------
level : `int`
    Pixelization level.  HEALPix nside = 2**level

Member Function Documentation

◆ _interior_pixels_from_region()

lsst.sphgeom._healpixPixelization.HealpixPixelization._interior_pixels_from_region ( self,
int nside,
Region region )
protected
Get interior pixels from a region.

Parameters
----------
nside : `int`
    Healpix nside to retrieve interior pixels.
region : `lsst.sphgeom.Region`
    Sphgeom region to find interior pixels.

Returns
-------
pixels : `np.ndarray`
    Array of pixels at resolution nside, nest ordering.

◆ envelope()

lsst.sphgeom._healpixPixelization.HealpixPixelization.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 from lsst.sphgeom.pixelization_abc.PixelizationABC.

◆ index()

int lsst.sphgeom._healpixPixelization.HealpixPixelization.index ( self,
UnitVector3d v )
Compute the index of the pixel.

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

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

Reimplemented from lsst.sphgeom.pixelization_abc.PixelizationABC.

◆ interior()

lsst.sphgeom._healpixPixelization.HealpixPixelization.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 from lsst.sphgeom.pixelization_abc.PixelizationABC.

◆ pixel()

Region lsst.sphgeom._healpixPixelization.HealpixPixelization.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 from lsst.sphgeom.pixelization_abc.PixelizationABC.

◆ toString()

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

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

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

Reimplemented from lsst.sphgeom.pixelization_abc.PixelizationABC.

◆ universe()

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

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

Reimplemented from lsst.sphgeom.pixelization_abc.PixelizationABC.


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