lsst.skymap ga8c6da7877+a9c198e9fb
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
lsst.skymap.tractBuilder.BaseTractBuilder Class Reference
Inheritance diagram for lsst.skymap.tractBuilder.BaseTractBuilder:
lsst.skymap.tractBuilder.CellTractBuilder lsst.skymap.tractBuilder.LegacyTractBuilder

Public Member Functions

 __init__ (self, config)
 
 setupPatches (self, minBBox, wcs)
 
 getPatchBorder (self)
 
 getPatchInfo (self, index, tractWcs)
 
 getPatchInnerDimensions (self)
 
 getSequentialPatchIndex (self, patchInfo)
 
 getSequentialPatchIndexFromPair (self, index)
 
 getPatchIndexPair (self, sequentialIndex)
 
 getPackedConfig (self, config)
 

Public Attributes

 config
 

Protected Attributes

 _patchInnerDimensions
 
 _numPatches
 
 _tractBBox
 
 _initialized
 

Detailed Description

Base class for algorithms that define patches within the tract.

Parameters
----------
config : `lsst.pexConfig.Config`
    Input for configuring the algorithm

Definition at line 42 of file tractBuilder.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.skymap.tractBuilder.BaseTractBuilder.__init__ ( self,
config )

Member Function Documentation

◆ getPackedConfig()

lsst.skymap.tractBuilder.BaseTractBuilder.getPackedConfig ( self,
config )
Get a packed config suitable for using in a sha1.

Parameters
----------
config : `lsst.skymap.BaseTractBuilderConfig`

Returns
-------
configPacked : `bytes`

Reimplemented in lsst.skymap.tractBuilder.LegacyTractBuilder, and lsst.skymap.tractBuilder.CellTractBuilder.

Definition at line 184 of file tractBuilder.py.

◆ getPatchBorder()

lsst.skymap.tractBuilder.BaseTractBuilder.getPatchBorder ( self)

Definition at line 96 of file tractBuilder.py.

◆ getPatchIndexPair()

lsst.skymap.tractBuilder.BaseTractBuilder.getPatchIndexPair ( self,
sequentialIndex )
Convert sequential index into patch index (x,y) pair.

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

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

Definition at line 167 of file tractBuilder.py.

◆ getPatchInfo()

lsst.skymap.tractBuilder.BaseTractBuilder.getPatchInfo ( self,
index,
tractWcs )
Return information for the specified patch.

Parameters
----------
index : `lsst.skymap.Index2D` or `~collections.abc.Iterable` of 2 `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
    Raised if index is out of range.

Reimplemented in lsst.skymap.tractBuilder.LegacyTractBuilder, and lsst.skymap.tractBuilder.CellTractBuilder.

Definition at line 100 of file tractBuilder.py.

◆ getPatchInnerDimensions()

lsst.skymap.tractBuilder.BaseTractBuilder.getPatchInnerDimensions ( self)
Get dimensions of inner region of the patches (all are the same)

Definition at line 124 of file tractBuilder.py.

◆ getSequentialPatchIndex()

lsst.skymap.tractBuilder.BaseTractBuilder.getSequentialPatchIndex ( self,
patchInfo )
Return a single integer that uniquely identifies
the given patch within this tract.

Parameters
----------
patchInfo : `lsst.skymap.PatchInfo`

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

Definition at line 129 of file tractBuilder.py.

◆ getSequentialPatchIndexFromPair()

lsst.skymap.tractBuilder.BaseTractBuilder.getSequentialPatchIndexFromPair ( self,
index )
Return a single integer that uniquely identifies
the patch index within the tract.

Parameters
----------
index : `lsst.skymap.Index2D` or `~collections.abc.Iterable` of 2 `int`

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

Definition at line 144 of file tractBuilder.py.

◆ setupPatches()

lsst.skymap.tractBuilder.BaseTractBuilder.setupPatches ( self,
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`

Definition at line 53 of file tractBuilder.py.

Member Data Documentation

◆ _initialized

lsst.skymap.tractBuilder.BaseTractBuilder._initialized
protected

Definition at line 92 of file tractBuilder.py.

◆ _numPatches

lsst.skymap.tractBuilder.BaseTractBuilder._numPatches
protected

Definition at line 89 of file tractBuilder.py.

◆ _patchInnerDimensions

lsst.skymap.tractBuilder.BaseTractBuilder._patchInnerDimensions
protected

Definition at line 80 of file tractBuilder.py.

◆ _tractBBox

lsst.skymap.tractBuilder.BaseTractBuilder._tractBBox
protected

Definition at line 91 of file tractBuilder.py.

◆ config

lsst.skymap.tractBuilder.BaseTractBuilder.config

Definition at line 51 of file tractBuilder.py.


The documentation for this class was generated from the following file: