Index: /branches/eam_rel9_b0/psModules/src/objects/pmPSF.c
===================================================================
--- /branches/eam_rel9_b0/psModules/src/objects/pmPSF.c	(revision 5809)
+++ /branches/eam_rel9_b0/psModules/src/objects/pmPSF.c	(revision 5810)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.1.10.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-12-17 20:30:43 $
+ *  @version $Revision: 1.1.10.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-12-19 02:08:58 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -70,6 +70,6 @@
  X-center
  Y-center
- ???: Sky background value?
- ???: Zo?
+ Sky background value
+ Object Normalization
  *****************************************************************************/
 pmPSF *pmPSFAlloc (pmModelType type)
@@ -84,6 +84,24 @@
     psf->dApResid = 0.0;
     psf->skyBias  = 0.0;
-    psf->ApTrend = psPolynomial3DAlloc (1, 1, 1, PS_POLYNOMIAL_ORD);
-    // XXX EAM : need to set the coefficient masks
+
+    // the ApTrend components are (x, y, rflux)
+    psf->ApTrend = psPolynomial3DAlloc (2, 2, 1, PS_POLYNOMIAL_ORD);
+
+    // we do not allow any rflux vs X,Y cross-terms
+    psf->ApTrend->mask[0][1][1] = 1;  // rflux x^0 y^1
+    psf->ApTrend->mask[0][2][1] = 1;  // rflux x^0 y^2
+    psf->ApTrend->mask[1][0][1] = 1;  // rflux x^1 y^0
+    psf->ApTrend->mask[1][1][1] = 1;  // rflux x^1 y^1
+    psf->ApTrend->mask[1][2][1] = 1;  // rflux x^1 y^2
+    psf->ApTrend->mask[2][0][1] = 1;  // rflux x^2 y^0
+    psf->ApTrend->mask[2][1][1] = 1;  // rflux x^2 y^1
+    psf->ApTrend->mask[2][2][1] = 1;  // rflux x^2 y^2
+
+    // only 2nd order terms, no such combinations
+    psf->ApTrend->mask[2][2][0] = 1;  // x^2 y^2
+    psf->ApTrend->mask[2][1][0] = 1;  // x^2 y^1
+    psf->ApTrend->mask[1][2][0] = 1;  // x^1 y^2
+
+    // total free parameters = 18 - 11 = 7
 
     Nparams = pmModelParameterCount (type);
