Index: branches/eam_branches/ipp-20130419/pswarp/src/pswarp.h
===================================================================
--- branches/eam_branches/ipp-20130419/pswarp/src/pswarp.h	(revision 35536)
+++ branches/eam_branches/ipp-20130419/pswarp/src/pswarp.h	(revision 35537)
@@ -98,5 +98,5 @@
 bool pswarpLoopBackground (pmConfig *config, psMetadata *stats);
 psExit pswarpExitCode(psExit exitValue);
-bool pswarpTransformReadout (pmReadout *output, pmReadout *input, pmConfig *config);
+bool pswarpTransformReadout (pmReadout *output, pmReadout *input, pmConfig *config, bool backgroundWarp);
 bool pswarpTransformSources(pmReadout *output, pmReadout *input, pmConfig *config);
 
@@ -198,5 +198,5 @@
 bool pswarpLoadAstrometry (pmFPAfile *target, pmFPAfile *astrom, pmConfig *config);
 
-bool pswarpTransformToTarget (pmFPA *output, pmReadout *input, pmConfig *config);
+bool pswarpTransformToTarget (pmFPA *output, pmReadout *input, pmConfig *config, bool backgroundWarp);
 bool pswarpMakePSF (pmConfig *config, pmFPAfile *output, psMetadata *stats);
 bool pswarpUpdateStatistics (pmFPA *output, psMetadata *stats, pmFPA *input, pmFPA *astrom, pmConfig *config);
Index: branches/eam_branches/ipp-20130419/pswarp/src/pswarpLoop.c
===================================================================
--- branches/eam_branches/ipp-20130419/pswarp/src/pswarpLoop.c	(revision 35536)
+++ branches/eam_branches/ipp-20130419/pswarp/src/pswarpLoop.c	(revision 35537)
@@ -121,6 +121,5 @@
 		    }
 
-		    // psMetadataAddF32 (readout->analysis, PS_LIST_TAIL, "SET.VALUE", PS_META_REPLACE, "test", (i + 1)*1.0);
-		    pswarpTransformToTarget(output->fpa, readout, config);
+		    pswarpTransformToTarget(output->fpa, readout, config, false);
 		
 		    if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
@@ -169,5 +168,5 @@
 // once the output fpa elements have been built, loop over the fpa and generate stats
 // for each readout
-bool pswarpTransformToTarget (pmFPA *output, pmReadout *input, pmConfig *config)  {
+bool pswarpTransformToTarget (pmFPA *output, pmReadout *input, pmConfig *config, bool backgroundWarp)  {
 
     pmFPAview *view = pmFPAviewAlloc(0);
@@ -186,5 +185,5 @@
             pmReadout *readout;
             while ((readout = pmFPAviewNextReadout(view, output, 1)) != NULL) {
-		pswarpTransformReadout (readout, input, config);
+		pswarpTransformReadout (readout, input, config, backgroundWarp);
 	    }
 	}
Index: branches/eam_branches/ipp-20130419/pswarp/src/pswarpLoopBackground.c
===================================================================
--- branches/eam_branches/ipp-20130419/pswarp/src/pswarpLoopBackground.c	(revision 35536)
+++ branches/eam_branches/ipp-20130419/pswarp/src/pswarpLoopBackground.c	(revision 35537)
@@ -142,9 +142,5 @@
 		
 		    // transform the actual BKGMODEL pixels from readout to output
-		    // XXX replace the use of this temporary metadata item with an argument?
-		    // XXX move the source transform out of pswarpTransformReadout?
-		    psMetadataAddBool(config->arguments,PS_LIST_TAIL, "BACKGROUND_WARPING", PS_META_REPLACE, "", true);
-		    pswarpTransformToTarget (output->fpa, readout, config);
-		    psMetadataAddBool(config->arguments,PS_LIST_TAIL, "BACKGROUND_WARPING", PS_META_REPLACE, "", false);
+		    pswarpTransformToTarget (output->fpa, readout, config, true);
 
 		    if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) { // Readout
Index: branches/eam_branches/ipp-20130419/pswarp/src/pswarpTransformReadout.c
===================================================================
--- branches/eam_branches/ipp-20130419/pswarp/src/pswarpTransformReadout.c	(revision 35536)
+++ branches/eam_branches/ipp-20130419/pswarp/src/pswarpTransformReadout.c	(revision 35537)
@@ -16,5 +16,5 @@
  * NOTE: in this function, the coordinates are transformed from the OUTPUT to the INPUT
  */
-bool pswarpTransformReadout(pmReadout *output, pmReadout *input, pmConfig *config)
+bool pswarpTransformReadout(pmReadout *output, pmReadout *input, pmConfig *config, bool backgroundWarp)
 {
     // XXX this implementation currently ignores the use of the region
@@ -47,6 +47,4 @@
     }
     psAssert(mdok, "MASK.INPUT was not defined");
-
-    bool backgroundWarp = psMetadataLookupBool(NULL,config->arguments,"BACKGROUND_WARPING");
 
     if (!input->covariance) {
@@ -208,11 +206,9 @@
     psFree(interp);
 
-    if (goodPixels > 0 && psMetadataLookupBool(&mdok, recipe, "SOURCES")) {
-      if (!psMetadataLookupBool(NULL,config->arguments,"BACKGROUND_WARPING")) {
-        if (!pswarpTransformSources(output, input, config)) {
-	  psError(psErrorCodeLast(), false, "Unable to interpolate image.");
-	  return false;
+    if (goodPixels > 0 && !backgroundWarp && psMetadataLookupBool(&mdok, recipe, "SOURCES")) {
+	if (!pswarpTransformSources(output, input, config)) {
+	    psError(psErrorCodeLast(), false, "Unable to transform sources.");
+	    return false;
         }
-      }
     }
 
