Index: /branches/eam_branches/ipp-20130509/Ohana/src/relphot/src/setMrelCatalog.c
===================================================================
--- /branches/eam_branches/ipp-20130509/Ohana/src/relphot/src/setMrelCatalog.c	(revision 35717)
+++ /branches/eam_branches/ipp-20130509/Ohana/src/relphot/src/setMrelCatalog.c	(revision 35718)
@@ -110,4 +110,5 @@
     if (!isSetMrelFinal && (secfilt[Nsec].flags & STAR_BAD)) continue;
 
+    int NexpPS1 = 0;
     int Ncode = 0;
     int Next = 0;
@@ -132,4 +133,9 @@
       if (code->equiv != thisCode) { continue; }
       Ncode ++;
+
+      // are we a PS1 exposure photcode?
+      if ((measure[k].photcode >= 10000) && (measure[k].photcode <= 10500)) {
+	NexpPS1 ++;
+      }
 
       if (measureT[k].dbFlags & MEAS_BAD) SKIP_THIS_MEAS(Nbad); 
@@ -272,4 +278,13 @@
     int Nminmeas = isSetMrelFinal ? 1 : STAR_TOOFEW + 1;
 
+    // XXX : ugh : another hard-wired photcode entry...
+    if (isSetMrelFinal && (pass == 0)) {
+      if ((thisCode < 6) || (thisCode == 9)) {
+	secfilt[Nsec].Ncode = NexpPS1;
+      } else {
+	secfilt[Nsec].Ncode = Ncode; // 2MASS data if it exists
+      }
+    }
+
     // when performing the grid analysis, STAR_TOOFEW should be set to 1;
     if (N < Nminmeas) { /* too few measurements */
