lsst.skymap g91c88c04ca+d5eb08ceff
Loading...
Searching...
No Matches
lsst.skymap.tractInfo.ExplicitTractInfo Class Reference
Inheritance diagram for lsst.skymap.tractInfo.ExplicitTractInfo:
lsst.skymap.tractInfo.TractInfo

Public Member Functions

 __init__ (self, id, tractBuilder, ctrCoord, radius, tractOverlap, wcs, innerBoxCorners=None)
 
 getSequentialPatchIndex (self, patchInfo)
 
 getSequentialPatchIndexFromPair (self, index)
 
 getPatchIndexPair (self, sequentialIndex)
 
 findPatch (self, coord)
 
 findPatchList (self, coordList)
 
 getBBox (self)
 
 getCtrCoord (self)
 
 getId (self)
 
 getNumPatches (self)
 
 getPatchBorder (self)
 
 getPatchInfo (self, index)
 
 getPatchInnerDimensions (self)
 
 getTractOverlap (self)
 
 getVertexList (self)
 
 getInnerSkyPolygon (self)
 
 getInnerSkyRegion (self)
 
 getOuterSkyPolygon (self)
 
 getWcs (self)
 
 __str__ (self)
 
 __repr__ (self)
 
 __iter__ (self)
 
 __len__ (self)
 
 __getitem__ (self, index)
 
 contains (self, coord)
 

Protected Member Functions

 _minimumBoundingBox (self, wcs)
 
 _finalOrientation (self, bbox, wcs)
 

Protected Attributes

 _radius = radius
 
 _id = id
 
 _ctrCoord = ctrCoord
 
 _vertexCoordList = tuple(vertexCoordList)
 
int _tractOverlap = tractOverlap
 
 _tractBuilder = tractBuilder
 
 _innerBoxCorners = innerBoxCorners
 
 _numPatches = self._tractBuilder.setupPatches(minBBox, wcs)
 
 _bbox
 
 _wcs = self._finalOrientation(initialBBox, wcs)
 

Properties

 bbox = property(getBBox)
 
 ctr_coord = property(getCtrCoord)
 
 tract_id = property(getId)
 
 num_patches = property(getNumPatches)
 
 patch_border = property(getPatchBorder)
 
 patch_inner_dimensions = property(getPatchInnerDimensions)
 
 tract_overlap = property(getTractOverlap)
 
 vertex_list = property(getVertexList)
 
 inner_sky_polygon = property(getInnerSkyPolygon)
 
 inner_sky_region = property(getInnerSkyRegion)
 
 outer_sky_polygon = property(getOuterSkyPolygon)
 
 wcs = property(getWcs)
 

Detailed Description

Information for a tract specified explicitly.

A tract is placed at the explicitly defined coordinates, with the nominated
radius.  The tracts are square (i.e., the radius is really a half-size).

Parameters
----------
id : : `int`
    tract ID
tractBuilder : Subclass of `lsst.skymap.BaseTractBuilder`
    Object used to compute patch geometry.
ctrCoord : `lsst.geom.SpherePoint`
    ICRS sky coordinate of center of inner region of tract; also used as
    the CRVAL for the WCS.
radius : `lsst.geom.Angle`
    Radius of the tract.
tractOverlap : `lsst.geom.Angle`
    Minimum overlap between adjacent sky tracts; this defines the minimum
    distance the tract extends beyond the inner region in all directions.
wcs : `lsst.afw.image.SkyWcs`
    WCS for tract. The reference pixel will be shifted as required so that
    the lower left-hand pixel (index 0,0) has pixel position 0.0, 0.0.
innerBoxCorners : `list` [`lsst.sphgeom.LonLat`], optional
    If set then the ``inner_sky_region`` will be a `lsst.sphgeom.Box` with
    these corners as oppsed to a `lsst.sphgeom.ConvexPolygon` built from
    the ``vertex_list``.

Definition at line 431 of file tractInfo.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.skymap.tractInfo.ExplicitTractInfo.__init__ ( self,
id,
tractBuilder,
ctrCoord,
radius,
tractOverlap,
wcs,
innerBoxCorners = None )

Definition at line 459 of file tractInfo.py.

Member Function Documentation

◆ __getitem__()

lsst.skymap.tractInfo.TractInfo.__getitem__ ( self,
index )
inherited

Definition at line 415 of file tractInfo.py.

◆ __iter__()

lsst.skymap.tractInfo.TractInfo.__iter__ ( self)
inherited

Definition at line 405 of file tractInfo.py.

◆ __len__()

lsst.skymap.tractInfo.TractInfo.__len__ ( self)
inherited

Definition at line 411 of file tractInfo.py.

◆ __repr__()

lsst.skymap.tractInfo.TractInfo.__repr__ ( self)
inherited

Definition at line 402 of file tractInfo.py.

◆ __str__()

lsst.skymap.tractInfo.TractInfo.__str__ ( self)
inherited

Definition at line 399 of file tractInfo.py.

◆ _finalOrientation()

lsst.skymap.tractInfo.TractInfo._finalOrientation ( self,
bbox,
wcs )
protectedinherited
Determine the final orientation

We offset everything so the lower-left corner is at 0,0
and compute the final Wcs.

Parameters
----------
bbox : `lsst.geom.Box2I`
    Current bounding box.
wcs : `lsst.afw.geom.SkyWcs
    Current Wcs.

Returns
-------
finalBBox : `lsst.geom.Box2I`
    Revised bounding box.
wcs : `lsst.afw.geom.SkyWcs`
    Revised Wcs.

Definition at line 123 of file tractInfo.py.

◆ _minimumBoundingBox()

lsst.skymap.tractInfo.ExplicitTractInfo._minimumBoundingBox ( self,
wcs )
protected
Calculate the minimum bounding box for the tract, given the WCS, and
the nominated radius.

Reimplemented from lsst.skymap.tractInfo.TractInfo.

Definition at line 479 of file tractInfo.py.

◆ contains()

lsst.skymap.tractInfo.TractInfo.contains ( self,
coord )
inherited
Does this tract contain the coordinate?

Definition at line 418 of file tractInfo.py.

◆ findPatch()

lsst.skymap.tractInfo.TractInfo.findPatch ( self,
coord )
inherited
Find the patch containing the specified coord.

Parameters
----------
coord : `lsst.geom.SpherePoint`
    ICRS sky coordinate to search for.

Returns
-------
result : `lsst.skymap.PatchInfo`
    PatchInfo of patch whose inner bbox contains the specified coord

Raises
------
LookupError
    Raised if coord is not in tract or we cannot determine the
    pixel coordinate (which likely means the coord is off the tract).

Definition at line 192 of file tractInfo.py.

◆ findPatchList()

lsst.skymap.tractInfo.TractInfo.findPatchList ( self,
coordList )
inherited
Find patches containing the specified list of coords.

Parameters
----------
coordList : `list` of `lsst.geom.SpherePoint`
    ICRS sky coordinates to search for.

Returns
-------
result : `list` of `lsst.skymap.PatchInfo`
    List of PatchInfo for patches that contain, or may contain, the
    specified region. The list will be empty if there is no overlap.

Notes
-----
**Warning:**

- This may give incorrect answers on regions that are larger than a
  tract.

- This uses a naive algorithm that may find some patches that do not
  overlap the region (especially if the region is not a rectangle
  aligned along patch x,y).

Definition at line 224 of file tractInfo.py.

◆ getBBox()

lsst.skymap.tractInfo.TractInfo.getBBox ( self)
inherited
Get bounding box of tract (as an geom.Box2I)

Definition at line 270 of file tractInfo.py.

◆ getCtrCoord()

lsst.skymap.tractInfo.TractInfo.getCtrCoord ( self)
inherited
Get ICRS sky coordinate of center of tract
(as an lsst.geom.SpherePoint)

Definition at line 277 of file tractInfo.py.

◆ getId()

lsst.skymap.tractInfo.TractInfo.getId ( self)
inherited
Get ID of tract

Definition at line 285 of file tractInfo.py.

◆ getInnerSkyPolygon()

lsst.skymap.tractInfo.TractInfo.getInnerSkyPolygon ( self)
inherited
Get inner on-sky region as a sphgeom.ConvexPolygon.

Definition at line 361 of file tractInfo.py.

◆ getInnerSkyRegion()

lsst.skymap.tractInfo.TractInfo.getInnerSkyRegion ( self)
inherited
Get inner on-sky region.

Definition at line 369 of file tractInfo.py.

◆ getNumPatches()

lsst.skymap.tractInfo.TractInfo.getNumPatches ( self)
inherited
Get the number of patches in x, y.

Returns
-------
result : `lsst.skymap.Index2D`
    The number of patches in x, y

Definition at line 292 of file tractInfo.py.

◆ getOuterSkyPolygon()

lsst.skymap.tractInfo.TractInfo.getOuterSkyPolygon ( self)
inherited
Get outer on-sky region as a sphgeom.ConvexPolygon

Definition at line 380 of file tractInfo.py.

◆ getPatchBorder()

lsst.skymap.tractInfo.TractInfo.getPatchBorder ( self)
inherited

Definition at line 304 of file tractInfo.py.

◆ getPatchIndexPair()

lsst.skymap.tractInfo.TractInfo.getPatchIndexPair ( self,
sequentialIndex )
inherited
Convert sequential index into patch index (x,y) pair.

Parameters
----------
sequentialIndex : `int`

Returns
-------
x, y : `lsst.skymap.Index2D`

Definition at line 179 of file tractInfo.py.

◆ getPatchInfo()

lsst.skymap.tractInfo.TractInfo.getPatchInfo ( self,
index )
inherited
Return information for the specified patch.

Parameters
----------
index : `typing.NamedTuple` ['x': `int`, 'y': `int`]
    Index of patch, as a pair of ints;
    or a sequential index as returned by getSequentialPatchIndex;
    negative values are not supported.

Returns
-------
result : `lsst.skymap.PatchInfo`
    The patch info for that index.

Raises
------
IndexError
    Raised if index is out of range.

Definition at line 309 of file tractInfo.py.

◆ getPatchInnerDimensions()

lsst.skymap.tractInfo.TractInfo.getPatchInnerDimensions ( self)
inherited
Get dimensions of inner region of the patches (all are the same)

Definition at line 331 of file tractInfo.py.

◆ getSequentialPatchIndex()

lsst.skymap.tractInfo.TractInfo.getSequentialPatchIndex ( self,
patchInfo )
inherited
Return a single integer that uniquely identifies
the given patch within this tract.

Parameters
----------
patchInfo : `lsst.skymap.PatchInfo`

Returns
-------
sequentialIndex : `int`

Definition at line 151 of file tractInfo.py.

◆ getSequentialPatchIndexFromPair()

lsst.skymap.tractInfo.TractInfo.getSequentialPatchIndexFromPair ( self,
index )
inherited
Return a single integer that uniquely identifies
the patch index within the tract.

Parameters
----------
index : `lsst.skymap.Index2D`

Returns
-------
sequentialIndex : `int`

Definition at line 165 of file tractInfo.py.

◆ getTractOverlap()

lsst.skymap.tractInfo.TractInfo.getTractOverlap ( self)
inherited
Get minimum overlap of adjacent sky tracts.

Definition at line 338 of file tractInfo.py.

◆ getVertexList()

lsst.skymap.tractInfo.TractInfo.getVertexList ( self)
inherited
Get list of ICRS sky coordinates of vertices that define the
boundary of the inner region.

Notes
-----
**warning:** this is not a deep copy.

Definition at line 345 of file tractInfo.py.

◆ getWcs()

lsst.skymap.tractInfo.TractInfo.getWcs ( self)
inherited
Get WCS of tract.

Returns
-------
wcs : `lsst.afw.geom.SkyWcs`
    The WCS of this tract

Definition at line 387 of file tractInfo.py.

Member Data Documentation

◆ _bbox

lsst.skymap.tractInfo.TractInfo._bbox
protectedinherited

Definition at line 97 of file tractInfo.py.

◆ _ctrCoord

lsst.skymap.tractInfo.TractInfo._ctrCoord = ctrCoord
protectedinherited

Definition at line 89 of file tractInfo.py.

◆ _id

lsst.skymap.tractInfo.TractInfo._id = id
protectedinherited

Definition at line 88 of file tractInfo.py.

◆ _innerBoxCorners

lsst.skymap.tractInfo.TractInfo._innerBoxCorners = innerBoxCorners
protectedinherited

Definition at line 93 of file tractInfo.py.

◆ _numPatches

lsst.skymap.tractInfo.TractInfo._numPatches = self._tractBuilder.setupPatches(minBBox, wcs)
protectedinherited

Definition at line 96 of file tractInfo.py.

◆ _radius

lsst.skymap.tractInfo.ExplicitTractInfo._radius = radius
protected

Definition at line 463 of file tractInfo.py.

◆ _tractBuilder

lsst.skymap.tractInfo.TractInfo._tractBuilder = tractBuilder
protectedinherited

Definition at line 92 of file tractInfo.py.

◆ _tractOverlap

int lsst.skymap.tractInfo.TractInfo._tractOverlap = tractOverlap
protectedinherited

Definition at line 91 of file tractInfo.py.

◆ _vertexCoordList

lsst.skymap.tractInfo.TractInfo._vertexCoordList = tuple(vertexCoordList)
protectedinherited

Definition at line 90 of file tractInfo.py.

◆ _wcs

lsst.skymap.tractInfo.TractInfo._wcs = self._finalOrientation(initialBBox, wcs)
protectedinherited

Definition at line 97 of file tractInfo.py.

Property Documentation

◆ bbox

lsst.skymap.tractInfo.TractInfo.bbox = property(getBBox)
staticinherited

Definition at line 275 of file tractInfo.py.

◆ ctr_coord

lsst.skymap.tractInfo.TractInfo.ctr_coord = property(getCtrCoord)
staticinherited

Definition at line 283 of file tractInfo.py.

◆ inner_sky_polygon

lsst.skymap.tractInfo.TractInfo.inner_sky_polygon = property(getInnerSkyPolygon)
staticinherited

Definition at line 367 of file tractInfo.py.

◆ inner_sky_region

lsst.skymap.tractInfo.TractInfo.inner_sky_region = property(getInnerSkyRegion)
staticinherited

Definition at line 378 of file tractInfo.py.

◆ num_patches

lsst.skymap.tractInfo.TractInfo.num_patches = property(getNumPatches)
staticinherited

Definition at line 302 of file tractInfo.py.

◆ outer_sky_polygon

lsst.skymap.tractInfo.TractInfo.outer_sky_polygon = property(getOuterSkyPolygon)
staticinherited

Definition at line 385 of file tractInfo.py.

◆ patch_border

lsst.skymap.tractInfo.TractInfo.patch_border = property(getPatchBorder)
staticinherited

Definition at line 307 of file tractInfo.py.

◆ patch_inner_dimensions

lsst.skymap.tractInfo.TractInfo.patch_inner_dimensions = property(getPatchInnerDimensions)
staticinherited

Definition at line 336 of file tractInfo.py.

◆ tract_id

lsst.skymap.tractInfo.TractInfo.tract_id = property(getId)
staticinherited

Definition at line 290 of file tractInfo.py.

◆ tract_overlap

lsst.skymap.tractInfo.TractInfo.tract_overlap = property(getTractOverlap)
staticinherited

Definition at line 343 of file tractInfo.py.

◆ vertex_list

lsst.skymap.tractInfo.TractInfo.vertex_list = property(getVertexList)
staticinherited

Definition at line 355 of file tractInfo.py.

◆ wcs

lsst.skymap.tractInfo.TractInfo.wcs = property(getWcs)
staticinherited

Definition at line 397 of file tractInfo.py.


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