Index: /branches/pap_branch_20090108/ppStack/src/ppStackSources.c
===================================================================
--- /branches/pap_branch_20090108/ppStack/src/ppStackSources.c	(revision 21121)
+++ /branches/pap_branch_20090108/ppStack/src/ppStackSources.c	(revision 21122)
@@ -67,18 +67,5 @@
         pmCell *cell = pmFPAviewThisCell(view, file->fpa); // Cell of interest
 
-#if 1
-        // Excise bright sources that might be saturated
-        psArray *sources = sourceLists->data[i]; // Sources for image
-        for (int j = 0; j < sources->n; j++) {
-            pmSource *source = sources->data[j]; // Source of interest
-            if (source && source->psfMag < MIN_MAG) {
-                psFree(source);
-                sources->data[j] = NULL;
-            }
-        }
-#endif
-
-
-#if 0
+#ifdef TESTING
         pmReadout *fake = pmReadoutAlloc(NULL); // Fake readout
         pmPSF *psf = psMetadataLookupPtr(NULL, config->arguments, "PSF.TARGET"); // PSF for fake image
@@ -184,31 +171,6 @@
                 continue;
             }
-
-#if 1
-            float x = source->modelPSF->params->data.F32[PM_PAR_XPOS],
-                y = source->modelPSF->params->data.F32[PM_PAR_YPOS]; // Coordinates of source
-            if (x > 2187 && x < 2191 && y > 2280 && y < 2284) {
-                fprintf(stderr, "Image %d source: (%f,%f) %f --> %f\n",
-                        i, x, y, source->psfMag, source->psfMag + magCorr);
-            }
-#endif
-
             source->psfMag += magCorr;
         }
-
-#if 0
-// Size of fake image; set by hand because it's trouble to get it from other places
-        pmReadout *fake = pmReadoutAlloc(NULL); // Fake readout
-        pmPSF *psf = psMetadataLookupPtr(NULL, config->arguments, "PSF.TARGET"); // PSF for fake image
-        pmReadoutFakeFromSources(fake, FAKE_COLS, FAKE_ROWS, sources, NULL, NULL, psf, 5, 0, false, true);
-        psString name = NULL;
-        psStringAppend(&name, "corrected_%03d.fits", i);
-        psFits *fits = psFitsOpen(name, "w");
-        psFree(name);
-        psFitsWriteImage(fits, NULL, fake->image, 0, NULL);
-        psFitsClose(fits);
-        psFree(fake);
-#endif
-
     }
     psFree(trans);
