getSipMatrixFromMetadata

lsst.afw.geom.getSipMatrixFromMetadata(metadata, name)

Extract a SIP matrix from FITS TAN-SIP WCS metadata.

Omitted coefficients are set to 0 and all coefficients may be omitted.

Parameters:
metadata : lsst.daf.base.PropertySet

FITS metadata.

name : str

Name of TAN-SIP matrix ("A", "B", "Ap", or "Bp").

Returns:
`numpy.array`

The SIP matrix.

Raises:
TypeError

If the order keyword <name>_ORDER (e.g. AP_ORDER) is not found, the value of the order keyword cannot be read as an integer, the value of the order keyword is negative, or if a matrix parameter (e.g. AP_5_0) cannot be read as a float.