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:
indexlsst.skymap.Index2D

x,y index of patch (a pair of ints)

innerBBoxlsst.geom.Box2I

inner bounding box

outerBBoxlsst.geom.Box2I

inner bounding box

sequentialIndexint

Patch sequential index

tractWcslsst.afw.geom.SkyWcs

Tract WCS object.

cellInnerDimensionsIterable of 2 int or lsst.geom.Extent2I, optional

Inner dimensions of each cell (x,y pixels).

cellBorderint, optional

Cell border size (pixels).

numCellsPerPatchInnerint, optional

Number of cells per inner patch region.

numCellsInPatchBorderint, 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:
resultlsst.skymap.Index2D

Patch index (x, y).

inner_bbox

Get inner bounding box.

Returns:
bboxlsst.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:
resultlsst.skymap.Index2D

The number of cells in x, y.

outer_bbox

Get outer bounding box.

Returns:
bboxlsst.geom.Box2I

The outer bounding Box.

outer_sky_polygon
sequential_index

Return patch sequential index.

Returns:
resultint

Sequential patch index.

wcs

Return the associated tract wcs

Returns:
wcslsst.afw.geom.SkyWcs

Tract WCS.

Methods Documentation

getCellBorder()
getCellIndexPair(sequentialIndex)

Convert a sequential index into an index pair.

Parameters:
sequentialIndexint
Returns:
x, ylsst.skymap.Index2D
Raises:
IndexError

Raised if index is out of range.

getCellInfo(index)

Return information for the specified cell.

Parameters:
indexlsst.skymap.Index2D or 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:
resultlsst.skymap.CellInfo

The cell info for that index.

Raises:
IndexError

Raised 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:
resultlsst.skymap.Index2D

Patch index (x, y).

getInnerBBox()

Get inner bounding box.

Returns:
bboxlsst.geom.Box2I

The inner bounding Box.

getInnerSkyPolygon(tractWcs=None)

Get the inner on-sky region.

Parameters:
tractWcslsst.afw.image.SkyWcs, optional

WCS for the associated tract.

Returns:
resultlsst.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:
resultlsst.skymap.Index2D

The number of cells in x, y.

getOuterBBox()

Get outer bounding box.

Returns:
bboxlsst.geom.Box2I

The outer bounding Box.

getOuterSkyPolygon(tractWcs=None)

Get the outer on-sky region.

Parameters:
tractWcslsst.afw.image.SkyWcs, optional

WCS for the associated tract.

Returns:
resultlsst.sphgeom.ConvexPolygon

The outer sky region.

getSequentialCellIndex(cellInfo)

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

Parameters:
cellInfolsst.skymap.CellInfo
Returns:
sequentialIndexint
Raises:
IndexError

Raised if index is out of range.

getSequentialCellIndexFromPair(index)

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

Parameters:
indexlsst.skymap.Index2D
Returns:
sequentialIndexint
Raises:
IndexError

Raised if index is out of range.

getSequentialIndex()

Return patch sequential index.

Returns:
resultint

Sequential patch index.

getWcs()

Return the associated tract wcs

Returns:
wcslsst.afw.geom.SkyWcs

Tract WCS.