Index: trunk/doc/pslib/psLibADD.tex
===================================================================
--- trunk/doc/pslib/psLibADD.tex	(revision 1689)
+++ trunk/doc/pslib/psLibADD.tex	(revision 1693)
@@ -1,3 +1,3 @@
-%%% $Id: psLibADD.tex,v 1.37 2004-09-03 21:05:42 price Exp $
+%%% $Id: psLibADD.tex,v 1.38 2004-09-07 00:52:16 eugene Exp $
 \documentclass[panstarrs]{panstarrs}
 
@@ -1065,7 +1065,7 @@
 (5,5).
 
-\subparagraph{Bilinear Interpolation ({\tt PS\_RESAMPLE\_SINC})}
-
-\subparagraph{Bilinear Interpolation ({\tt PS\_RESAMPLE\_LAGRANGE})}
+\subparagraph{Sinc Interpolation ({\tt PS\_RESAMPLE\_SINC})}
+
+\subparagraph{Lagrange Interpolation ({\tt PS\_RESAMPLE\_LAGRANGE})}
 
 \paragraph{Image Cuts and Slices}
@@ -1109,4 +1109,47 @@
 sum is renormalized by the ratio (12.57/16.00).
 
+\subparagraph{Radial Cuts}
+
+Consider an image with pixels $x_i,y_i$ and a reference coordinate
+$x_c, y_c$.  We want to construct a radial cut by measuring statistics
+for pixels in a sequence of radial annulii $r_s < r < r_e$.  For each
+annulus, we need to select the pixels which fall within this annulus.
+The coordinates of the center of pixel $i,j$ are $i+0.5,j+0.5$.  A
+given pixel has a distance from the reference coordinate of $dX = x_c
+- i - 0.5, dY = y_c - j - 0.5$.  The pixels to be used for a given
+radial annulus are all of those pixels for which $r_s < \sqrt{dX^2 +
+  dY^2} < r_e$.  This is more efficiently calculated by comparing the
+square of the radii and distances.  All pixels which satisfy the above
+condition are included in a specific annular radius.  All average
+quantities are calculated directly from the pixel ensemble
+statistics.  
+
+\subparagraph{Arbitrary Linear Cuts}
+
+Select the pixels which lie along a line following steps of 1 pixel
+length:
+
+\begin{verbatim}
+
+  dX = xe - xs;
+  dY = ye - ys;
+  L = hypot (dX, dY);
+  dX = dX / L;
+  dY = dY / L;
+
+  REALLOCATE (xvec[0].elements, float, MAX (L, 1));
+  REALLOCATE (yvec[0].elements, float, MAX (L, 1));
+  xvec[0].Nelements = L;
+  yvec[0].Nelements = L;
+
+  V = (float *)buf[0].matrix.buffer;
+  for (i = 0; i < L; i++) {
+    xi = xs + i*dX - 0.5;
+    yi = ys + i*dY - 0.5;
+    xvec[0].elements[i] = i;
+    yvec[0].elements[i] = V[xi + Nx*yi];
+  }
+\end{verbatim}
+
 \paragraph{Image Rotation}
 
@@ -1157,7 +1200,7 @@
 %
 \begin{eqnarray}
-\sin \theta                        = \sin \delta \cos \delta_p - \cos \delta \sin \delta_p \sin (\alpha - \alpha_p) 
-\cos \theta \sin (\phi - \phi_p)   = \cos \delta \cos \delta_p \sin (\alpha - \alpha_p) + \sin \delta \sin \delta_p
-\cos \theta \cos (\phi - \phi_p)   = \cos \delta \cos (\alpha - \alpha_p)
+\sin \theta                        & = & \sin \delta \cos \delta_p - \cos \delta \sin \delta_p \sin (\alpha - \alpha_p) 
+\cos \theta \sin (\phi - \phi_p)   & = & \cos \delta \cos \delta_p \sin (\alpha - \alpha_p) + \sin \delta \sin \delta_p
+\cos \theta \cos (\phi - \phi_p)   & = & \cos \delta \cos (\alpha - \alpha_p)
 \end{eqnarray}
 %
@@ -1403,5 +1446,5 @@
 \subsubsection{Offset}
 
-Coordinate offsets can either spherical offsets or linear offsets.  
+Coordinate offsets can be either spherical offsets or linear offsets.
 
 A spherical offset is performed by adding the components of the
@@ -1542,15 +1585,16 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\subsubsection{Offsets}
-
-\tbd{write down Offset calculation (from Bugzilla)}
-\tbd{define RadialCut}
-\tbd{define ImageCut}
-\tbd{define SINC, BICUBIC interpolation}
+\subsubsection{Missing and Todo}
+
+\tbd{define SINC, LAGRANGE interpolation}
+
 \tbd{define sunrise, sunset, sun position}
+
 \tbd{define moonrise, moonset, moon position, moon phase}
+
 \tbd{define planet functions}
-\tbd{clean up psProjections}
+
 \tbd{clean up FITS I/O issues}
+
 \tbd{define Brent's method \& minimization bracketing}
 
