Index: trunk/psModules/src/detrend/pmMaskBadPixels.c
===================================================================
--- trunk/psModules/src/detrend/pmMaskBadPixels.c	(revision 6910)
+++ trunk/psModules/src/detrend/pmMaskBadPixels.c	(revision 7283)
@@ -1,7 +1,2 @@
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// XXX WARNING: I have completely replaced this file with an OLD VERSION (that works) instead of the
-// one that was being worked on.
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
 /** @file  pmMaskBadPixels.c
  *
@@ -24,6 +19,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-04-19 20:37:35 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-02 02:16:05 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -34,8 +29,9 @@
 #endif
 
-#include<stdio.h>
-#include<math.h>
-#include<strings.h>
+#include <stdio.h>
+#include <math.h>
+#include <strings.h>
 
+#include "pmFPAMaskWeight.h"
 #include "pmMaskBadPixels.h"
 #include "pmMaskBadPixelsErrors.h"
@@ -148,8 +144,8 @@
             /* Pixels which satisfy growVal and within the grow radius shall be masked */                    \
             if(mask->data.PS_TYPE_MASK_DATA[j][i] & growVal) {                                               \
-                rowMin = PS_MAX(j-grow, 0);                                                                     \
-                rowMax = PS_MIN(j+grow+1, inImage->numRows);                                                    \
-                colMin = PS_MAX(i-grow, 0);                                                                     \
-                colMax = PS_MIN(i+grow+1, inImage->numCols);                                                    \
+                rowMin = PS_MAX(j-grow, 0);                                                                  \
+                rowMax = PS_MIN(j+grow+1, inImage->numRows);                                                 \
+                colMin = PS_MAX(i-grow, 0);                                                                  \
+                colMax = PS_MIN(i+grow+1, inImage->numCols);                                                 \
                 for(jj=rowMin; jj<rowMax; jj++) {                                                            \
                     for(ii=colMin; ii<colMax; ii++) {                                                        \
