Index: /trunk/psModules/src/pmObjects.c
===================================================================
--- /trunk/psModules/src/pmObjects.c	(revision 4200)
+++ /trunk/psModules/src/pmObjects.c	(revision 4201)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-09 00:59:53 $
+ *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-09 23:41:56 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -55,5 +55,5 @@
 }
 
-static void p_psModelFree(psModel *tmp)
+static void modelFree(psModel *tmp)
 {
     psFree(tmp->params);
@@ -64,5 +64,5 @@
 pmModelAlloc(): Allocate the psModel structure, along with its parameters,
 and initialize the type member.  Initialize the params to 0.0.
-XXX EAM: changing params and dparams to psVector 
+XXX EAM: changing params and dparams to psVector
 *****************************************************************************/
 psModel *pmModelAlloc(psModelType type)
@@ -107,5 +107,5 @@
     }
 
-    psMemSetDeallocator(tmp, (psFreeFcn) p_psModelFree);
+    psMemSetDeallocator(tmp, (psFreeFcn) modelFree);
     return(tmp);
 }
@@ -115,5 +115,5 @@
 We might need to increase the reference counter and decrease it here.
 *****************************************************************************/
-static void p_psSourceFree(psSource *tmp)
+static void sourceFree(psSource *tmp)
 {
     psFree(tmp->peak);
@@ -137,5 +137,5 @@
     tmp->models = NULL;
     tmp->type = 0;
-    psMemSetDeallocator(tmp, (psFreeFcn) p_psSourceFree);
+    psMemSetDeallocator(tmp, (psFreeFcn) sourceFree);
 
     return(tmp);
@@ -242,11 +242,11 @@
 
 /******************************************************************************
-p_psGetRowVectorFromImage(): a private function which simply returns a
+getRowVectorFromImage(): a private function which simply returns a
 psVector containing the specified row of data from the psImage.
  
 XXX: Is there a better way to do this?
 *****************************************************************************/
-psVector *p_psGetRowVectorFromImage(psImage *image,
-                                    psU32 row)
+static psVector *getRowVectorFromImage(psImage *image,
+                                       psU32 row)
 {
     PS_ASSERT_IMAGE_NON_NULL(image, NULL);
@@ -261,15 +261,15 @@
 
 /******************************************************************************
-MyListAddPeak(): A private function which allocates a psArray, if the list
+myListAddPeak(): A private function which allocates a psArray, if the list
 argument is NULL, otherwise it adds the peak to that list.
-XXX EAM : changed the output to psArray 
-XXX EAM : Switched row, col args 
+XXX EAM : changed the output to psArray
+XXX EAM : Switched row, col args
 XXX EAM : NOTE: this was changed in the call, so the new code is consistent
 *****************************************************************************/
-psArray *MyListAddPeak(psArray *list,
-                       psS32 row,
-                       psS32 col,
-                       psF32 counts,
-                       psPeakType type)
+static psArray *myListAddPeak(psArray *list,
+                              psS32 row,
+                              psS32 col,
+                              psF32 counts,
+                              psPeakType type)
 {
     psPeak *tmpPeak = pmPeakAlloc(col, row, counts, type);
@@ -320,5 +320,5 @@
     //
     row = 0;
-    tmpRow = p_psGetRowVectorFromImage((psImage *) image, row);
+    tmpRow = getRowVectorFromImage((psImage *) image, row);
     psVector *row1 = pmFindVectorPeaks(tmpRow, threshold);
 
@@ -334,5 +334,5 @@
 
                 if (image->data.F32[row][col] > threshold) {
-                    list = MyListAddPeak(list, row, col, image->data.F32[row][col], PM_PEAK_EDGE);
+                    list = myListAddPeak(list, row, col, image->data.F32[row][col], PM_PEAK_EDGE);
                 }
             }
@@ -344,5 +344,5 @@
                     (image->data.F32[row][col] >= image->data.F32[row+1][col+1])) {
                 if (image->data.F32[row][col] > threshold) {
-                    list = MyListAddPeak(list, row, col, image->data.F32[row][col], PM_PEAK_EDGE);
+                    list = myListAddPeak(list, row, col, image->data.F32[row][col], PM_PEAK_EDGE);
                 }
             }
@@ -353,5 +353,5 @@
                     (image->data.F32[row][col] >= image->data.F32[row+1][col-1])) {
                 if (image->data.F32[row][col] > threshold) {
-                    list = MyListAddPeak(list, row, col, image->data.F32[row][col], PM_PEAK_EDGE);
+                    list = myListAddPeak(list, row, col, image->data.F32[row][col], PM_PEAK_EDGE);
                 }
             }
@@ -373,5 +373,5 @@
     //
     for (row = 1 ; row < (image->numRows - 1) ; row++) {
-        tmpRow = p_psGetRowVectorFromImage((psImage *) image, row);
+        tmpRow = getRowVectorFromImage((psImage *) image, row);
         row1 = pmFindVectorPeaks(tmpRow, threshold);
 
@@ -389,5 +389,5 @@
                         (image->data.F32[row][col] >= image->data.F32[row+1][col+1])) {
                     myType = PM_PEAK_EDGE;
-                    list = MyListAddPeak(list, row, col, image->data.F32[row][col], myType);
+                    list = myListAddPeak(list, row, col, image->data.F32[row][col], myType);
                 }
             } else if (col < (image->numCols - 1)) {
@@ -424,5 +424,5 @@
                         }
 
-                        list = MyListAddPeak(list, row, col, image->data.F32[row][col], myType);
+                        list = myListAddPeak(list, row, col, image->data.F32[row][col], myType);
                     }
                 }
@@ -436,5 +436,5 @@
                         (image->data.F32[row][col] >= image->data.F32[row+1][col])) {
                     myType = PM_PEAK_EDGE;
-                    list = MyListAddPeak(list, row, col, image->data.F32[row][col], myType);
+                    list = myListAddPeak(list, row, col, image->data.F32[row][col], myType);
                 }
             } else {
@@ -449,5 +449,5 @@
     //
     row = image->numRows - 1;
-    tmpRow = p_psGetRowVectorFromImage((psImage *) image, row);
+    tmpRow = getRowVectorFromImage((psImage *) image, row);
     row1 = pmFindVectorPeaks(tmpRow, threshold);
     for (psU32 i = 0 ; i < row1->n ; i++ ) {
@@ -458,5 +458,5 @@
                     (image->data.F32[row][col] >  image->data.F32[row][col+1])) {
                 if (image->data.F32[row][col] > threshold) {
-                    list = MyListAddPeak(list, row, col, image->data.F32[row][col], PM_PEAK_EDGE);
+                    list = myListAddPeak(list, row, col, image->data.F32[row][col], PM_PEAK_EDGE);
                 }
             }
@@ -468,5 +468,5 @@
                     (image->data.F32[row][col] >= image->data.F32[row][col+1])) {
                 if (image->data.F32[row][col] > threshold) {
-                    list = MyListAddPeak(list, row, col, image->data.F32[row][col], PM_PEAK_EDGE);
+                    list = myListAddPeak(list, row, col, image->data.F32[row][col], PM_PEAK_EDGE);
                 }
             }
@@ -477,5 +477,5 @@
                     (image->data.F32[row][col] >  image->data.F32[row][col-1])) {
                 if (image->data.F32[row][col] > threshold) {
-                    list = MyListAddPeak(list, row, col, image->data.F32[row][col], PM_PEAK_EDGE);
+                    list = myListAddPeak(list, row, col, image->data.F32[row][col], PM_PEAK_EDGE);
                 }
             }
@@ -488,7 +488,7 @@
 
 // XXX: Macro this.
-bool IsItInThisRegion(const psRegion *valid,
-                      psS32 x,
-                      psS32 y)
+static bool isItInThisRegion(const psRegion *valid,
+                             psS32 x,
+                             psS32 y)
 {
 
@@ -529,5 +529,5 @@
         if ((tmpPeak->counts > maxValue) ||
                 ((valid != NULL) &&
-                 (true == IsItInThisRegion(valid, tmpPeak->x, tmpPeak->y)))) {
+                 (true == isItInThisRegion(valid, tmpPeak->x, tmpPeak->y)))) {
             psListRemoveData(peaks, (psPtr) tmpPeak);
         }
@@ -556,5 +556,5 @@
             continue;
         if (valid != NULL) {
-            if (IsItInThisRegion(valid, tmpPeak->x, tmpPeak->y))
+            if (isItInThisRegion(valid, tmpPeak->x, tmpPeak->y))
                 continue;
         }
@@ -740,13 +740,13 @@
 
 /******************************************************************************
-bool CheckRadius(*peak, radius, x, y): private function which simply
+bool checkRadius(*peak, radius, x, y): private function which simply
 determines if the (x, y) point is within the radius of the specified peak.
  
 XXX: macro this for performance.
 *****************************************************************************/
-bool CheckRadius(psPeak *peak,
-                 psF32 radius,
-                 psS32 x,
-                 psS32 y)
+static bool checkRadius(psPeak *peak,
+                        psF32 radius,
+                        psS32 x,
+                        psS32 y)
 {
     if (PS_SQR(radius) >= (psF32) (PS_SQR(x - peak->x) + PS_SQR(y - peak->y))) {
@@ -758,5 +758,5 @@
 
 /******************************************************************************
-bool CheckRadius2(): private function which simply determines if the (x, y)
+bool checkRadius2(): private function which simply determines if the (x, y)
 point is within the radius of the specified peak.
  
@@ -764,9 +764,9 @@
 XXX: this is rather inefficient - at least compute and compare against radius^2
 *****************************************************************************/
-bool CheckRadius2(psF32 xCenter,
-                  psF32 yCenter,
-                  psF32 radius,
-                  psF32 x,
-                  psF32 y)
+static bool checkRadius2(psF32 xCenter,
+                         psF32 yCenter,
+                         psF32 radius,
+                         psF32 x,
+                         psF32 y)
 {
     /// XXX EAM should compare with hypot (x,y) for speed
@@ -840,5 +840,5 @@
                 psS32 imgColCoord = col + source->pixels->col0;
                 psS32 imgRowCoord = row + source->pixels->row0;
-                if (CheckRadius(source->peak,
+                if (checkRadius(source->peak,
                                 radius,
                                 imgColCoord,
@@ -896,5 +896,5 @@
                 psS32 imgColCoord = col + source->pixels->col0;
                 psS32 imgRowCoord = row + source->pixels->row0;
-                if (CheckRadius(source->peak,
+                if (checkRadius(source->peak,
                                 radius,
                                 imgColCoord,
@@ -1276,5 +1276,5 @@
         for (psS32 col = 0 ; col < source->mask->numCols; col++) {
 
-            if (CheckRadius2((psF32) radiusS32,
+            if (checkRadius2((psF32) radiusS32,
                              (psF32) radiusS32,
                              radius,
@@ -1567,5 +1567,5 @@
 routine returns a psArray of coordinates that evaluate to the specified level.
  
-XXX: Probably should remove the "image" argument. 
+XXX: Probably should remove the "image" argument.
 XXX: What type should the output coordinate vectors consist of?  col,row?
 XXX: Why a pmArray output?
@@ -1668,10 +1668,12 @@
 }
 
-psVector *p_pmMinLM_Gauss2D_Vec(psImage *deriv, psVector *params, psArray *x);
-psVector *p_pmMinLM_PsuedoGauss2D_Vec(psImage *deriv, psVector *params, psArray *x);
-psVector *p_pmMinLM_Wauss2D_Vec(psImage *deriv, psVector *params, psArray *x);
-psVector *p_pmMinLM_TwistGauss2D_Vec(psImage *deriv, psVector *params, psArray *x);
-psVector *p_pmMinLM_Sersic_Vec(psImage *deriv, psVector *params, psArray *x);
-psVector *p_pmMinLM_SersicCore_Vec(psImage *deriv, psVector *params, psArray *x);
+#if 0
+static psVector *minLM_Gauss2D_Vec(psImage *deriv, psVector *params, psArray *x);
+static psVector *minLM_PsuedoGauss2D_Vec(psImage *deriv, psVector *params, psArray *x);
+static psVector *minLM_Wauss2D_Vec(psImage *deriv, psVector *params, psArray *x);
+static psVector *minLM_TwistGauss2D_Vec(psImage *deriv, psVector *params, psArray *x);
+static psVector *minLM_Sersic_Vec(psImage *deriv, psVector *params, psArray *x);
+static psVector *minLM_SersicCore_Vec(psImage *deriv, psVector *params, psArray *x);
+#endif
 
 // XXX EAM : these are better starting values, but should be available from metadata?
@@ -1683,5 +1685,5 @@
  
 XXX: should there be a mask value?
-XXX: Probably should remove the "image" argument. 
+XXX: Probably should remove the "image" argument.
 *****************************************************************************/
 bool pmSourceFitModel(psSource *source,
@@ -1772,8 +1774,8 @@
 }
 
-bool p_pmSourceAddOrSubModel(psImage *image,
-                             psSource *src,
-                             bool center,
-                             psS32 flag)
+static bool sourceAddOrSubModel(psImage *image,
+                                psSource *src,
+                                bool center,
+                                psS32 flag)
 {
     PS_ASSERT_PTR_NON_NULL(src, false);
@@ -1847,5 +1849,5 @@
                       bool center)
 {
-    return(p_pmSourceAddOrSubModel(image, src, center, 0));
+    return(sourceAddOrSubModel(image, src, center, 0));
 }
 
@@ -1856,5 +1858,5 @@
                       bool center)
 {
-    return(p_pmSourceAddOrSubModel(image, src, center, 1));
+    return(sourceAddOrSubModel(image, src, center, 1));
 }
 
@@ -1874,6 +1876,6 @@
  
    the argument "x" contains a single "x,y" coordinate pair.  The function computes the object
-   model, based on the parameters in "params" at the x,y point specified by *x, and returns the value.  
-   The derivatives are also caculated and returned in the "deriv" argument.  parameter error checking is 
+   model, based on the parameters in "params" at the x,y point specified by *x, and returns the value.
+   The derivatives are also caculated and returned in the "deriv" argument.  parameter error checking is
    skipped because speed is most important.
 **/
Index: /trunk/psModules/test/.cvsignore
===================================================================
--- /trunk/psModules/test/.cvsignore	(revision 4200)
+++ /trunk/psModules/test/.cvsignore	(revision 4201)
@@ -11,3 +11,3 @@
 tst_pmReadoutCombine
 tst_pmSubtractSky
-
+tst_pmImageSubtract
