Index: /trunk/psphot/doc/notes.txt
===================================================================
--- /trunk/psphot/doc/notes.txt	(revision 6865)
+++ /trunk/psphot/doc/notes.txt	(revision 6866)
@@ -1,2 +1,19 @@
+
+2006.04.16
+
+  Examining some of the throughput issues.  the flux measurement speed
+  is strongly dependent on the interation of the function step size:
+
+  dz = 0.01 : 3.24s for 4400 objects
+  dz = 0.1  : 0.44s for 4400 objects
+
+  there is an increased error in the result with the larger step size,
+  but it is smaller than the phot error.  Still, we could do better
+  with a smarter integration function.
+
+  Including the aperture photometry on all sources, but not the
+  pixWeight, the source magnitudes takes 4.8 sec for 4400 objects.
+
+  Adding the pixWeight increases the time to 7.5 sec for 4400 objects
 
 2006.02.12
Index: /trunk/psphot/src/psphotApResid.c
===================================================================
--- /trunk/psphot/src/psphotApResid.c	(revision 6865)
+++ /trunk/psphot/src/psphotApResid.c	(revision 6866)
@@ -14,4 +14,7 @@
     // S/N limit to perform full non-linear fits
     float FIT_SN_LIM = psMetadataLookupF32 (&status, recipe, "FULL_FIT_SN_LIM");
+
+    // set limits on the aperture magnitudes 
+    pmSourceMagnitudesInit (recipe);
 
     // measure the aperture loss as a function of radius for PSF
@@ -40,10 +43,12 @@
 	if (source->mode &  PM_SOURCE_MODE_POOR) continue;
 
+	model = source->modelPSF;
+	if (model == NULL) continue;
+
 	// XXX tune independently?
 	if (source->moments->SN < 2*FIT_SN_LIM) continue;
 
 	// get growth-corrected, apTrend-uncorrected magnitudes in scaled apertures
-	model = pmSourceMagnitudes (source, psf, true, false);
-	if (model == NULL) continue;
+	if (!pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH)) continue;
 
 	apResid->data.F64[Npsf] = source->apMag - source->psfMag;
@@ -225,5 +230,5 @@
     psf->ApTrend->coeff[0][0][1][0] = 0;
     psf->ApTrend->coeff[0][0][0][1] = 0;
-    psf->nApResid = residStats->clippedNvalues;
+    psf->nApResid = Npsf;
 
     // save results for later output
Index: /trunk/psphot/src/psphotMagnitudes.c
===================================================================
--- /trunk/psphot/src/psphotMagnitudes.c	(revision 6865)
+++ /trunk/psphot/src/psphotMagnitudes.c	(revision 6866)
@@ -3,12 +3,19 @@
 bool psphotMagnitudes (psArray *sources, psMetadata *recipe, pmPSF *psf) {
 
+    bool status = false;
+    int Nap = 0;
+
     psTimerStart ("psphot");
+
+    pmSourceMagnitudesInit (recipe);
 
     for (int i = 0; i < sources->n; i++) {
 	pmSource *source = (pmSource *) sources->data[i];
-	pmSourceMagnitudes (source, psf, true, true);
+	status = pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_APCORR | PM_SOURCE_PHOT_WEIGHT);
+	// status = pmSourceMagnitudes (source, psf, PM_SOURCE_PHOT_GROWTH | PM_SOURCE_PHOT_APCORR);
+	if (status) Nap ++;
     }	
 
-    psLogMsg ("psphot.magnitudes", 4, "measure magnitudes : %f sec for %d objects\n", psTimerMark ("psphot"), sources->n);
+    psLogMsg ("psphot.magnitudes", 4, "measure magnitudes : %f sec for %d objects (%d with apertures)\n", psTimerMark ("psphot"), sources->n, Nap);
     return true;
 }
