Index: /branches/sj_branches/sj_ippTests_branch_20080929/ippTests/compIPPphoto.py
===================================================================
--- /branches/sj_branches/sj_ippTests_branch_20080929/ippTests/compIPPphoto.py	(revision 25085)
+++ /branches/sj_branches/sj_ippTests_branch_20080929/ippTests/compIPPphoto.py	(revision 25086)
@@ -619,5 +619,5 @@
 def goodValBool(col):
     """Return a bool array that contains True where
-    col1 doesn't have  NaNs nor SDSS "no-value" and
+    col doesn't have  NaNs nor SDSS "no-value" and
     "no-error" flags -9999 and -1000."""
     from numpy import isfinite,array
@@ -632,23 +632,8 @@
     "no-error" flags -9999 and -1000 filtered out."""
     from numpy import isfinite,logical_and,array
-    goodcondition = isfinite(col1) & isfinite(col2)
-    for val in [-9999,-1000]:
-        goodcondition &= (col1 != val)
-        goodcondition &= (col2 != val)
+    goodcondition = goodValBool(col1) & goodValBool(col2)
     col1 = col1[goodcondition]
-    # For some reason, the following line used to be
-    # col2_good = col2[goodcondition]
-    # which looks like an error
     col2 = col2[goodcondition]
     return col1,col2
-    #
-    #... so I'm doing this:
-    good1_l = []
-    good2_l = []
-    for v1,v2 in zip(col1,col2):
-        if isfinite(v1) and isfinite(v2) and v1 not in [-9999,-1000] and v2 not in [-9999,-1000]:
-            good1_l.append(v1)
-            good2_l.append(v2)
-    return array(good1_l),array(good2_l)
     
 def filterGoodVal3(col1,col2,col3):
@@ -656,21 +641,10 @@
     col1 and col2 have  NaNs and SDSS "no-value" and
     "no-error" flags -9999 and -1000 filtered out."""
-    from numpy import isfinite,array
-    #
-    #... so I'm doing this:
-    good1_l = []
-    good2_l = []
-    good3_l = []
-    for i in range(len(col1)):
-        v1 = col1[i]
-        v2 = col2[i]
-        v3 = col3[i]
-        if isfinite(v1) and isfinite(v2) and isfinite(v3) and \
-                v1 not in [-9999,-1000] and v2 not in [-9999,-1000] and \
-                v3 not in [-9999,-1000]:
-            good1_l.append(v1)
-            good2_l.append(v2)
-            good3_l.append(v3)
-    return array(good1_l),array(good2_l),array(good3_l)
+    from numpy import isfinite,logical_and,array
+    goodcondition = goodValBool(col1) & goodValBool(col2) & goodValBool(col3)
+    col1 = col1[goodcondition]
+    col2 = col2[goodcondition]
+    col3 = col3[goodcondition]
+    return col1,col2,col3
     
 def matchSdssPs1(SDSSfpObjc,PS1cmf,xoff=0.5,yoff=0.5,matchrad=0.7,skipMatch=False):
