Index: trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- trunk/doc/pslib/psLibSDRS.tex	(revision 4903)
+++ trunk/doc/pslib/psLibSDRS.tex	(revision 4904)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.329 2005-08-30 21:29:38 jhoblitt Exp $
+%%% $Id: psLibSDRS.tex,v 1.330 2005-08-30 22:35:21 price Exp $
 \documentclass[panstarrs,spec]{panstarrs}
 
@@ -918,6 +918,4 @@
     PS_DATA_ARRAY,                     ///< psArray
     PS_DATA_BITSET,                    ///< psBitSet
-    PS_DATA_CELL,                      ///< psCell
-    PS_DATA_CHIP,                      ///< psChip
     PS_DATA_CUBE,                      ///< psCube
     PS_DATA_FITS,                      ///< psFits
@@ -940,5 +938,4 @@
     PS_DATA_POLYNOMIAL4D,              ///< psPolynomial4D
     PS_DATA_PROJECTION,                ///< psProjection
-    PS_DATA_READOUT,                   ///< psReadout
     PS_DATA_REGION,                    ///< psRegion
     PS_DATA_SCALAR,                    ///< psScalar
@@ -986,6 +983,4 @@
 bool psMemCheckArray(psPtr ptr);
 bool psMemCheckBitSet(psPtr ptr);
-bool psMemCheckCell(psPtr ptr);
-bool psMemCheckChip(psPtr ptr);
 bool psMemCheckCube(psPtr ptr);
 bool psMemCheckFits(psPtr ptr);
@@ -1008,5 +1003,4 @@
 bool psMemCheckPolynomial4D(psPtr ptr);
 bool psMemCheckProjection(psPtr ptr);
-bool psMemCheckReadout(psPtr ptr);
 bool psMemCheckRegion(psPtr ptr);
 bool psMemCheckScalar(psPtr ptr);
@@ -2739,12 +2733,16 @@
 are specified:
 \begin{prototype}
-bool psMetadataAddStr(psMetadata* md, long location, const char* name, const char* comment,
-                        const char* value);
-bool psMetadataAddS32(psMetadata* md, long location, const char* name, const char* comment, psS32 value);
-bool psMetadataAddF32(psMetadata* md, long location, const char* name, const char* comment, psF32 value);
-bool psMetadataAddF64(psMetadata* md, long location, const char* name, const char* comment, psF64 value);
-bool psMetadataAddBool(psMetadata* md, long location, const char* name, const char* comment, bool value);
+bool psMetadataAddStr(psMetadata* md, long location, const char* name, int format,
+                      const char* comment, const char* value);
+bool psMetadataAddS32(psMetadata* md, long location, const char* name, int format,
+                      const char* comment, psS32 value);
+bool psMetadataAddF32(psMetadata* md, long location, const char* name, int format,
+                      const char* comment, psF32 value);
+bool psMetadataAddF64(psMetadata* md, long location, const char* name, int format,
+                      const char* comment, psF64 value);
+bool psMetadataAddBool(psMetadata* md, long location, const char* name, int format,
+                       const char* comment, bool value);
 bool psMetadataAddPtr(psMetadata* md, long location, const char* name, psDataType type,
-                        const char* comment, psPtr value);
+                      const char* comment, psPtr value);
 \end{prototype}
 
@@ -3100,5 +3098,6 @@
     psVector *index;                    ///< Index values
     psArray *values;                    ///< Corresponding values: an array of vectors
-    const double validFrom, validTo;     ///< Range of validity
+    const double validFrom;             ///< Minimum index value for validity
+    const double validTo;               ///< Maximum index value for validity
 } psLookupTable;
 \end{datatype}
@@ -3177,4 +3176,6 @@
 and returned as a \code{psVector}, the type of which shall be
 \code{PS_TYPE_F64}.
+
+\tbd{What's the \code{stats} for???}
 
 If the \code{index} is beyond the range of the \code{table},
@@ -4388,5 +4389,6 @@
     const psVector *bounds;             ///< Bounds for the bins
     psVector *nums;                     ///< Number in each of the bins
-    int minNum, maxNum;                 ///< Number below minimum / above maximum
+    int minNum;                         ///< Number below minimum
+    int maxNum;                         ///< Number above maximum
     bool uniform;                       ///< Is it a uniform distribution?
 } psHistogram;
@@ -4474,5 +4476,6 @@
 typedef struct {
     psPolynomialType type;              ///< Polynomial type
-    unsigned int nX, nY;                ///< Number of terms in x and y
+    unsigned int nX                     ///< Number of terms in x
+    unsigned int nY;                    ///< Number of terms in y
     psF64 **coeff;                      ///< Coefficients
     psF64 **coeffErr;                   ///< Error in coefficients
@@ -4509,14 +4512,14 @@
 To evaluate the polynomials at specific coordinates, we define:
 \begin{prototype}
-psF64 psPolynomial1DEval(const psPolynomial2D *poly, 
+psF64 psPolynomial1DEval(const psPolynomial1D *poly, 
                          psF64 x);
 psF64 psPolynomial2DEval(const psPolynomial2D *poly, 
                          psF64 x, 
                          psF64 y);                
-psF64 psPolynomial3DEval(const psPolynomial2D *poly, 
+psF64 psPolynomial3DEval(const psPolynomial3D *poly, 
                          psF64 x, 
                          psF64 y, 
                          psF64 z);                 
-psF64 psPolynomial4DEval(const psPolynomial2D *poly, 
+psF64 psPolynomial4DEval(const psPolynomial4D *poly, 
                          psF64 x, 
                          psF64 y, 
@@ -4527,14 +4530,14 @@
 In the event that several evaluations are required, we also define:
 \begin{prototype}
-psVector *psPolynomial1DEvalVector(const psPolynomial2D *poly, 
+psVector *psPolynomial1DEvalVector(const psPolynomial1D *poly, 
                                    const psVector *x);
 psVector *psPolynomial2DEvalVector(const psPolynomial2D *poly, 
                                    const psVector *x, 
                                    const psVector *y);
-psVector *psPolynomial3DEvalVector(const psPolynomial2D *poly, 
+psVector *psPolynomial3DEvalVector(const psPolynomial3D *poly, 
                                    const psVector *x, 
                                    const psVector *y, 
                                    const psVector *z);
-psVector *psPolynomial4DEvalVector(const psPolynomial2D *poly, 
+psVector *psPolynomial4DEvalVector(const psPolynomial4D *poly, 
                                    const psVector *x, 
                                    const psVector *y, 
@@ -4926,13 +4929,14 @@
 
 \begin{prototype}
-psSpline1D *psVectorFitSpline1D(const psVector *x, const psVector *y, int nKnots);
-\end{prototype}
-\code{psVectorFitSpline1D} shall return the spline that best fits the
-given combination of ordinates (\code{x}) and coordinates (\code{y}).
-The function shall construct a new \code{psSpline1D} using
-\code{nKnots} knots uniformly distributed over \code{x}.  As is the
-case for \code{psVectorFitPolynomial1D}, if \code{x} is \code{NULL},
-then the index of \code{y} shall be used as the ordinate.  This
-function must be valid only for types \code{psF32}, \code{psF64}.
+ bool psVectorFitSpline1D(psSpline1D *spline, const psVector *x, const psVector *y,
+                          const psVector * yErr);
+\end{prototype}
+\code{psVectorFitSpline1D} shall fit the code{spline} that best fits
+the given combination of ordinates (\code{x}) and coordinates
+(\code{y}) with the known errors (\code{yErr}, which may be
+\code{NULL}).  As is the case for \code{psVectorFitPolynomial1D}, if
+\code{x} is \code{NULL}, then the index of \code{y} shall be used as
+the ordinate.  This function must be valid only for types
+\code{psF32}, \code{psF64}.
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -5657,6 +5661,6 @@
 /** Specify direction of FFT, and if the result is real or not */
 typedef enum {
-    PS_FFT_FORWARD = 0,                 ///< psImageFFT/psVectorFFT should perform a forward FFT.
-    PS_FFT_REVERSE = 1,                 ///< psImageFFT/psVectorFFT should perform a reverse FFT.
+    PS_FFT_FORWARD = 1,                 ///< psImageFFT/psVectorFFT should perform a forward FFT.
+    PS_FFT_REVERSE = 2,                 ///< psImageFFT/psVectorFFT should perform a reverse FFT.
     PS_FFT_REAL_RESULT = 4              ///< psImageFFT/psVectorFFT should return a real image. This is valid
                                         ///< for only reverse FFT, i.e., the psImageFFT/psVectorFFT flag
@@ -6891,45 +6895,4 @@
 which provides an estimate of the atmospheric refraction, along the parallactic angle.
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\subsection{Fixed Pattern}
-
-The fixed pattern is a correction to the general astrometric solution
-formed by summing the residuals from many observations.  The intent is
-to correct for higher-order distortions in the camera system on a
-coarse grid (larger than individual pixels, but smaller than a single
-cell).  Hence, in addition to the offsets, we need to specify the size
-and scale of the grid in $x$ and $y$, as well as the origin of the
-grid.
-
-\begin{datatype}
-typedef struct {
-    int nX;                             ///< Number of elements in x
-    int nY;                             ///< Number of elements in y
-    double x0;                          ///< Position of 0,0 corner on focal plane 
-    double y0;                          ///< Position of 0,0 corner on focal plane
-    double xScale;                      ///< Scale of the grid
-    double yScale;                      ///< Scale of the grid
-    double **x;                         ///< The grid of offsets in x
-    double **y;                         ///< The grid of offsets in y
-} psFixedPattern;
-\end{datatype}
-
-The constructor for \code{psFixedPattern} shall be:
-\begin{prototype}
-psFixedPattern *psFixedPatternAlloc(double x0,        double y0, 
-                                    double xScale,    double yScale,
-                                    const psImage *x, const psImage *y);
-\end{prototype}
-Here, \code{x0}, \code{y0}, \code{xScale} and \code{yScale} have the
-same meaning as in the \code{psFixedPattern} structure.  Note that the
-values of the fixed pattern offsets are specified as images, the
-values from which need to be copied into the \code{double **x} and
-\code{double **y} of \code{psFixedPattern}, and that the number of
-elements may be derived from the size of the images.
-
-\tbd{Usage of this type is not clear, and awaits prototyping --- do not
-worry about coding this in detail yet.}
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
 
@@ -6999,5 +6962,5 @@
 objects, as well as Lunar phase.
 
-\begin{prototype}
+\begin{verbatim} %%% XXX: This is set to 'verbatim' instead of 'prototype'
 psSphere *psSunGetPos(psTime *time);
 psTime *psSunGetRise (psTime *twi15, psTime *twi18, const psTime *time);
@@ -7012,5 +6975,5 @@
 psTime *psPlanetGetRise (psTime *twi15, psTime *twi18, psTime *time);
 psTime *psPlanetGetSet (psTime *twi15, psTime *twi18, psTime *time);
-\end{prototype}
+\end{verbatim}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
