Index: trunk/pswarp/src/pswarpTransformReadout.c
===================================================================
--- trunk/pswarp/src/pswarpTransformReadout.c	(revision 18839)
+++ trunk/pswarp/src/pswarpTransformReadout.c	(revision 18884)
@@ -20,7 +20,7 @@
 
     // output mask bits
-    psMaskType maskIn   = psMetadataLookupU8(&mdok, recipe, "MASK.INPUT"); 
-    psMaskType maskPoor = pmConfigMaskGet("POOR.WARP", config); 
-    psMaskType maskBad  = pmConfigMaskGet("BAD.WARP", config); 
+    psMaskType maskIn   = psMetadataLookupU8(&mdok, recipe, "MASK.INPUT");
+    psMaskType maskPoor = pmConfigMaskGet("POOR.WARP", config);
+    psMaskType maskBad  = pmConfigMaskGet("BAD.WARP", config);
     psAssert (mdok, "MASK.INPUT was not defined");
 
@@ -29,5 +29,5 @@
 
     // Flux fraction for "poor"
-    float poorFrac = psMetadataLookupF32(NULL, config->arguments, "POOR.FRAC"); 
+    float poorFrac = psMetadataLookupF32(NULL, config->arguments, "POOR.FRAC");
 
     // pswarpMapGridFromImage builds a set of locally-linear maps which convert the
@@ -43,10 +43,10 @@
 
     if (input->weight && !output->weight) {
-	output->weight = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_F32);
-	psImageInit(output->weight, NAN);
+        output->weight = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_F32);
+        psImageInit(output->weight, NAN);
     }
     if ((input->mask || maskPoor || maskBad) && !output->mask) {
-	output->mask = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_MASK);
-	psImageInit(output->mask, maskBad);
+        output->mask = psImageAlloc(output->image->numCols, output->image->numRows, PS_TYPE_MASK);
+        psImageInit(output->mask, maskBad);
     }
 
@@ -56,34 +56,34 @@
     // create jobs and supply them to the threads
     for (int gridY = 0; gridY < grid->nYpts; gridY++) {
-	for (int gridX = 0; gridX < grid->nXpts; gridX++) {
+        for (int gridX = 0; gridX < grid->nXpts; gridX++) {
 
-	    pswarpTransformTileArgs *args = pswarpTransformTileArgsAlloc();
+            pswarpTransformTileArgs *args = pswarpTransformTileArgsAlloc();
 
-	    // these items are just views to the data; they are not freed with args
-	    args->input = input;
-	    args->output = output;
-	    args->grid = grid;
-	    args->interp = interp;
-	    args->region = region;
+            // these items are just views to the data; they are not freed with args
+            args->input = input;
+            args->output = output;
+            args->grid = grid;
+            args->interp = interp;
+            args->region = region;
 
-	    args->gridX = gridX;
-	    args->gridY = gridY;
-	    args->goodPixels = 0;
+            args->gridX = gridX;
+            args->gridY = gridY;
+            args->goodPixels = 0;
 
-	    // allocate a job
-	    psThreadJob *job = psThreadJobAlloc ("PSWARP_TRANSFORM_TILE");
+            // allocate a job
+            psThreadJob *job = psThreadJobAlloc ("PSWARP_TRANSFORM_TILE");
 
-	    // construct the arguments for this job
-	    // job is pswarpTransformTile (gridX, gridY);
-	    psArrayAdd (job->args, 1, args);
-	    // fprintf (stderr, "adding job %d,%d, Nargs: %ld\n", gridX, gridY, job->args->n);
+            // construct the arguments for this job
+            // job is pswarpTransformTile (gridX, gridY);
+            psArrayAdd (job->args, 1, args);
+            // fprintf (stderr, "adding job %d,%d, Nargs: %ld\n", gridX, gridY, job->args->n);
 
-	    // call: pswarpTransformTile (args);
-	    if (!psThreadJobAddPending (job)) {
-		psError(PS_ERR_UNKNOWN, false, "Unable to warp image.");
-		return false;
-	    }
-	    psFree (args);
-	}
+            // call: pswarpTransformTile (args);
+            if (!psThreadJobAddPending (job)) {
+                psError(PS_ERR_UNKNOWN, false, "Unable to warp image.");
+                return false;
+            }
+            psFree (args);
+        }
     }
 
@@ -91,8 +91,7 @@
     // wait here for the threaded jobs to finish
     if (!psThreadPoolWait ()) {
-	psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
-	return false;
+        psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
+        return false;
     }
-    fprintf (stderr, "success for threaded jobs\n");
 
     // each job records its own goodPixel values; sum them here
@@ -100,12 +99,12 @@
     psThreadJob *job = NULL;
     while ((job = psThreadJobGetDone()) != NULL) {
-	if (job->args->n < 1) {
-	    fprintf (stderr, "error with job\n");
-	} else {
-	    pswarpTransformTileArgs *args = job->args->data[0];
-	    // fprintf (stderr, "finished job %d,%d, Nargs: %ld\n", args->gridX, args->gridY, job->args->n);
-	    goodPixels += args->goodPixels;
-	}
-	psFree (job);
+        if (job->args->n < 1) {
+            fprintf (stderr, "error with job\n");
+        } else {
+            pswarpTransformTileArgs *args = job->args->data[0];
+            // fprintf (stderr, "finished job %d,%d, Nargs: %ld\n", args->gridX, args->gridY, job->args->n);
+            goodPixels += args->goodPixels;
+        }
+        psFree (job);
     }
     psFree(interp);
@@ -115,6 +114,6 @@
     // Store the variance factor and number of good pixels
     if (goodPixels > 0) {
-	// Variance factor: large factor --> small scale
-        float varFactor = psImageInterpolateVarianceFactor(input->image->numCols / 2.0 + input->image->col0, input->image->numRows / 2.0 + input->image->row0, interp); 
+        // Variance factor: large factor --> small scale
+        float varFactor = psImageInterpolateVarianceFactor(input->image->numCols / 2.0 + input->image->col0, input->image->numRows / 2.0 + input->image->row0, interp);
         psMetadataItem *vfItem = psMetadataLookup(output->analysis, PSWARP_ANALYSIS_VARFACTOR);
         if (vfItem) {
@@ -135,8 +134,8 @@
 
     if (goodPixels > 0) {
-	if (!pswarpTransformSources (output, input, config)) {
-	    psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
-	    return false;
-	}
+        if (!pswarpTransformSources (output, input, config)) {
+            psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
+            return false;
+        }
     }
 
