CellGrid#
- pydantic model lsst.images.cells.CellGrid#
A grid of rectangular cells with no overlaps or space between cells.
Notes
A cell grid usually corresponds to a full patch, but we do not explicitly encode this in the type to permit full-tract grids, which would have to drop the cells in patch overlap regions and re-label all cells.
Subsets of grids are usually represented via
CellGridBounds.- Parameters:
data (
Any)- Fields:
- field bbox: Box [Required]#
Bounding box of the grid of cells (snapped to cell boundaries. The cell with index (i=0, j=0) always has a corner at
(y=bbox.y.min, x=bbox.x.min)but there is no expectation that(y=bbox.y.min, x=bbox.x.min)be(y=0, x=0).
- field cell_shape: SerializableYX[int] [Required]#
Shape of each cell in pixels.
- Constraints:
get_pydantic_core_schema = <bound method YX.__get_pydantic_core_schema__ of <class ‘lsst.images._geom.YX’>>
- bbox_of(cell)#
Return the bounding box of the given cell.
- static from_legacy(legacy)#
Construct from a legacy
lsst.cell_coadds.UniformGridobject.- Parameters:
legacy (
TypeAliasType) – Legacy grid to convert.- Return type:
- index_of(*, y, x)#
Return the 2-d index of the cell that contains the given pixel.
- to_legacy()#
Convert to a legacy
lsst.cell_coadds.UniformGridobject.- Return type:
TypeAliasType