lsst.skymap gb9c20d2722+4386e1d82d
Loading...
Searching...
No Matches
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

 __init__ (self, numTracts, config=None, version=0)
 __reduce__ (self)
 __iter__ (self)
 __len__ (self)
 __getitem__ (self, index)
 generateTract (self, index)
Public Member Functions inherited from lsst.skymap.baseSkyMap.BaseSkyMap
 __init__ (self, config=None)
 findTract (self, coord)
 findTractIdArray (self, ra, dec, degrees=False)
 findTractPatchList (self, coordList)
 findClosestTractPatchList (self, coordList)
 findTractIdPatchIdArray (self, ra, dec, degrees=False)
 __getitem__ (self, ind)
 __iter__ (self)
 __len__ (self)
 __hash__ (self)
 __eq__ (self, other)
 __ne__ (self, other)
 logSkyMapInfo (self, log)
 getSha1 (self)
 updateSha1 (self, sha1)
 register (self, name, butler)

Protected Attributes

 _numTracts = numTracts
list _tractCache = [None] * self._numTracts
 _tractInfo = None
 _version = version
Protected Attributes inherited from lsst.skymap.baseSkyMap.BaseSkyMap
list _tractInfoList = []
 _wcsFactory
 _sha1 = None
 _tractBuilder = config.tractBuilder.apply()

Additional Inherited Members

Public Attributes inherited from lsst.skymap.baseSkyMap.BaseSkyMap
 config = config
Static Public Attributes inherited from lsst.skymap.baseSkyMap.BaseSkyMap
 ConfigClass = BaseSkyMapConfig
str SKYMAP_RUN_COLLECTION_NAME = "skymaps"
str SKYMAP_DATASET_TYPE_NAME = "skyMap"

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.

Member Function Documentation

◆ __getitem__()

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.

◆ __iter__()

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

◆ __len__()

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

◆ __reduce__()

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.

◆ generateTract()

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.


The documentation for this class was generated from the following file:
  • python/lsst/skymap/cachingSkyMap.py