CellTractBuilder¶
-
class
lsst.skymap.CellTractBuilder(config)¶ Bases:
lsst.skymap.BaseTractBuilderMethods Summary
getPackedConfig(config)Get a packed config suitable for using in a sha1. getPatchBorder()getPatchIndexPair(sequentialIndex)Convert sequential index into patch index (x,y) pair. getPatchInfo(index, tractWcs)Return information for the specified patch. getPatchInnerDimensions()Get dimensions of inner region of the patches (all are the same) getSequentialPatchIndex(patchInfo)Return a single integer that uniquely identifies the given patch within this tract. getSequentialPatchIndexFromPair(index)Return a single integer that uniquely identifies the patch index within the tract. setupPatches(minBBox, wcs)Set up the patches of a particular size in a tract. Methods Documentation
-
getPackedConfig(config)¶ Get a packed config suitable for using in a sha1.
Parameters: - config :
lsst.skymap.BaseTractBuilderConfig
Returns: - configPacked :
bytes
- config :
-
getPatchBorder()¶
-
getPatchIndexPair(sequentialIndex)¶ Convert sequential index into patch index (x,y) pair.
Parameters: - sequentialIndex :
int
Returns: - x, y :
lsst.skymap.Index2D
- sequentialIndex :
-
getPatchInfo(index, tractWcs)¶ Return information for the specified patch.
Parameters: - index :
lsst.skymap.Index2DorIterable[int,int] Index of patch, as Index2D or pair of ints; or a sequential index as returned by getSequentialPatchIndex; negative values are not supported.
- tractWcs :
lsst.afw.geom.SkyWcs WCS associated with the tract.
Returns: - result :
lsst.skymap.PatchInfo The patch info for that index.
Raises: - IndexError
If index is out of range.
- index :
-
getPatchInnerDimensions()¶ Get dimensions of inner region of the patches (all are the same)
-
getSequentialPatchIndex(patchInfo)¶ Return a single integer that uniquely identifies the given patch within this tract.
Parameters: - patchInfo :
lsst.skymap.PatchInfo
Returns: - sequentialIndex :
int
- patchInfo :
-
getSequentialPatchIndexFromPair(index)¶ Return a single integer that uniquely identifies the patch index within the tract.
Parameters: - index :
lsst.skymap.Index2DorIterable[int,int]
Returns: - sequentialIndex :
int
- index :
-
setupPatches(minBBox, wcs)¶ Set up the patches of a particular size in a tract.
We grow the tract bounding box to hold an exact multiple of the desired size (patchInnerDimensions or numCellsPerPatchInner*cellInnerDimensions), while keeping the center roughly the same. We return the final tract bounding box, and the number of patches in each dimension (as an Index2D).
Parameters: - minBBox :
lsst.geom.Box2I Minimum bounding box for tract
- wcs :
lsst.afw.geom.SkyWcs Wcs object
Returns: - bbox : `lsst.geom.Box2I
final bounding box, number of patches
- numPatches :
lsst.skymap.Index2D
- minBBox :
-