The “-SIP” distortion code

The Spitzer Space Telescope project (http://www.spitzer.caltech.edu/) has developed its own system for encoding 2-dimensional image distortion within a FITS header, based on the proposals of paper IV. A description of this system is available in http://ssc.spitzer.caltech.edu/postbcd/doc/shupeADASS.pdf. In this system, the presence of distortion is indicated by appending the distortion code “-SIP” to the CTYPEi keyword values for the celestial axes. The distortion takes the form of a polynomial function which is applied to the pixel coordinates, after subtraction of the CRPIXj values.

This system is a strictly 2 dimensional system. When reading a FrameSetFrameSet from a FitsChanFitsChan which includes the “-SIP” distortion code, AST assumes that it is only applied to the first 2 WCS axes in a FITS header (i.e. CTYPE1 and CTYPE2). If the “-SIP” distortion code is attached to other axes, it will be ignored. The distortion itself is represented by a PolyMapPolyMap within the resulting FrameSet.

If a FrameSet is read from a FitsChan which includes “-SIP” distortion, and an attempt is then made to write this FrameSet out to a FitsChan, the write operation will fail unless the distortion is insignificant (i.e. is so small that the tests for linearity built into AST are passed). In this case, no distortion code will be appended to the resulting CTYPEi keyword values.