Index: trunk/doc/modules/ModulesSDRS.tex
===================================================================
--- trunk/doc/modules/ModulesSDRS.tex	(revision 3074)
+++ trunk/doc/modules/ModulesSDRS.tex	(revision 3155)
@@ -1,3 +1,3 @@
-%%% $Id: ModulesSDRS.tex,v 1.29 2005-01-24 21:56:33 price Exp $
+%%% $Id: ModulesSDRS.tex,v 1.30 2005-02-08 04:56:24 eugene Exp $
 \documentclass[panstarrs]{panstarrs}
 
@@ -1103,11 +1103,11 @@
 \begin{verbatim}
 typedef struct {
-  psPeak *peak;            // description of peak pixel
+  pmPeak *peak;            // description of peak pixel
   psImage *pixels;         // rectangular region including object pixels
   psImage *mask;           // mask to mark pixels associated with object in region
-  psMoments *moments;      // basic moments measure for the object
-  psModel *models;         // model parameters and type
-  psSourceType type;       // best identification of object
-} psSource;
+  pmMoments *moments;      // basic moments measure for the object
+  pmModel *models;         // model parameters and type
+  pmSourceType type;       // best identification of object
+} pmSource;
 \end{verbatim}
 
@@ -1120,22 +1120,22 @@
   int y;                   // y-coordinate of peak pixel
   float counts;            // value of peak pixel (above sky?)
-  psPeakType class;        // description of peak
-} psPeak;
+  pmPeakType class;        // description of peak
+} pmPeak;
 \end{verbatim}
 
 A peak pixel may have several features which may be determined when
 the peak is found or measured.  These are specified by the
-\code{psPeakType} enum.  \code{PS_PEAK_LONE} represents a single pixel
+\code{pmPeakType} enum.  \code{PM_PEAK_LONE} represents a single pixel
 which is higher than its 8 immediate neighbors.  The
-\code{PS_PEAK_EDGE} represents a peak pixel which touching the image
-edge.  The \code{PS_PEAK_FLAT} represents a peak pixel which has more
+\code{PM_PEAK_EDGE} represents a peak pixel which touching the image
+edge.  The \code{PM_PEAK_FLAT} represents a peak pixel which has more
 than a specific number of neighbors at the same value, within some
 tolarence:
 \begin{verbatim}
 typedef enum {
-  PS_PEAK_LONE;             // isolated peak
-  PS_PEAK_EDGE;             // peak on edge
-  PS_PEAK_FLAT;             // peak has equal-value neighbors
-} psPeakType; 
+  PM_PEAK_LONE;             // isolated peak
+  PM_PEAK_EDGE;             // peak on edge
+  PM_PEAK_FLAT;             // peak has equal-value neighbors
+} pmPeakType; 
 \end{verbatim}
 
@@ -1162,5 +1162,5 @@
   float Sky;                // sky level (background)
   int   nPixels;            // number of pixels used
-} psMoments;
+} pmMoments;
 \end{verbatim}
 
@@ -1168,26 +1168,43 @@
 function.  The description of the model includes the model parameters
 and their errors, along with the fit $\chi^2$.  The model type is
-specified by the enum \code{psObjectModel}, specified below.  We
+specified by the enum \code{pmObjectModel}, specified below.  We
 discuss the details of these models in section~\ref{ObjectModels}.
 
 \begin{verbatim}
 typedef struct {
-  psObjectModel type;       // model to be used
+  pmObjectModel type;       // model to be used
   int Nparams;              // number of parameters
   float *params;            // parameter values
   float *dparams;           // parameter errors
   float chisq;              // fit chisq
-} psModel;
+} pmModel;
 \end{verbatim}
 
 \begin{verbatim}
 typedef enum {
-  PS_MODEL_GAUSS;
-  PS_MODEL_PGAUSS;
-  PS_MODEL_TWIST_GAUSS;
-  PS_MODEL_WAUSS;
-  PS_MODEL_SERSIC;
-  PS_MODEL_SERSIC_CORE;
-} psModelType; 
+  PM_MODEL_GAUSS;
+  PM_MODEL_PGAUSS;
+  PM_MODEL_TWIST_GAUSS;
+  PM_MODEL_WAUSS;
+  PM_MODEL_SERSIC;
+  PM_MODEL_SERSIC_CORE;
+} pmModelType; 
+\end{verbatim}
+
+A given source may be identified as most-likey to be one of several
+source types.  The \code{pmSource} entry \code{pmSourceType} defines
+the current best-guess for this source.  \tbd{The values given below
+are currently illustrative and will require some modification as the
+source classification code is developed.}
+
+\begin{verbatim}
+typedef enum {
+  PM_SOURCE_PSFSTAR;
+  PM_SOURCE_GALAXY;
+  PM_SOURCE_DEFECT;
+  PM_SOURCE_SATSTAR;
+  PM_SOURCE_FAINTSTAR;
+  PM_SOURCE_BRIGHTSTAR;
+} pmSourceType; 
 \end{verbatim}
 
@@ -1233,5 +1250,5 @@
 making flat-topped regions have single peaks at the (+x,+y) corner.
 When selecting the peaks, their type must also be set.  The result of
-this function is a list of \code{psPeak} entries.
+this function is a list of \code{pmPeak} entries.
 
 \tbd{do we need a function psVector *psImageRowVector (psImage *image, int row);}
@@ -1248,5 +1265,5 @@
 
 \begin{verbatim}
-psSource *pmSourceLocalSky(const psImage *image, const psPeak *peak, float inner_radius, float outer_radius), 
+pmSource *pmSourceLocalSky(const psImage *image, const pmPeak *peak, float inner_radius, float outer_radius), 
 \end{verbatim}
 
@@ -1255,11 +1272,11 @@
 specified are used to measure the median \tbd{(clipped mean?)
 (statistic from psStats?)} in the vicinity of the the specified peak
-coordinates.  The resulting sky is applied to the \code{psMoments}
-element of the allocated \code{psSource} structure.  The input
-\code{peak} is also added to the \code{psSource} element, which is
+coordinates.  The resulting sky is applied to the \code{pmMoments}
+element of the allocated \code{pmSource} structure.  The input
+\code{peak} is also added to the \code{pmSource} element, which is
 returned.
 
 \begin{verbatim}
-psSource *pmSourceMoments(psSource *source, const psImage *image, float radius), 
+pmSource *pmSourceMoments(pmSource *source, const psImage *image, float radius), 
 \end{verbatim}
 
@@ -1271,5 +1288,5 @@
 
 \begin{verbatim}
-psSource *pmSourceRoughClass(psSource *source, float saturate, float SNlim, const psRegion *valid);
+pmSource *pmSourceRoughClass(pmSource *source, float saturate, float SNlim, const psRegion *valid);
 \end{verbatim}
 
@@ -1303,5 +1320,5 @@
 
 \begin{verbatim}
-bool pmSourceSetPixelsCircle(psSource *source, const psImage *image, float radius);
+bool pmSourceSetPixelsCircle(pmSource *source, const psImage *image, float radius);
 \end{verbatim}
 
@@ -1314,5 +1331,5 @@
 
 \begin{verbatim}
-bool pmSourceModelGuess(psSource *source, const psImage *image);
+bool pmSourceModelGuess(pmSource *source, const psImage *image);
 \end{verbatim}
 
@@ -1323,9 +1340,9 @@
 
 \begin{verbatim}
-psArray *pmSourceContour(const psSource *source, const psImage *image, float level, int mode);
+psArray *pmSourceContour(const pmSource *source, const psImage *image, float level, int mode);
 \end{verbatim}
 
 Find points in a contour for the given source at the given level.  If
-mode is \code{PS_CONTOUR_CRUDE}, the contour is found by starting at
+mode is \code{PM_CONTOUR_CRUDE}, the contour is found by starting at
 the source peak, running along each pixel row until the level is
 crossed, then interpolating to the level coordinate for that row.
@@ -1339,5 +1356,5 @@
 
 \begin{verbatim}
-bool pmSourceFitModel(psSource *source, psImage *image);
+bool pmSourceFitModel(pmSource *source, psImage *image);
 \end{verbatim}
 
@@ -1350,5 +1367,5 @@
 
 \begin{verbatim}
-bool pmSourceAddModel(psImage *image, psSource *source, bool center);
+bool pmSourceAddModel(psImage *image, pmSource *source, bool center);
 \end{verbatim}
 
@@ -1360,5 +1377,5 @@
 
 \begin{verbatim}
-bool pmSourceSubModel(psSource *source);
+bool pmSourceSubModel(pmSource *source);
 \end{verbatim}
 
@@ -1388,5 +1405,5 @@
 
 \begin{verbatim}
-float psMinLM_PseudoGauss2D(psVector *deriv, psVector *params, psVector *x);
+float pmMinLM_PseudoGauss2D(psVector *deriv, psVector *params, psVector *x);
 \end{verbatim}
 
