BaseTractBuilder¶
- class lsst.skymap.BaseTractBuilder(config)¶
- Bases: - object- Base class for algorithms that define patches within the tract. - Parameters:
- configlsst.pexConfig.Config
- Input for configuring the algorithm 
 
- config
 - Methods Summary - getPackedConfig(config)- Get a packed config suitable for using in a sha1. - getPatchIndexPair(sequentialIndex)- Convert sequential index into patch index (x,y) pair. - getPatchInfo(index, tractWcs)- Return information for the specified patch. - 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. - 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 - abstract getPackedConfig(config)¶
- Get a packed config suitable for using in a sha1. - Parameters:
- Returns:
- configPackedbytes
 
- configPacked
 
 - getPatchBorder()¶
 - getPatchIndexPair(sequentialIndex)¶
- Convert sequential index into patch index (x,y) pair. - Parameters:
- sequentialIndexint
 
- sequentialIndex
- Returns:
 
 - abstract getPatchInfo(index, tractWcs)¶
- Return information for the specified patch. - Parameters:
- indexlsst.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. 
- tractWcslsst.afw.geom.SkyWcs
- WCS associated with the tract. 
 
- index
- Returns:
- resultlsst.skymap.PatchInfo
- The patch info for that index. 
 
- result
- Raises:
- IndexError
- If index is out of range. 
 
 
 - 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:
- patchInfolsst.skymap.PatchInfo
 
- patchInfo
- Returns:
- sequentialIndexint
 
- sequentialIndex
 
 - getSequentialPatchIndexFromPair(index)¶
- Return a single integer that uniquely identifies the patch index within the tract. - Parameters:
- indexlsst.skymap.Index2DorIterable[int,int]
 
- index
- Returns:
- sequentialIndexint
 
- sequentialIndex
 
 - 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:
- minBBoxlsst.geom.Box2I
- Minimum bounding box for tract 
- wcslsst.afw.geom.SkyWcs
- Wcs object 
 
- minBBox
- Returns:
- bbox`lsst.geom.Box2I
- final bounding box, number of patches 
- numPatcheslsst.skymap.Index2D