read_yx0#

lsst.images.fits.read_yx0(header: Header) YX[int]#

Recover the logical origin of an array from its FITS header.

Parameters#

header

Header to read from. Not modified.

Returns#

YX [int]

Logical coordinate of the first pixel, ordered (y, x).

Raises#

ValueError

Raised if the header records no origin via either the LTV1/LTV2 cards (written by lsst.afw.image) or a linear offset WCS (written by add_offset_wcs).

Notes#

The LTV1/LTV2 convention is preferred when present, falling back to the A offset WCS otherwise.