CellIJ#

class lsst.images.cells.CellIJ(i: int, j: int)#

Bases: object

An index in a grid of cells.

Notes#

This is deliberately not a tuple or other Sequence in order to make it typing-incompatible with sequence-based pixel coordinate pairs (e.g. YX). This also allows it to have addition and subtraction operators.

Methods Summary

as_tuple()

Convert to an (i, j) tuple.

from_legacy(legacy_index)

Convert from a legacy lsst.skymap.Index2D instance.

to_legacy()

Convert to a legacy lsst.skymap.Index2D instance.

Methods Documentation

as_tuple() tuple[int, int]#

Convert to an (i, j) tuple.

static from_legacy(legacy_index: LegacyIndex2D) CellIJ#

Convert from a legacy lsst.skymap.Index2D instance.

Notes#

lsst.skymap.Index2D is ordered (x, y), i.e. (j, i).

to_legacy() LegacyIndex2D#

Convert to a legacy lsst.skymap.Index2D instance.

Notes#

lsst.skymap.Index2D is ordered (x, y), i.e. (j, i).