Index: /branches/eam_branches/ipp-20130904/psphot/src/psphotExtendedSourceFits.c
===================================================================
--- /branches/eam_branches/ipp-20130904/psphot/src/psphotExtendedSourceFits.c	(revision 36240)
+++ /branches/eam_branches/ipp-20130904/psphot/src/psphotExtendedSourceFits.c	(revision 36241)
@@ -141,4 +141,8 @@
     fitOptions->chisqConvergence = chisqConvergence;
     fitOptions->isInteractive    = isInteractive;
+
+    // use poissonian errors or local-sky errors
+    fitOptions->poissonErrors = psMetadataLookupBool (&status, recipe, "EXTENDED_SOURCE_FITS_POISSON");
+    if (!status) fitOptions->poissonErrors = true;
 
     // maskVal is used to test for rejected pixels, and must include markVal
Index: /branches/eam_branches/ipp-20130904/psphot/src/psphotGalaxyShape.c
===================================================================
--- /branches/eam_branches/ipp-20130904/psphot/src/psphotGalaxyShape.c	(revision 36240)
+++ /branches/eam_branches/ipp-20130904/psphot/src/psphotGalaxyShape.c	(revision 36241)
@@ -102,4 +102,8 @@
     fitOptions->mode           = PM_SOURCE_FIT_EXT_AND_SKY;
     fitOptions->covarFactor    = psImageCovarianceFactorForAperture(readout->covariance, 10.0); // Covariance matrix
+
+    // Poisson or Constant weight for chisq tests?
+    fitOptions->poissonErrors = psMetadataLookupBool (&status, recipe, "EXTENDED_SOURCE_FITS_POISSON");
+    if (!status) fitOptions->poissonErrors = true;
 
     // source analysis is done in S/N order (brightest first)
@@ -284,5 +288,5 @@
     float YM = 0.0;
     float MM = 0.0;
-    bool usePoisson = true;
+    bool usePoisson = pcm->poissonErrors;
 
     for (int iy = 0; iy < source->pixels->numRows; iy++) {
@@ -316,4 +320,5 @@
     float dIo = sqrt (1.0 / MM);
     float Chisq = (YY - 2 * Io * YM + Io * Io * MM) / (float) nPix;
+    // NOTE : if !poissonErrors, Chisq is not really the chisq, but is scaled by the flux.
 
     pcm->modelConv->params->data.F32[PM_PAR_I0] = Io;
