lsst.skymap gd8df4e7cf5+8bbd5e0058
Public Member Functions | List of all members
lsst.skymap.cachingSkyMap.CachingSkyMap Class Reference
Inheritance diagram for lsst.skymap.cachingSkyMap.CachingSkyMap:
lsst.skymap.baseSkyMap.BaseSkyMap lsst.skymap.discreteSkyMap.DiscreteSkyMap lsst.skymap.healpixSkyMap.HealpixSkyMap lsst.skymap.ringsSkyMap.RingsSkyMap

Public Member Functions

def __init__ (self, numTracts, config=None, version=0)
 
def __reduce__ (self)
 
def __iter__ (self)
 
def __len__ (self)
 
def __getitem__ (self, index)
 
def generateTract (self, index)
 

Detailed Description

A SkyMap that generates its tracts on request and caches them.

Parameters
----------
numTracts : `int`
    Number of tracts to create.
config : `lsst.skymap.BaseSkyMapConfig` (optional)
    The configuration for this SkyMap; if None use the default config.
version : `int` or `tuple` of `int` (optional)
    Software version of this class, to retain compatibility with old
    instances.

Notes
-----
A subclass should define
* __init__ to calculate the required number of tracts (and pass it up)
* generateTract to generate a tract

Subclassers should also check that the arguments to the constructor are
consistent with the below __reduce__ method.

Definition at line 28 of file cachingSkyMap.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.skymap.cachingSkyMap.CachingSkyMap.__init__ (   self,
  numTracts,
  config = None,
  version = 0 
)

Member Function Documentation

◆ __getitem__()

def lsst.skymap.cachingSkyMap.CachingSkyMap.__getitem__ (   self,
  index 
)
Get the TractInfo for a particular index.

The tract is returned from a cache, if available, otherwise generated
on the fly.

Reimplemented from lsst.skymap.baseSkyMap.BaseSkyMap.

Definition at line 80 of file cachingSkyMap.py.

◆ __iter__()

def lsst.skymap.cachingSkyMap.CachingSkyMap.__iter__ (   self)
Iterator over tracts.

Reimplemented from lsst.skymap.baseSkyMap.BaseSkyMap.

Definition at line 71 of file cachingSkyMap.py.

◆ __len__()

def lsst.skymap.cachingSkyMap.CachingSkyMap.__len__ (   self)
Length is number of tracts.

Reimplemented from lsst.skymap.baseSkyMap.BaseSkyMap.

Definition at line 76 of file cachingSkyMap.py.

◆ __reduce__()

def lsst.skymap.cachingSkyMap.CachingSkyMap.__reduce__ (   self)
To support pickling.

Notes
-----
**Warning:** This method assumes that the constructor is be defined:
    __init__(self, config, version=defaultVersion)
The use of 'config' is effectively set by the registry mechanism.
If additional optional arguments are added, this method should be
overridden to correspond.

Definition at line 58 of file cachingSkyMap.py.

◆ generateTract()

def lsst.skymap.cachingSkyMap.CachingSkyMap.generateTract (   self,
  index 
)
Generate TractInfo for the specified tract index.

Reimplemented in lsst.skymap.discreteSkyMap.DiscreteSkyMap, lsst.skymap.healpixSkyMap.HealpixSkyMap, and lsst.skymap.ringsSkyMap.RingsSkyMap.

Definition at line 94 of file cachingSkyMap.py.


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