Index: /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_catalog_setphot.c
===================================================================
--- /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_catalog_setphot.c	(revision 33550)
+++ /branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_catalog_setphot.c	(revision 33551)
@@ -4,4 +4,7 @@
 
   off_t i, j, found;
+
+  // if we are resetting, reset all flags
+  DVOMeasureFlags photomFlags = ID_MEAS_POOR_PHOTOM | ID_MEAS_SKIP_PHOTOM | ID_MEAS_PHOTOM_UBERCAL;
 
   found = 0;    
@@ -28,4 +31,8 @@
       myAssert(isfinite(catalog[0].measure[m].Mcal), "oops: ubercal made a nan");
 
+      if (RESET) {
+	catalog[0].measure[m].dbFlags &= ~photomFlags;
+      }
+
       // if we are setting the zero points from an UBERCAL database, and this detection is from one of those images,
       // then tag the measurement as well
