Python wrappers, SIP, Paper IV support (BSD License):
Michael Droettboom, Nadia Dencheva
Space Telescope Science Institute
wcslib (LGPL License):
Australia Telescope National Facility, CSIRO (wcslib)
Pywcs provides transformations following the SIP conventions, Paper IV table lookup distortion, and the core WCS functionality provided by wcslib. Each of these transformations can be used independently or together in a standard pipeline.
The basic workflow is as follows:
- import pywcs
- Call the pywcs.WCS constructor with a pyfits header and/or hdulist object.
- Optionally, if the FITS file uses any deprecated or non-standard features, you may need to call one of the fix methods on the object.
- Use one of the following transformation methods:
- all_pix2sky: Perform all three transformations from pixel to sky coordinates.
- wcs_pix2sky: Perform just the core WCS transformation from pixel to sky coordinates.
- wcs_sky2pix: Perform just the core WCS transformation from sky to pixel coordinates.
- sip_pix2foc: Convert from pixel to focal plane coordinates using the SIP polynomial coefficients.
- sip_foc2pix: Convert from focal plane to pixel coordinates using the SIP polynomial coefficients.
- p4_pix2foc: Convert from pixel to focal plane coordinates using the table lookup distortion method described in Paper IV.
- det2im: Convert from detector coordinates to image coordinates. Commonly used for narrow column correction.