Index: trunk/psModules/src/camera/pmFPAMaskWeight.c
===================================================================
--- trunk/psModules/src/camera/pmFPAMaskWeight.c	(revision 20306)
+++ trunk/psModules/src/camera/pmFPAMaskWeight.c	(revision 20307)
@@ -453,6 +453,6 @@
     psImage *weight = readout->weight;  // Weight map
 
-    psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(mode, image, weight, mask, maskVal,
-                                                                       NAN, NAN, maskBad, maskPoor, poorFrac);
+    psImageInterpolation *interp = psImageInterpolationAlloc(mode, image, weight, mask, maskVal,
+                                                             NAN, NAN, maskBad, maskPoor, poorFrac, 0);
     interp->shifting = false;           // Turn off "exact shifts" so we get proper interpolation
 
Index: trunk/psModules/src/objects/pmModel.c
===================================================================
--- trunk/psModules/src/objects/pmModel.c	(revision 20306)
+++ trunk/psModules/src/objects/pmModel.c	(revision 20307)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-01-02 20:36:36 $
+ *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-10-22 02:11:08 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -222,7 +222,7 @@
     psImage *myRx = NULL;
     psImage *myRy = NULL;
-    psImageInterpolateOptions *Ro = NULL;
-    psImageInterpolateOptions *Rx = NULL;
-    psImageInterpolateOptions *Ry = NULL;
+    psImageInterpolation *Ro = NULL;
+    psImageInterpolation *Rx = NULL;
+    psImageInterpolation *Ry = NULL;
     if (model->residuals && (mode & (PM_MODEL_OP_RES0 | PM_MODEL_OP_RES1))) {
         // if the residual image and object image don't match,
@@ -274,7 +274,7 @@
         }
 
-        Ro = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR, myRo, NULL, mask, 0, 0.0, 0.0, 1, 0, 0.0);
-        Rx = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR, myRx, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0);
-        Ry = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR, myRy, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0);
+        Ro = psImageInterpolationAlloc(PS_INTERPOLATE_BILINEAR, myRo, NULL, mask, 0, 0.0, 0.0, 1, 0, 0.0, 0);
+        Rx = psImageInterpolationAlloc(PS_INTERPOLATE_BILINEAR, myRx, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0, 0);
+        Ry = psImageInterpolationAlloc(PS_INTERPOLATE_BILINEAR, myRy, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0, 0);
 
     }
Index: trunk/psModules/src/objects/pmSourcePhotometry.c
===================================================================
--- trunk/psModules/src/objects/pmSourcePhotometry.c	(revision 20306)
+++ trunk/psModules/src/objects/pmSourcePhotometry.c	(revision 20307)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA; GLG, MHPCC
  *
- *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-10-13 01:59:05 $
+ *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-10-22 02:11:08 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -122,13 +122,13 @@
     if (source->modelFits) {
       for (int i = 0; i < source->modelFits->n; i++) {
-	pmModel *model = source->modelFits->data[i];
-	status = pmSourcePhotometryModel (&model->mag, model);
+        pmModel *model = source->modelFits->data[i];
+        status = pmSourcePhotometryModel (&model->mag, model);
       }
       if (source->modelEXT) {
-	source->extMag = source->modelEXT->mag;
+        source->extMag = source->modelEXT->mag;
       }
     } else {
       if (source->modelEXT) {
-	status = pmSourcePhotometryModel (&source->extMag, source->modelEXT);
+        status = pmSourcePhotometryModel (&source->extMag, source->modelEXT);
       }
     }
@@ -177,5 +177,5 @@
 
         if (!psImageShiftMask(&flux, &mask, source->pixels, source->maskObj, maskVal, dx, dy,
-                              NAN, 0xff, PS_INTERPOLATE_BICUBE)) {
+                              NAN, 0xff, PS_INTERPOLATE_BIQUADRATIC)) {
             // Not much we can do about it
             psErrorClear();
@@ -256,6 +256,6 @@
         }
         if (mode & PM_SOURCE_PHOT_APCORR) {
-	    rflux   = pow (10.0, 0.4*source->psfMag);
-	    source->apMag -= PS_SQR(model->radiusFit)*rflux * psf->skyBias + psf->skySat / rflux;
+            rflux   = pow (10.0, 0.4*source->psfMag);
+            source->apMag -= PS_SQR(model->radiusFit)*rflux * psf->skyBias + psf->skySat / rflux;
         }
     }
@@ -333,5 +333,5 @@
     }
     if (apSum <= 0) {
-	*apMag = NAN;
+        *apMag = NAN;
         return true;
     }
Index: trunk/psphot/src/psphotMakeResiduals.c
===================================================================
--- trunk/psphot/src/psphotMakeResiduals.c	(revision 20306)
+++ trunk/psphot/src/psphotMakeResiduals.c	(revision 20307)
@@ -105,6 +105,6 @@
         // we will interpolate the image and weight - include the mask or not?
         // XXX consider better values for the mask bits
-        psImageInterpolateOptions *interp =
-            psImageInterpolateOptionsAlloc(mode, image, weight, NULL, 0xff, 0.0, 0.0, badMask, poorMask, 0.0);
+        psImageInterpolation *interp =
+            psImageInterpolationAlloc(mode, image, weight, NULL, 0xff, 0.0, 0.0, badMask, poorMask, 0.0, 0);
         psArrayAdd (input,  100, interp);
 
@@ -149,10 +149,10 @@
         for (int ox = 0; ox < resid->Ro->numCols; ox++) {
 
-	    int nGoodPixel = 0;              // pixel is off the image
-    
+            int nGoodPixel = 0;              // pixel is off the image
+
             // build the vector of data values for this output pixel
             for (int i = 0; i < input->n; i++) {
 
-                psImageInterpolateOptions *interp = input->data[i];
+                psImageInterpolation *interp = input->data[i];
 
                 // fractional image position
@@ -165,26 +165,26 @@
                     // This pixel is off the image
                     offImage = true;
-		    fmasks->data.U8[i] = 1;
-		    // fprintf (stderr, "off image: %f %f : %f %f\n", ix, iy, flux, dflux);
-                } 
+                    fmasks->data.U8[i] = 1;
+                    // fprintf (stderr, "off image: %f %f : %f %f\n", ix, iy, flux, dflux);
+                }
                 fluxes->data.F32[i] = flux;
                 dfluxes->data.F32[i] = dflux;
                 fmasks->data.U8[i] = mflux;
-		if (isnan(flux)) { 
-		    fmasks->data.U8[i] = 1;
-		}
-		if (fmasks->data.U8[i] == 0) {
-		    nGoodPixel ++;
-		}            
-	    }
-
-	    // skip pixels which are off the image...
-	    bool validPixel = (SPATIAL_ORDER == 0) ? (nGoodPixel > 1) : (nGoodPixel > 3);
+                if (isnan(flux)) {
+                    fmasks->data.U8[i] = 1;
+                }
+                if (fmasks->data.U8[i] == 0) {
+                    nGoodPixel ++;
+                }
+            }
+
+            // skip pixels which are off the image...
+            bool validPixel = (SPATIAL_ORDER == 0) ? (nGoodPixel > 1) : (nGoodPixel > 3);
             if (!validPixel) {
                 resid->Ro->data.F32[oy][ox] = 0.0;
                 resid->Rx->data.F32[oy][ox] = 0.0;
-		resid->Ry->data.F32[oy][ox] = 0.0;
-		resid->mask->data.U8[oy][ox] = 1;
-		continue;
+                resid->Ry->data.F32[oy][ox] = 0.0;
+                resid->mask->data.U8[oy][ox] = 1;
+                continue;
             }
 
@@ -216,7 +216,7 @@
                 //resid->weight->data.F32[oy][ox] = fluxStats->sampleStdev;
 
-		if (resid->Ro->data.F32[oy][ox] < pixelSN*fluxStats->sampleStdev) {
-		  resid->mask->data.U8[oy][ox] = 1;
-		}
+                if (resid->Ro->data.F32[oy][ox] < pixelSN*fluxStats->sampleStdev) {
+                  resid->mask->data.U8[oy][ox] = 1;
+                }
 
             } else {
@@ -254,8 +254,8 @@
                 resid->Ry->data.F32[oy][ox] = B->data.F64[2];
 
-		float dRo = sqrt(A->data.F32[0][0]);
-		if (resid->Ro->data.F32[oy][ox] < pixelSN*dRo) {
-		  resid->mask->data.U8[oy][ox] = 1;
-		}
+                float dRo = sqrt(A->data.F32[0][0]);
+                if (resid->Ro->data.F32[oy][ox] < pixelSN*dRo) {
+                  resid->mask->data.U8[oy][ox] = 1;
+                }
                 //resid->weight->data.F32[oy][ox] = XXX;
             }
Index: trunk/pswarp/src/pswarp.h
===================================================================
--- trunk/pswarp/src/pswarp.h	(revision 20306)
+++ trunk/pswarp/src/pswarp.h	(revision 20307)
@@ -43,5 +43,5 @@
     pmReadout *output;
     pswarpMapGrid *grid;
-    psImageInterpolateOptions *interp;
+    psImageInterpolation *interp;
     psImage *region;
 
Index: trunk/pswarp/src/pswarpTransformReadout.c
===================================================================
--- trunk/pswarp/src/pswarpTransformReadout.c	(revision 20306)
+++ trunk/pswarp/src/pswarpTransformReadout.c	(revision 20307)
@@ -64,7 +64,7 @@
 
     // Interpolation options : move these from the arguments to explicit assignments
-    psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(interpolationMode, input->image,
-                                                                       input->weight, input->mask, maskIn,
-                                                                       NAN, NAN, maskBad, maskPoor, poorFrac);
+    psImageInterpolation *interp = psImageInterpolationAlloc(interpolationMode, input->image,
+                                                             input->weight, input->mask, maskIn,
+                                                             NAN, NAN, maskBad, maskPoor, poorFrac, 0);
 
     if (input->weight && !output->weight) {
@@ -143,5 +143,5 @@
         float varFactor = psImageInterpolateVarianceFactor(input->image->numCols / 2.0 + input->image->col0,
                                                            input->image->numRows / 2.0 + input->image->row0,
-                                                           interp);
+                                                           interp->mode);
         psMetadataItem *vfItem = psMetadataLookup(output->analysis, PSWARP_ANALYSIS_VARFACTOR);
         if (vfItem) {
