Index: /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/StarOps.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/StarOps.c	(revision 34069)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/StarOps.c	(revision 34070)
@@ -354,4 +354,5 @@
       int Next = 0;
       int haveSynth = FALSE;
+      int haveStack = FALSE;
 
       int forceSynth = FALSE;
@@ -413,4 +414,10 @@
 	    }
 	  }
+	  // gpc1 stack data
+	  if ((catalog[Nc].measure[m].photcode >= 11000) && (catalog[Nc].measure[m].photcode <= 11400)) {
+	    if (pass < 2) continue;
+	    haveStack = TRUE;
+	  }
+
 	  // count extended detections for 2MASS (XXX NOTE hardwired photcodes 2011, 2012, 2013)
 	  if ((catalog[Nc].measure[m].photcode >= 2011) && (catalog[Nc].measure[m].photcode <= 2013)) {
@@ -494,4 +501,8 @@
       int Nminmeas = isSetMrelFinal ? 1 : STAR_TOOFEW + 1;
 
+      if (haveStack && (N > 1)) {
+	fprintf (stderr, "multiple stack values for %10.6f %10.6f\n", catalog[Nc].averageT[j].R, catalog[Nc].averageT[j].D);
+      }
+
       // when performing the grid analysis, STAR_TOOFEW should be set to 1;
       if (N < Nminmeas) { /* too few measurements */
Index: /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/setMrelFinal.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/setMrelFinal.c	(revision 34069)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/setMrelFinal.c	(revision 34070)
@@ -166,8 +166,8 @@
 
   /* allow measures from images marked POOR and FEW */
-  if (pass >= 2) IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL;
+  if (pass >= 3) IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL;
   
   /* allow measures marked as outliers (POOR) and off image region (AREA) */
-  if (pass >= 2) {
+  if (pass >= 3) {
     MEAS_BAD = ID_MEAS_NOCAL | ID_MEAS_SKIP_PHOTOM;
   } else {
@@ -233,5 +233,5 @@
 	}
 
-	// PASS 3 : accept bad measurements (eg, SAT, CR)
+	// PASS 3 : accept bad measurements (eg, SAT, CR), internal outliers
 	if (pass < 3) {
 	  if (catalog[0].measure[m].photFlags & code->photomBadMask) goto skip;
@@ -241,5 +241,5 @@
 	}
 	
-	// PASS 2 : internal outliers accepted
+	// PASS 2 : accept stack measurements
 
 	// PASS 1 : accept poor measurements as well (eg, POOR FIT, etc)
