Index: trunk/psModules/src/objects/pmPSF.c
===================================================================
--- trunk/psModules/src/objects/pmPSF.c	(revision 6960)
+++ trunk/psModules/src/objects/pmPSF.c	(revision 7311)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-04-23 01:07:51 $
+ *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-03 01:02:08 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -97,5 +97,5 @@
     // the ApTrend components are (x, y, r2rflux, flux)
     psf->ApTrend = psPolynomial4DAlloc (PS_POLYNOMIAL_ORD, 2, 2, 1, 1);
-    pmPSF_MaskApTrend (psf, PM_PSF_SKYBIAS);
+    pmPSF_MaskApTrend (psf->ApTrend, PM_PSF_SKYBIAS);
 
     if (psf->poissonErrors) {
@@ -239,76 +239,77 @@
  * to enable the specific subset of the coefficients
  **********************************************/
-bool pmPSF_MaskApTrend (pmPSF *psf, pmPSF_ApTrendOptions option)
+bool pmPSF_MaskApTrend (psPolynomial4D *trend,
+                        pmPSF_ApTrendOptions option)
 {
 
     switch (option) {
     case PM_PSF_NONE:
-        maskAllTerms (psf->ApTrend);
+        maskAllTerms (trend);
         return true;
 
     case PM_PSF_CONSTANT:
-        maskAllTerms (psf->ApTrend);
-        psf->ApTrend->mask[0][0][0][0] = 0;  // unmask constant
+        maskAllTerms (trend);
+        trend->mask[0][0][0][0] = 0;  // unmask constant
         return true;
 
     case PM_PSF_SKYBIAS:
-        maskAllTerms (psf->ApTrend);
-        psf->ApTrend->mask[0][0][0][0] = 0;  // unmask constant
-        psf->ApTrend->mask[0][0][1][0] = 0;  // unmask skybias
+        maskAllTerms (trend);
+        trend->mask[0][0][0][0] = 0;  // unmask constant
+        trend->mask[0][0][1][0] = 0;  // unmask skybias
         return true;
 
     case PM_PSF_SKYSAT:
-        maskAllTerms (psf->ApTrend);
-        psf->ApTrend->mask[0][0][0][0] = 0;  // unmask constant
-        psf->ApTrend->mask[0][0][1][0] = 0;  // unmask skybias
-        psf->ApTrend->mask[0][0][0][1] = 0;  // unmask skybias
+        maskAllTerms (trend);
+        trend->mask[0][0][0][0] = 0;  // unmask constant
+        trend->mask[0][0][1][0] = 0;  // unmask skybias
+        trend->mask[0][0][0][1] = 0;  // unmask skysat
         return true;
 
     case PM_PSF_XY_LIN:
-        maskAllTerms (psf->ApTrend);
-        psf->ApTrend->mask[0][0][0][0] = 0;  // unmask constant
-        psf->ApTrend->mask[1][0][0][0] = 0;  // unmask x
-        psf->ApTrend->mask[0][1][0][0] = 0;  // unmask y
+        maskAllTerms (trend);
+        trend->mask[0][0][0][0] = 0;  // unmask constant
+        trend->mask[1][0][0][0] = 0;  // unmask x
+        trend->mask[0][1][0][0] = 0;  // unmask y
         return true;
 
     case PM_PSF_XY_QUAD:
-        maskAllTerms (psf->ApTrend);
-        psf->ApTrend->mask[0][0][0][0] = 0;  // unmask constant
-        psf->ApTrend->mask[1][0][0][0] = 0;  // unmask x
-        psf->ApTrend->mask[2][0][0][0] = 0;  // unmask x^2
-        psf->ApTrend->mask[1][1][0][0] = 0;  // unmask x y
-        psf->ApTrend->mask[0][1][0][0] = 0;  // unmask y
-        psf->ApTrend->mask[0][2][0][0] = 0;  // unmask y^2
+        maskAllTerms (trend);
+        trend->mask[0][0][0][0] = 0;  // unmask constant
+        trend->mask[1][0][0][0] = 0;  // unmask x
+        trend->mask[2][0][0][0] = 0;  // unmask x^2
+        trend->mask[1][1][0][0] = 0;  // unmask x y
+        trend->mask[0][1][0][0] = 0;  // unmask y
+        trend->mask[0][2][0][0] = 0;  // unmask y^2
         return true;
 
     case PM_PSF_SKY_XY_LIN:
-        maskAllTerms (psf->ApTrend);
-        psf->ApTrend->mask[0][0][0][0] = 0;  // unmask constant
-        psf->ApTrend->mask[1][0][0][0] = 0;  // unmask x
-        psf->ApTrend->mask[0][1][0][0] = 0;  // unmask y
-        psf->ApTrend->mask[0][0][1][0] = 0;  // unmask skybias
+        maskAllTerms (trend);
+        trend->mask[0][0][0][0] = 0;  // unmask constant
+        trend->mask[1][0][0][0] = 0;  // unmask x
+        trend->mask[0][1][0][0] = 0;  // unmask y
+        trend->mask[0][0][1][0] = 0;  // unmask skybias
         return true;
 
     case PM_PSF_SKYSAT_XY_LIN:
-        maskAllTerms (psf->ApTrend);
-        psf->ApTrend->mask[0][0][0][0] = 0;  // unmask constant
-        psf->ApTrend->mask[1][0][0][0] = 0;  // unmask x
-        psf->ApTrend->mask[0][1][0][0] = 0;  // unmask y
-        psf->ApTrend->mask[0][0][1][0] = 0;  // unmask skybias
-        psf->ApTrend->mask[0][0][0][1] = 0;  // unmask skysat
+        maskAllTerms (trend);
+        trend->mask[0][0][0][0] = 0;  // unmask constant
+        trend->mask[1][0][0][0] = 0;  // unmask x
+        trend->mask[0][1][0][0] = 0;  // unmask y
+        trend->mask[0][0][1][0] = 0;  // unmask skybias
+        trend->mask[0][0][0][1] = 0;  // unmask skysat
         return true;
 
     case PM_PSF_ALL:
     default:
-        maskAllTerms (psf->ApTrend);
-        psf->ApTrend->mask[0][0][0][0] = 0;  // unmask constant
-        psf->ApTrend->mask[0][0][1][0] = 0;  // unmask skybias
-        psf->ApTrend->mask[0][0][0][1] = 0;  // unmask skysat
-
-        psf->ApTrend->mask[1][0][0][0] = 0;  // unmask x
-        psf->ApTrend->mask[2][0][0][0] = 0;  // unmask x^2
-        psf->ApTrend->mask[1][1][0][0] = 0;  // unmask x y
-        psf->ApTrend->mask[0][1][0][0] = 0;  // unmask y
-        psf->ApTrend->mask[0][2][0][0] = 0;  // unmask y^2
+        maskAllTerms (trend);
+        trend->mask[0][0][0][0] = 0;  // unmask constant
+        trend->mask[0][0][1][0] = 0;  // unmask skybias
+        trend->mask[0][0][0][1] = 0;  // unmask skysat
+
+        trend->mask[1][0][0][0] = 0;  // unmask x
+        trend->mask[2][0][0][0] = 0;  // unmask x^2
+        trend->mask[1][1][0][0] = 0;  // unmask x y
+        trend->mask[0][1][0][0] = 0;  // unmask y
+        trend->mask[0][2][0][0] = 0;  // unmask y^2
         return true;
     }
