LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | List of all members
lsst.skymap.dodecaSkyMap.DodecaSkyMap Class Reference
Inheritance diagram for lsst.skymap.dodecaSkyMap.DodecaSkyMap:

Public Member Functions

def __init__
 
def __getstate__
 
def __setstate__
 
def findTract
 
def getVersion
 
def getWithTractsOnPoles
 

Static Public Attributes

 ConfigClass = DodecaSkyMapConfig
 

Private Attributes

 _dodecahedron
 

Static Private Attributes

tuple _version = (1, 0)
 

Detailed Description

Dodecahedron-based sky map pixelization.
    
DodecaSkyMap divides the sky into 12 overlapping Tracts arranged as the faces of a dodecahedron.

Definition at line 47 of file dodecaSkyMap.py.

Constructor & Destructor Documentation

def lsst.skymap.dodecaSkyMap.DodecaSkyMap.__init__ (   self,
  config = None 
)
Construct a DodecaSkyMap

@param[in] config: an instance of self.ConfigClass; if None the default config is used

Definition at line 55 of file dodecaSkyMap.py.

55 
56  def __init__(self, config=None):
57  """Construct a DodecaSkyMap
58 
59  @param[in] config: an instance of self.ConfigClass; if None the default config is used
60  """
61  BaseSkyMap.__init__(self, config)
62  self._dodecahedron = detail.Dodecahedron(withFacesOnPoles = self.config.withTractsOnPoles)
63 
64  tractOverlap = afwGeom.Angle(self.config.tractOverlap, afwGeom.degrees)
65 
66  for id in range(12):
67  tractVec = self._dodecahedron.getFaceCtr(id)
68  tractCoord = detail.coordFromVec(tractVec, defRA=afwGeom.Angle(0))
69  tractRA = tractCoord.getLongitude()
70  vertexVecList = self._dodecahedron.getVertices(id)
71 
72  # make initial WCS; don't worry about crPixPos because TractInfo will shift it as required
73  wcs = self._wcsFactory.makeWcs(crPixPos=afwGeom.Point2D(0,0), crValCoord=tractCoord)
74 
75  self._tractInfoList.append(
76  TractInfo(
77  id = id,
78  patchInnerDimensions = self.config.patchInnerDimensions,
79  patchBorder = self.config.patchBorder,
80  ctrCoord = tractCoord,
81  vertexCoordList = [detail.coordFromVec(vec, defRA=tractRA) for vec in vertexVecList],
82  tractOverlap = tractOverlap,
83  wcs = wcs,
84  )
85  )

Member Function Documentation

def lsst.skymap.dodecaSkyMap.DodecaSkyMap.__getstate__ (   self)
Support pickle

@return a dict containing:
- version: a pair of ints
- config: the config

Definition at line 86 of file dodecaSkyMap.py.

86 
87  def __getstate__(self):
88  """Support pickle
89 
90  @return a dict containing:
91  - version: a pair of ints
92  - config: the config
93  """
94  return dict(
95  version = self._version,
96  config = self.config,
97  )
def lsst.skymap.dodecaSkyMap.DodecaSkyMap.__setstate__ (   self,
  stateDict 
)
Support unpickle

@param[in] stateDict: a dict containing:
- version: a pair of ints
- config: the config

Definition at line 98 of file dodecaSkyMap.py.

98 
99  def __setstate__(self, stateDict):
100  """Support unpickle
101 
102  @param[in] stateDict: a dict containing:
103  - version: a pair of ints
104  - config: the config
105  """
106  version = stateDict["version"]
107  if version >= (2, 0):
108  raise runtimeError("Version = %s >= (2,0); cannot unpickle" % (version,))
109  self.__init__(stateDict["config"])
def lsst.skymap.dodecaSkyMap.DodecaSkyMap.findTract (   self,
  coord 
)
Find the tract whose inner region includes the coord.

@param[in] coord: sky coordinate (afwCoord.Coord)
@return TractInfo for tract whose inner region includes the coord.

@note This routine will be more efficient if coord is ICRS.

Definition at line 110 of file dodecaSkyMap.py.

111  def findTract(self, coord):
112  """Find the tract whose inner region includes the coord.
113 
114  @param[in] coord: sky coordinate (afwCoord.Coord)
115  @return TractInfo for tract whose inner region includes the coord.
116 
117  @note This routine will be more efficient if coord is ICRS.
118  """
119  return self[self._dodecahedron.getFaceInd(coord.toIcrs().getVector())]
def lsst.skymap.dodecaSkyMap.DodecaSkyMap.getVersion (   self)
Return version (e.g. for pickle)

@return version as a pair of integers

Definition at line 120 of file dodecaSkyMap.py.

121  def getVersion(self):
122  """Return version (e.g. for pickle)
123 
124  @return version as a pair of integers
125  """
126  return self._version
def lsst.skymap.dodecaSkyMap.DodecaSkyMap.getWithTractsOnPoles (   self)
Return withTractsOnPoles parameter

@return withTractsOnPoles as a bool

Definition at line 127 of file dodecaSkyMap.py.

128  def getWithTractsOnPoles(self):
129  """Return withTractsOnPoles parameter
130 
131  @return withTractsOnPoles as a bool
132  """
133  return self._dodecahedron.getWithFacesOnPoles()

Member Data Documentation

lsst.skymap.dodecaSkyMap.DodecaSkyMap._dodecahedron
private

Definition at line 61 of file dodecaSkyMap.py.

tuple lsst.skymap.dodecaSkyMap.DodecaSkyMap._version = (1, 0)
staticprivate

Definition at line 53 of file dodecaSkyMap.py.

lsst.skymap.dodecaSkyMap.DodecaSkyMap.ConfigClass = DodecaSkyMapConfig
static

Definition at line 52 of file dodecaSkyMap.py.


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