Index: trunk/Ohana/src/addstar/src/mkcmf.c
===================================================================
--- trunk/Ohana/src/addstar/src/mkcmf.c	(revision 38909)
+++ trunk/Ohana/src/addstar/src/mkcmf.c	(revision 38920)
@@ -1103,4 +1103,12 @@
   float flux, fSN;
 
+  // We want some fraction of the stars to have zero psfqfperfect so that we can test the 
+  // ForcedWarpMasked table construction, but we don't want things to be random so we
+  // change every Nstars / modulo to zero
+  int modulo = 0;
+  if (BAD_PSFQF_FRAC > 0) {
+    modulo = (int) (1.0 / BAD_PSFQF_FRAC);
+  }
+
   // XXX add gaussian-distributed noise based on counts
   // this needs to make different output 'stars' entries depending on the desired type
@@ -1154,7 +1162,6 @@
     stars[i].fwhmMin   = FY*2.8;
 
-    // randomly give poor PSFQF values
-    if ((BAD_PSFQF_FRAC > 0.0) && (drand48() < BAD_PSFQF_FRAC)) {
-      stars[i].psfQF     = 0.25;
+    if (modulo && ((i+1) % modulo == 0)) {
+      stars[i].psfQF     = 0.0;
       stars[i].psfQFperf = 0.0;
     } else {
