PatchInfo

class lsst.skymap.PatchInfo(index, innerBBox, outerBBox, sequentialIndex, tractWcs, cellInnerDimensions=(0, 0), cellBorder=0, numCellsPerPatchInner=0, numCellsInPatchBorder=0)

Bases: object

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 : Iterable [int, 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.

Attributes Summary

cell_border
cell_inner_dimensions Get dimensions of inner region of the cells (all are the same)
index Return patch index: a tuple of (x, y)
inner_bbox Get inner bounding box.
inner_sky_polygon
num_cells Get the number of cells in x, y.
outer_bbox Get outer bounding box.
outer_sky_polygon
sequential_index Return patch sequential index.
wcs Return the associated tract wcs

Methods Summary

getCellBorder()
getCellIndexPair(sequentialIndex) Convert a sequential index into an index pair.
getCellInfo(index) Return information for the specified cell.
getCellInnerDimensions() Get dimensions of inner region of the cells (all are the same)
getIndex() Return patch index: a tuple of (x, y)
getInnerBBox() Get inner bounding box.
getInnerSkyPolygon([tractWcs]) Get the inner on-sky region.
getNumCells() Get the number of cells in x, y.
getOuterBBox() Get outer bounding box.
getOuterSkyPolygon([tractWcs]) Get the outer on-sky region.
getSequentialCellIndex(cellInfo) Return a single integer that uniquely identifies the given cell within this patch.
getSequentialCellIndexFromPair(index) Return a single integer that uniquely identifies the given cell within this patch.
getSequentialIndex() Return patch sequential index.
getWcs() Return the associated tract wcs

Attributes Documentation

cell_border
cell_inner_dimensions

Get dimensions of inner region of the cells (all are the same)

index

Return patch index: a tuple of (x, y)

Returns:
result : lsst.skymap.Index2D

Patch index (x, y).

inner_bbox

Get inner bounding box.

Returns:
bbox : lsst.geom.Box2I

The inner bounding Box.

inner_sky_polygon
num_cells

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.

outer_bbox

Get outer bounding box.

Returns:
bbox : lsst.geom.Box2I

The outer bounding Box.

outer_sky_polygon
sequential_index

Return patch sequential index.

Returns:
result : int

Sequential patch index.

wcs

Return the associated tract wcs

Returns:
wcs : lsst.afw.geom.SkyWcs

Tract WCS.

Methods Documentation

getCellBorder()
getCellIndexPair(sequentialIndex)

Convert a sequential index into an index pair.

Parameters:
sequentialIndex : int
Returns:
x, y : lsst.skymap.Index2D
Raises:
IndexError

If index is out of range.

getCellInfo(index)

Return information for the specified cell.

Parameters:
index : lsst.skymap.Index2D or int

Index of cell, as Index2D, or Iterable [int, int]; 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

If index is out of range.

getCellInnerDimensions()

Get dimensions of inner region of the cells (all are the same)

getIndex()

Return patch index: a tuple of (x, y)

Returns:
result : lsst.skymap.Index2D

Patch index (x, y).

getInnerBBox()

Get inner bounding box.

Returns:
bbox : lsst.geom.Box2I

The inner bounding Box.

getInnerSkyPolygon(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()

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()

Get outer bounding box.

Returns:
bbox : lsst.geom.Box2I

The outer bounding Box.

getOuterSkyPolygon(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(cellInfo)

Return a single integer that uniquely identifies the given cell within this patch.

Parameters:
cellInfo : lsst.skymap.CellInfo
Returns:
sequentialIndex : int
Raises:
IndexError

If index is out of range.

getSequentialCellIndexFromPair(index)

Return a single integer that uniquely identifies the given cell within this patch.

Parameters:
index : lsst.skymap.Index2D
Returns:
sequentialIndex : int
Raises:
IndexError

If index is out of range.

getSequentialIndex()

Return patch sequential index.

Returns:
result : int

Sequential patch index.

getWcs()

Return the associated tract wcs

Returns:
wcs : lsst.afw.geom.SkyWcs

Tract WCS.