Index: trunk/psphot/src/psphotStackReadout.c
===================================================================
--- trunk/psphot/src/psphotStackReadout.c	(revision 36124)
+++ trunk/psphot/src/psphotStackReadout.c	(revision 36375)
@@ -124,19 +124,4 @@
 	return psphotReadoutCleanup (config, view, STACK_RAW);
     }
-
-// XXX TEST for background:
-    if (!psphotModelBackground (config, view, STACK_RAW)) {
-	return psphotReadoutCleanup (config, view, STACK_RAW);
-    }
-    if (!psphotSubtractBackground (config, view, STACK_RAW)) {
-	return psphotReadoutCleanup (config, view, STACK_RAW);
-    }
-    if (!psphotModelBackground (config, view, STACK_RAW)) {
-	return psphotReadoutCleanup (config, view, STACK_RAW);
-    }
-    if (!psphotSubtractBackground (config, view, STACK_RAW)) {
-	return psphotReadoutCleanup (config, view, STACK_RAW);
-    }
-// XXX TEST END 
 
 #ifdef MAKE_CHISQ_IMAGE
@@ -319,5 +304,5 @@
     psphotStackObjectsUnifyPosition (objects);
 
-    psphotStackObjectsSelectForAnalysis (config, view, STACK_RAW, objects);
+    // psphotStackObjectsSelectForAnalysis (config, view, STACK_RAW, objects);
 
     // final linear fit. NOTE: if splitLinearFit is true above, this pass will only fit
@@ -346,4 +331,7 @@
     // measure kron fluxes for the matched sources only
     psphotKronIterate(config, view, STACK_RAW, 3);
+
+    // decide which source(s) are to be fitted with the extended source analysis code.
+    psphotChooseAnalysisOptionsByObject (config, view, STACK_RAW, objects);
 
     // measure elliptical apertures, petrosians (objects sorted by S/N)
