lsst.skypix  13.0+129
Public Member Functions | Public Attributes | List of all members
lsst.skypix.quadsphere.QuadSpherePixelization Class Reference
Inheritance diagram for lsst.skypix.quadsphere.QuadSpherePixelization:

Public Member Functions

def __init__ (self, resolution, paddingRad)
 
def getGeometry (self, pixelId, fiducial=False)
 
def getCenter (self, pixelId)
 
def getNeighbors (self, pixelId)
 
def intersect (self, polygon)
 
def __len__ (self)
 
def __iter__ (self)
 
def __repr__ (self)
 
def pixel (self, theta, phi)
 
def id (self, root, x, y)
 
def coords (self, pixelId)
 

Public Attributes

 resolution
 
 padding
 
 center
 
 x
 
 y
 
 xrot
 
 yrot
 
 xplane
 
 yplane
 
 cornerNeighbors
 

Detailed Description

A quad-sphere based pixelization of the unit sphere. Each of the 6
root pixels are divided into an R by R grid of sky-pixels, where R
is the resolution (a positive integer). Sky-pixel identifiers are
contiguous integers in range [0, 6 * R**2), and are ordered such that
enumerating the pixels 0, 1, ..., 6 * R**2 results in a roughly spiral
traversal (from south to north pole) of the unit sphere. In particular,
iterating over pixels in this order guarantees that when arriving at
pixel P:

  - all pixels with id P' < P have been visited
  - all neighbors of pixels with id P' < P - 8R have been visited

Each pixel may optionally be expanded by a padding angle A, such that
points on the unit sphere outside of a pixel but within angular separation
A of the fiducial pixel boundaries are also considered to be part of that
pixel. Pixel (and padded pixel) edges are great circles on the unit
sphere.

This class provides methods for computing fiducial or padded geometric
representations of a sky-pixel - spherical convex polygons in both
cases. It also supports finding the list of sky-pixels intersecting
an input spherical convex polygon, as well as determining the neighbors
and center of a sky-pixel.

TODO: Right now, pixels are defined by a simple tangent plane projection
of each cube face onto the sphere, but pixel boundaries could be adjusted
to produce equal area pixels.

Definition at line 59 of file quadsphere.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.skypix.quadsphere.QuadSpherePixelization.__init__ (   self,
  resolution,
  paddingRad 
)
Creates a new quad-sphere sky pixelisation.

resolution: the number of pixels along the x and y axes of each root
    pixel.

paddingRad: the angular separation (rad) by which fiducial sky-pixels
    are to be padded.

Definition at line 89 of file quadsphere.py.

Member Function Documentation

◆ __iter__()

def lsst.skypix.quadsphere.QuadSpherePixelization.__iter__ (   self)
Returns an iterator over the sky-pixel ids of all the pixels
in this pixelization.

Definition at line 601 of file quadsphere.py.

◆ __len__()

def lsst.skypix.quadsphere.QuadSpherePixelization.__len__ (   self)
Returns the total number of sky-pixels in this pixelization.

Definition at line 596 of file quadsphere.py.

◆ __repr__()

def lsst.skypix.quadsphere.QuadSpherePixelization.__repr__ (   self)

Definition at line 607 of file quadsphere.py.

◆ coords()

def lsst.skypix.quadsphere.QuadSpherePixelization.coords (   self,
  pixelId 
)
Maps from a sky-pixel id to a root pixel number and x, y 
pixel coordinates.

Definition at line 679 of file quadsphere.py.

◆ getCenter()

def lsst.skypix.quadsphere.QuadSpherePixelization.getCenter (   self,
  pixelId 
)
Returns the center of a sky-pixel as a unit cartesian 3-vector.

Definition at line 433 of file quadsphere.py.

◆ getGeometry()

def lsst.skypix.quadsphere.QuadSpherePixelization.getGeometry (   self,
  pixelId,
  fiducial = False 
)
Returns a spherical convex polygon corresponding to the fiducial
or padded boundaries of the sky-pixel with the specified id.

Definition at line 387 of file quadsphere.py.

◆ getNeighbors()

def lsst.skypix.quadsphere.QuadSpherePixelization.getNeighbors (   self,
  pixelId 
)
Returns a list of ids for sky-pixels adjacent to specified pixel.

Definition at line 444 of file quadsphere.py.

◆ id()

def lsst.skypix.quadsphere.QuadSpherePixelization.id (   self,
  root,
  x,
  y 
)
Maps from a root pixel number and x, y pixel coordinates
to a sky-pixel id.

Definition at line 639 of file quadsphere.py.

◆ intersect()

def lsst.skypix.quadsphere.QuadSpherePixelization.intersect (   self,
  polygon 
)
Returns a list of ids for sky-pixels intersecting the given
polygon. Intersection is computed against padded sky-pixels.

Definition at line 573 of file quadsphere.py.

◆ pixel()

def lsst.skypix.quadsphere.QuadSpherePixelization.pixel (   self,
  theta,
  phi 
)
Maps from spherical coordinates (longitude and latitude
angles theta and phi, both in radians) to a sky-pixel id.

Definition at line 611 of file quadsphere.py.

Member Data Documentation

◆ center

lsst.skypix.quadsphere.QuadSpherePixelization.center

Definition at line 116 of file quadsphere.py.

◆ cornerNeighbors

lsst.skypix.quadsphere.QuadSpherePixelization.cornerNeighbors

Definition at line 174 of file quadsphere.py.

◆ padding

lsst.skypix.quadsphere.QuadSpherePixelization.padding

Definition at line 112 of file quadsphere.py.

◆ resolution

lsst.skypix.quadsphere.QuadSpherePixelization.resolution

Definition at line 111 of file quadsphere.py.

◆ x

lsst.skypix.quadsphere.QuadSpherePixelization.x

Definition at line 118 of file quadsphere.py.

◆ xplane

lsst.skypix.quadsphere.QuadSpherePixelization.xplane

Definition at line 126 of file quadsphere.py.

◆ xrot

lsst.skypix.quadsphere.QuadSpherePixelization.xrot

Definition at line 122 of file quadsphere.py.

◆ y

lsst.skypix.quadsphere.QuadSpherePixelization.y

Definition at line 120 of file quadsphere.py.

◆ yplane

lsst.skypix.quadsphere.QuadSpherePixelization.yplane

Definition at line 127 of file quadsphere.py.

◆ yrot

lsst.skypix.quadsphere.QuadSpherePixelization.yrot

Definition at line 124 of file quadsphere.py.


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