Index: /trunk/Ohana/src/relphot/src/setMrelFinal.c
===================================================================
--- /trunk/Ohana/src/relphot/src/setMrelFinal.c	(revision 38473)
+++ /trunk/Ohana/src/relphot/src/setMrelFinal.c	(revision 38474)
@@ -8,5 +8,4 @@
 
   off_t i;
-  int ecode;
 
   int Nsecfilt = GetPhotcodeNsecfilt ();
@@ -38,12 +37,15 @@
     //   ID_SECF_OBJ_EXT; // average measured at pass 3
     
-    int Ns;
-    for (Ns = 0; Ns < Nphotcodes; Ns++) {
-	
-      int thisCode = photcodes[Ns][0].code;
-      int Nsec = GetPhotcodeNsec(thisCode);
-
-      for (i = 0; i < catalog[0].Naverage; i++) {
-	off_t N = Nsecfilt*i+Nsec;
+    // XXX I should really deprecate the concept of applying the average 
+    // calculation to a limited set of photcodes.  
+    // for now, just do all photcodes here (
+    // as it stands, only stacks are limited by photcode; mean exp and forced warp 
+    // are applied to all Nsecfilt
+
+    for (i = 0; i < catalog[0].Naverage; i++) {
+      int Ns;
+      for (Ns = 0; Ns < Nsecfilt; Ns++) {
+	
+	off_t N = Nsecfilt*i+Ns;
 	dvo_secfilt_init (&catalog[0].secfilt[N], SECFILT_RESET_ALL);
 
@@ -52,8 +54,4 @@
 	for (j = 0; j < catalog[0].average[i].Nmeasure; j++, m++) {
 	
-	  // skip measurements that do not match the current photcode
-	  ecode = GetPhotcodeEquivCodebyCode (catalog[0].measure[m].photcode);
-	  if (ecode != thisCode) { continue; }
-
 	  /* select measurements by time */
 	  if (TimeSelect) {
