Index: /trunk/doc/pslib/ChangeLogADD.tex
===================================================================
--- /trunk/doc/pslib/ChangeLogADD.tex	(revision 3178)
+++ /trunk/doc/pslib/ChangeLogADD.tex	(revision 3179)
@@ -26,3 +26,4 @@
 \item Added \code{PS_RESAMPLE_LANCZOS[234]}, dropped
   \code{PS_RESAMPLE_LAGRANGE}.
+\item Added section on FITS WCS.
 \end{itemize}
Index: /trunk/doc/pslib/psLibADD.tex
===================================================================
--- /trunk/doc/pslib/psLibADD.tex	(revision 3178)
+++ /trunk/doc/pslib/psLibADD.tex	(revision 3179)
@@ -1,3 +1,3 @@
-%%% $Id: psLibADD.tex,v 1.61 2005-02-10 01:28:07 eugene Exp $
+%%% $Id: psLibADD.tex,v 1.62 2005-02-10 02:20:16 price Exp $
 \documentclass[panstarrs]{panstarrs}
 
@@ -2012,4 +2012,75 @@
 \end{verbatim}
 
+\subsection{WCS Translation}
+
+The FITS World Coordinate System (WCS) standard is specified in two
+papers: Greisen \& Calabretta, 2002, A\&A, 375, 1061 (Paper I); and
+Calabretta \& Greisen, 2002, A\&A, 375, 1077 (Paper II).  Two further
+papers (Papers III and IV) are available as drafts, and have not yet
+been accepted.  All these papers, in their most up-to-date form, are
+available from
+\href{http://www.atnf.csiro.au/people/mcalabre/WCS/index.html}{Mark
+Calabretta's page}.
+
+Papers I and II together lay out a system for converting pixel
+coordinates to celestial coordinates (RA, Dec).  However, these assume
+that linear transformations, followed by projection or deprojection
+are sufficient, whereas we do not expect that this is adequate to
+describe the \PS{} focal plane.  Paper III has to do with spectral
+coordinates, and does not concern us.  Paper IV has a proposed
+mechanism for dealing with distortions which appears to be adequate to
+our needs.  While the formalism has not been officially approved, and
+the syntax may change, the current version of the paper provides a
+means for translating the multilayered \PS{} system to FITS.
+Consequently, we will use the current version (the version we consider
+here is dated 22 April 2004) and update any syntax changes later as
+required.
+
+Paper IV proposes two separate distortion corrections --- before and
+after a linear transformation.  Given pixel coordinates, a distortion
+correction is made yielding ``corrected pixel coordinates''.  This
+first distortion allows correction of the individual detector (for
+example, if the detector is not flat, as may be the case for MegaCam).
+A linear transformation is then performed to ``intermediate pixel
+coordinates'', accounting for translation, rotation and scale.  The
+second distortion correction to ``corrected intermediate pixel
+coordinates'' is performed, which corrects for optical distortion.
+The resultant is then scaled and deprojected onto the sky, yielding
+the celestial coordinates.
+
+\subsubsection{Implementation}
+
+The first distortion will correct for tilts or bends of the detectors
+so that pixels are in the same plane as the focal plane
+(\code{psCell.toChip}).  The linear transformation will correct for
+the position on the focal plane (\code{psChip.toFPA}).  The second
+distortion will correct for distortions in the optics
+(\code{psFPA.toTangentPlane}).  The projection will be a simple
+gnomonic (``TAN'') projection.  Thus, the Paper IV formalism satisfies
+our needs.
+
+Paper IV also goes far beyond our needs, by providing several types of
+distortion functions.  We are interested (at least, for now) solely in
+simple polynomial distortion functions, as this is what is currently
+implemented for \PS{} (i.e., we are not interested in cubic spline,
+B-spline or lookup tables; nor are we interested in the use of
+auxiliary variables, though this may change in the future).  In
+particular, the proposed WCS system cannot handle the color and
+magnitude dependence currently built into psLib's \code{psDistortion},
+so we will need to specify a mean color and magnitude at which to
+evaluate the spatial polynomials.
+
+In the event that the multiple layers (\code{psCell.toChip}
+$\rightarrow$ \code{psChip.toFPA} $\rightarrow$
+\code{psFPA.toTangentPlane}) are not available, the short-cut
+transformation (\code{psCell.toFPA}) can be used as the first WCS
+distortion.  If the only available information is the ``quick and
+dirty'' transformation (\code{psCell.toSky}), this may be implemented
+using the linear transformation without any of the WCS distortions,
+followed by a linear `projection' (``LIN'').
+
+Reading the WCS into a psFPA can be done in the reverse order of
+writing the WCS.
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
