makeSipIwcToPixel

lsst.afw.geom.testUtils.makeSipIwcToPixel(metadata)

Make an IWC to pixel transform with SIP distortion from FITS-WCS metadata

This function is primarily intended for unit tests. IWC is intermediate world coordinates, as described in the FITS papers.

Parameters:
metadata : lsst.daf.base.PropertySet

FITS metadata describing a WCS with inverse SIP coefficients

Returns:
lsst.afw.geom.TransformPoint2ToPoint2

Transform from IWC position to pixel position (zero-based) in the forward direction. The inverse direction is not defined.

Notes

The inverse SIP terms APn_m, BPn_m are polynomial coefficients x^n y^m for computing transformed x, y respectively. If we call the resulting polynomial inverseSipPolynomial, the returned transformation is:

pixelPosition = pixel origin + uv + inverseSipPolynomial(uv) where uv = inverseCdMatrix * iwcPosition