Index: trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- trunk/doc/pslib/psLibSDRS.tex	(revision 4458)
+++ trunk/doc/pslib/psLibSDRS.tex	(revision 4530)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.311 2005-07-06 03:39:01 price Exp $
+%%% $Id: psLibSDRS.tex,v 1.312 2005-07-11 19:17:38 eugene Exp $
 \documentclass[panstarrs,spec]{panstarrs}
 
@@ -1434,7 +1434,7 @@
                       unsigned int lineno, 
                       const char *func, 
-		      psErrorCode code,
+                      psErrorCode code,
                       bool new, 
-		      const char *format, ...);
+                      const char *format, ...);
 \end{prototype}
 \begin{datatype}
@@ -3987,25 +3987,27 @@
 We require a very general statistics function, which, given a vector
 of floating-point values, will be able to calculate the following
-statistics:
+population statistics:
 \begin{itemize}
+\item Minimum value;
+\item Maximum value;
 \item Sample mean;
 \item Sample median;
 \item Sample standard deviation;
 \item Sample upper and lower quartiles;
-\item Robust mean and number of values used to calculate;
+\item Clipped mean and number of values used to calculate;
+\item Clipped standard deviation; 
 \item Robust median and number of values used to calculate;
-\item Robust mode and number of values used to calculate;
 \item Robust standard deviation;
 \item Robust upper and lower quartiles;
-\item Clipped mean and number of values used to calculate;
-\item Clipped standard deviation; and
-\item Minimum and maximum value in vector.
+\item Fitted mean and number of values used to calculate;
+\item Fitted standard deviation;
 \end{itemize}
 
 For definitions of each of these, see the accompanying Algorithms
 Definition Document (ADD), but in general, ``sample'' refers to the
-entire vector, ``robust'' refers to fitting the distribution in the
-vector with a model, and ``clipped'' refers to clipping the
-distribution.  Each of these must be available from a single
+entire vector, ``clipped'' refers to clipping the distribution,
+``robust'' refers to determining the quantities from the cumulative
+histogram, and ``fitted'' refers to fitting the data histogram with a
+Gaussian model.  Each of these must be available from a single
 function:
 
@@ -4015,6 +4017,5 @@
                        const psVector *errors,
                        const psVector *mask,
-                       psMaskType maskVal
-                       );
+                       psMaskType maskVal);
 \end{prototype}
 %
@@ -4024,6 +4025,10 @@
 and a \code{psStats} structure, which will be altered and returned.
 The \code{psStats} structure includes several fields which are used
-for both input and output: \code{min} and \code{max} may be used to
-specify a value range for which the statistics are calculated.
+for both input and output: \code{nSubsample} (default value of
+100,000) specifies the maximum number of data points to be used for
+the statistics calculation.  If more points than this are available,
+then the input vector must be randomly sampled to provide
+\code{nSubsample} measurements.  \code{min} and \code{max} may be used
+to specify a value range for which the statistics are calculated.
 \code{binsize} specifies a choice for the robust statistics histogram
 bin size.  If these are to be used, the user must set the
@@ -4050,5 +4055,4 @@
 
 \begin{datatype}
-/** generic statistics structure */
 typedef struct {
     double sampleMean;                  ///< formal mean of sample
@@ -4057,12 +4061,12 @@
     double sampleUQ;                    ///< upper quartile of sample
     double sampleLQ;                    ///< lower quartile of sample
-    double robustMean;                  ///< robust mean of data
     double robustMedian;                ///< robust median of data
-    double robustMode;                  ///< Robust mode of data
     double robustStdev;                 ///< robust standard deviation of data
     double robustUQ;                    ///< robust upper quartile
     double robustLQ;                    ///< robust lower quartile
     int    robustN50;                   ///< Number of points UQ-LQ
-    int    robustNfit;                  ///< Number of points in Gauss. fit
+    double fittedMean;                  ///< robust mean of data
+    double fittedStdev;                 ///< robust standard deviation of data
+    int    fittedNfit;                  ///< Number of points in Gauss. fit
     double clippedMean;                 ///< Nsigma clipped mean
     double clippedStdev;                ///< standard deviation after clipping
@@ -4073,4 +4077,5 @@
     double max;                         ///< maximum data value in data; input range
     double binsize;                     ///< binsize for robust fit (input/output)
+    int    nSubsample;                  ///< maximum number of measuremenst (input)
     psStatsOptions options;             ///< bitmask of calculated values
 } psStats;
@@ -4080,5 +4085,4 @@
 
 \begin{datatype}
-/** statistics which may be calculated */
 typedef enum {
     PS_STAT_SAMPLE_MEAN           = 0x000001,
@@ -4086,9 +4090,9 @@
     PS_STAT_SAMPLE_STDEV          = 0x000004,
     PS_STAT_SAMPLE_QUARTILE       = 0x000008, 
-    PS_STAT_ROBUST_MEAN           = 0x000010,
-    PS_STAT_ROBUST_MEDIAN         = 0x000020,
-    PS_STAT_ROBUST_MODE           = 0x000040,
-    PS_STAT_ROBUST_STDEV          = 0x000080,
-    PS_STAT_ROBUST_QUARTILE       = 0x000100, 
+    PS_STAT_ROBUST_MEDIAN         = 0x000010,
+    PS_STAT_ROBUST_STDEV          = 0x000020,
+    PS_STAT_ROBUST_QUARTILE       = 0x000040, 
+    PS_STAT_FITTED_MEAN           = 0x000080,
+    PS_STAT_FITTED_STDEV          = 0x000100,
     PS_STAT_CLIPPED_MEAN          = 0x000200,
     PS_STAT_CLIPPED_STDEV         = 0x000400,
@@ -6362,4 +6366,11 @@
 corrections for the short-period motion of the Earth's pole.  
 
+\begin{figure}
+\begin{center}
+\psfig{file=earthrot.ps,height=4in}
+\caption{Earth Orientation Coordinate Frames\label{CoordinateSystems}}
+\end{center}
+\end{figure}
+
 \subsubsection{Transformation from ICRS to GCRS}
 
