lsst.skymap gb9c20d2722+4386e1d82d
Loading...
Searching...
No Matches
lsst.skymap.patchInfo.PatchInfo Class Reference

Public Member Functions

 __init__ (self, index, innerBBox, outerBBox, sequentialIndex, tractWcs, cellInnerDimensions=(0, 0), cellBorder=0, numCellsPerPatchInner=0, numCellsInPatchBorder=0)
 getIndex (self)
 getSequentialIndex (self)
 getWcs (self)
 getInnerBBox (self)
 getOuterBBox (self)
 getInnerSkyPolygon (self, tractWcs=None)
 inner_sky_polygon (self)
 getOuterSkyPolygon (self, tractWcs=None)
 outer_sky_polygon (self)
 getNumCells (self)
 getCellBorder (self)
 getCellInfo (self, index)
 getCellInnerDimensions (self)
 getSequentialCellIndex (self, cellInfo)
 getSequentialCellIndexFromPair (self, index)
 getCellIndexPair (self, sequentialIndex)
 __iter__ (self)
 __len__ (self)
 __getitem__ (self, index)
 __eq__ (self, rhs)
 __ne__ (self, rhs)
 __str__ (self)
 __repr__ (self)

Protected Attributes

 _index = index
 _sequentialIndex = sequentialIndex
 _innerBBox = innerBBox
 _outerBBox = outerBBox
 _wcs = tractWcs
 _cellInnerDimensions = Extent2I(*cellInnerDimensions)
 _cellBorder = cellBorder
 _numCellsInPatchBorder = numCellsInPatchBorder
 _numCells = Index2D(x=0, y=0)

Properties

 index = property(getIndex)
 sequential_index = property(getSequentialIndex)
 wcs = property(getWcs)
 inner_bbox = property(getInnerBBox)
 outer_bbox = property(getOuterBBox)
 num_cells = property(getNumCells)
 cell_border = property(getCellBorder)
 cell_inner_dimensions = property(getCellInnerDimensions)

Detailed Description

Information about a patch within a tract of a sky map.

If cellInnerDimensions and cellBorder are set then the patch
will be gridded with cells.

See `TractInfo` for more information.

Parameters
----------
index : `lsst.skymap.Index2D`
    x,y index of patch (a pair of ints)
innerBBox : `lsst.geom.Box2I`
    inner bounding box
outerBBox : `lsst.geom.Box2I`
    inner bounding box
sequentialIndex : `int`
    Patch sequential index
tractWcs : `lsst.afw.geom.SkyWcs`
    Tract WCS object.
cellInnerDimensions : `~collections.abc.Iterable` of 2 `int` or \
        `lsst.geom.Extent2I`, optional
    Inner dimensions of each cell (x,y pixels).
cellBorder : `int`, optional
    Cell border size (pixels).
numCellsPerPatchInner : `int`, optional
    Number of cells per inner patch region.
numCellsInPatchBorder : `int`, optional
    Number of cells in the patch border.

Member Function Documentation

◆ getCellIndexPair()

lsst.skymap.patchInfo.PatchInfo.getCellIndexPair ( self,
sequentialIndex )
Convert a sequential index into an index pair.

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

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

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

◆ getCellInfo()

lsst.skymap.patchInfo.PatchInfo.getCellInfo ( self,
index )
Return information for the specified cell.

Parameters
----------
index : `lsst.skymap.Index2D` or `~collections.abc.Iterable` of 2 `int`
    Index of cell, as `Index2D` ,or two integers,
    or a sequential index as returned by getSequentialCellIndex;
    negative values are not supported.

Returns
-------
result : `lsst.skymap.CellInfo`
    The cell info for that index.

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

◆ getCellInnerDimensions()

lsst.skymap.patchInfo.PatchInfo.getCellInnerDimensions ( self)
Get dimensions of inner region of the cells (all are the same)

◆ getIndex()

lsst.skymap.patchInfo.PatchInfo.getIndex ( self)
Return patch index: a tuple of (x, y)

Returns
-------
result : `lsst.skymap.Index2D`
    Patch index (x, y).

◆ getInnerBBox()

lsst.skymap.patchInfo.PatchInfo.getInnerBBox ( self)
Get inner bounding box.

Returns
-------
bbox : `lsst.geom.Box2I`
    The inner bounding Box.

◆ getInnerSkyPolygon()

lsst.skymap.patchInfo.PatchInfo.getInnerSkyPolygon ( self,
tractWcs = None )
Get the inner on-sky region.

Parameters
----------
tractWcs : `lsst.afw.image.SkyWcs`, optional
    WCS for the associated tract.

Returns
-------
result : `lsst.sphgeom.ConvexPolygon`
    The inner sky region.

◆ getNumCells()

lsst.skymap.patchInfo.PatchInfo.getNumCells ( self)
Get the number of cells in x, y.

May return (0, 0) if no cells are defined.

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

◆ getOuterBBox()

lsst.skymap.patchInfo.PatchInfo.getOuterBBox ( self)
Get outer bounding box.

Returns
-------
bbox : `lsst.geom.Box2I`
    The outer bounding Box.

◆ getOuterSkyPolygon()

lsst.skymap.patchInfo.PatchInfo.getOuterSkyPolygon ( self,
tractWcs = None )
Get the outer on-sky region.

Parameters
----------
tractWcs : `lsst.afw.image.SkyWcs`, optional
    WCS for the associated tract.

Returns
-------
result : `lsst.sphgeom.ConvexPolygon`
    The outer sky region.

◆ getSequentialCellIndex()

lsst.skymap.patchInfo.PatchInfo.getSequentialCellIndex ( self,
cellInfo )
Return a single integer that uniquely identifies
the given cell within this patch.

Parameters
----------
cellInfo : `lsst.skymap.CellInfo`

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

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

◆ getSequentialCellIndexFromPair()

lsst.skymap.patchInfo.PatchInfo.getSequentialCellIndexFromPair ( self,
index )
Return a single integer that uniquely identifies
the given cell within this patch.

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

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

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

◆ getSequentialIndex()

lsst.skymap.patchInfo.PatchInfo.getSequentialIndex ( self)
Return patch sequential index.

Returns
-------
result : `int`
    Sequential patch index.

◆ getWcs()

lsst.skymap.patchInfo.PatchInfo.getWcs ( self)
Return the associated tract wcs

Returns
-------
wcs : `lsst.afw.geom.SkyWcs`
    Tract WCS.

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