Index: trunk/psModules/src/objects/pmSource.c
===================================================================
--- trunk/psModules/src/objects/pmSource.c	(revision 19848)
+++ trunk/psModules/src/objects/pmSource.c	(revision 19879)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-10-02 20:51:29 $
+ *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-10-03 20:59:16 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -330,11 +330,11 @@
 
             // Sx,Sy are limited at 0.  a peak at 0,0 is artificial
-            if (fabs(tmpSrc->moments->Sx) < 0.05)
-                continue;
-            if (fabs(tmpSrc->moments->Sy) < 0.05)
-                continue;
-            if ((tmpSrc->moments->Sx / tmpSrc->moments->Sy) > AR_MAX)
-                continue;
-            if ((tmpSrc->moments->Sx / tmpSrc->moments->Sy) < AR_MIN)
+            if (fabs(tmpSrc->moments->Mxx) < 0.05)
+                continue;
+            if (fabs(tmpSrc->moments->Myy) < 0.05)
+                continue;
+            if ((tmpSrc->moments->Mxx / tmpSrc->moments->Myy) > AR_MAX)
+                continue;
+            if ((tmpSrc->moments->Mxx / tmpSrc->moments->Myy) < AR_MIN)
                 continue;
             if (tmpSrc->mode & PM_SOURCE_MODE_BLEND)
@@ -342,5 +342,5 @@
 
             // for the moment, force splane dimensions to be 10x10 image pix
-            binX = tmpSrc->moments->Sx/SCALE;
+            binX = tmpSrc->moments->Mxx/SCALE;
             if (binX < 0)
                 continue;
@@ -348,5 +348,5 @@
                 continue;
 
-            binY = tmpSrc->moments->Sy/SCALE;
+            binY = tmpSrc->moments->Myy/SCALE;
             if (binY < 0)
                 continue;
@@ -427,14 +427,14 @@
                 continue;
 
-            if (tmpSrc->moments->Sx < minSx)
-                continue;
-            if (tmpSrc->moments->Sx > maxSx)
-                continue;
-            if (tmpSrc->moments->Sy < minSy)
-                continue;
-            if (tmpSrc->moments->Sy > maxSy)
-                continue;
-            tmpSx->data.F32[tmpSx->n] = tmpSrc->moments->Sx;
-            tmpSy->data.F32[tmpSy->n] = tmpSrc->moments->Sy;
+            if (tmpSrc->moments->Mxx < minSx)
+                continue;
+            if (tmpSrc->moments->Mxx > maxSx)
+                continue;
+            if (tmpSrc->moments->Myy < minSy)
+                continue;
+            if (tmpSrc->moments->Myy > maxSy)
+                continue;
+            tmpSx->data.F32[tmpSx->n] = tmpSrc->moments->Mxx;
+            tmpSy->data.F32[tmpSy->n] = tmpSrc->moments->Myy;
             tmpSx->n++;
             tmpSy->n++;
@@ -519,6 +519,6 @@
         }
 
-        psF32 sigX = source->moments->Sx;
-        psF32 sigY = source->moments->Sy;
+        psF32 sigX = source->moments->Mxx;
+        psF32 sigY = source->moments->Myy;
 
         // XXX EAM : can we use the value of SATURATE if mask is NULL?
@@ -635,4 +635,6 @@
 # define VALID_RADIUS(X,Y,RAD2) (((RAD2) >= (PS_SQR(X) + PS_SQR(Y))) ? 1 : 0)
 
+/*** this been moved to pmSourceMoments.c ***/
+# if (0)
 bool pmSourceMoments(pmSource *source,
                      psF32 radius)
@@ -774,9 +776,9 @@
     }
 
-    source->moments->x = x + xPeak;
-    source->moments->y = y + yPeak;
+    source->moments->Mx = x + xPeak;
+    source->moments->My = y + yPeak;
 
     // XXX EAM : Sxy needs to have x*y subtracted
-    source->moments->Sxy = XY/Sum - x*y;
+    source->moments->Mxy = XY/Sum - x*y;
     source->moments->Sum = Sum;
     source->moments->SN  = Sum / sqrt(Var);
@@ -786,18 +788,18 @@
     // XXX EAM : these values can be negative, so we need to limit the range
     // XXX EAM : make the use of this consistent: should this be the second moment or sqrt?
-    // source->moments->Sx = sqrt(PS_MAX(X2/Sum - PS_SQR(x), 0));
-    // source->moments->Sy = sqrt(PS_MAX(Y2/Sum - PS_SQR(y), 0));
-    source->moments->Sx = PS_MAX(X2/Sum - PS_SQR(x), 0);
-    source->moments->Sy = PS_MAX(Y2/Sum - PS_SQR(y), 0);
+    // source->moments->Mxx = sqrt(PS_MAX(X2/Sum - PS_SQR(x), 0));
+    // source->moments->Myy = sqrt(PS_MAX(Y2/Sum - PS_SQR(y), 0));
+    source->moments->Mxx = PS_MAX(X2/Sum - PS_SQR(x), 0);
+    source->moments->Myy = PS_MAX(Y2/Sum - PS_SQR(y), 0);
 
     psTrace ("psModules.objects", 4,
-             "sky: %f  Sum: %f  x: %f  y: %f  Sx: %f  Sy: %f  Sxy: %f\n",
-             sky, Sum, source->moments->x, source->moments->y,
-             source->moments->Sx, source->moments->Sy, source->moments->Sxy);
+             "sky: %f  Sum: %f  Mx: %f  My: %f  Mxx: %f  Myy: %f  Mxy: %f\n",
+             sky, Sum, source->moments->Mx, source->moments->My,
+             source->moments->Mxx, source->moments->Myy, source->moments->Mxy);
 
     psTrace("psModules.objects", 5, "---- end ----\n");
     return(true);
 }
-
+# endif
 // construct a realization of the source model
 bool pmSourceCacheModel (pmSource *source, psMaskType maskVal) {
