Index: branches/eam_branches/ipp-20110213/psphot/src/psphotExtendedSourceAnalysisByObject.c
===================================================================
--- branches/eam_branches/ipp-20110213/psphot/src/psphotExtendedSourceAnalysisByObject.c	(revision 30772)
+++ branches/eam_branches/ipp-20110213/psphot/src/psphotExtendedSourceAnalysisByObject.c	(revision 30776)
@@ -148,4 +148,5 @@
 		psFree(source->extpars->radFlux);
 		psFree(source->extpars->ellipticalFlux);
+		psFree(source->extpars->petProfile);
 	    }
 	}
Index: branches/eam_branches/ipp-20110213/psphot/src/psphotMergeSources.c
===================================================================
--- branches/eam_branches/ipp-20110213/psphot/src/psphotMergeSources.c	(revision 30772)
+++ branches/eam_branches/ipp-20110213/psphot/src/psphotMergeSources.c	(revision 30776)
@@ -699,5 +699,6 @@
 	    sourceOut->parent = sourceSrc;
 
-	    // keep the original source flags
+	    // keep the original source flags and sequence ID (if set)
+	    sourceOut->seq      = sourceSrc->seq;
 	    sourceOut->type     = sourceSrc->type;
 	    sourceOut->mode     = sourceSrc->mode;
Index: branches/eam_branches/ipp-20110213/psphot/src/psphotRadialAperturesByObject.c
===================================================================
--- branches/eam_branches/ipp-20110213/psphot/src/psphotRadialAperturesByObject.c	(revision 30772)
+++ branches/eam_branches/ipp-20110213/psphot/src/psphotRadialAperturesByObject.c	(revision 30776)
@@ -150,4 +150,7 @@
 	    } else {
 		source->mode |= PM_SOURCE_MODE_RADIAL_FLUX;
+		if (source->parent) {
+		    source->parent->mode |= PM_SOURCE_MODE_RADIAL_FLUX;
+		}
 	    }
 
Index: branches/eam_branches/ipp-20110213/psphot/src/psphotRadialProfile.c
===================================================================
--- branches/eam_branches/ipp-20110213/psphot/src/psphotRadialProfile.c	(revision 30772)
+++ branches/eam_branches/ipp-20110213/psphot/src/psphotRadialProfile.c	(revision 30776)
@@ -25,4 +25,5 @@
 	return false;
     }
+    // allocate: extpars->radFlux->radii,fluxes,theta
 
     // use the radial profiles to determine the radius of a given isophote.  this isophote
@@ -33,4 +34,6 @@
 	return false;
     }
+    // allocate : extpars->radFlux->isophotalRadii (use profile->radii,fluxes)
+
 
     // convert the isophotal radius vs angle measurements to an elliptical contour
@@ -39,5 +42,6 @@
 	return false;
     }
-  
+    // use extpars->radFlux->isophotalRadii,theta (result in extpars->axes)
+
     // generate a single, normalized radial profile following the elliptical contours.
     // the radius is normalized by the axis ratio so that on the major axis, 1 pixel = 1 pixel
@@ -46,4 +50,5 @@
 	return false;
     }
+    // allocate extpars->ellipticalFlux->radiusElliptical,fluxElliptical (use axes to scale raw pixels)
   
     // generated profile in averaged bins
@@ -52,4 +57,6 @@
 	return false;
     }
+    // allocate extpars->radProfile->binSB, binSBstdv, binSum, binFill, radialBins, area (small lengths)
+    // use radiusElliptical, fluxElliptical, 
   
     return true;
Index: branches/eam_branches/ipp-20110213/psphot/src/psphotStack.c
===================================================================
--- branches/eam_branches/ipp-20110213/psphot/src/psphotStack.c	(revision 30772)
+++ branches/eam_branches/ipp-20110213/psphot/src/psphotStack.c	(revision 30776)
@@ -2,4 +2,7 @@
 
 int main (int argc, char **argv) {
+
+    // XXX add memory dumps
+    psMemDumpSetState(true);
 
     psTimerStart ("complete");
@@ -12,4 +15,6 @@
 
     psphotVersionPrint();
+
+    psMemDump("start");
 
     // load input data (config and images (signal, noise, mask)
Index: branches/eam_branches/ipp-20110213/psphot/src/psphotStackImageLoop.c
===================================================================
--- branches/eam_branches/ipp-20110213/psphot/src/psphotStackImageLoop.c	(revision 30772)
+++ branches/eam_branches/ipp-20110213/psphot/src/psphotStackImageLoop.c	(revision 30776)
@@ -18,4 +18,6 @@
     pmCell *cell;
     pmReadout *readout;
+
+    psMemDump("startloop");
 
     pmFPAfile *inputRaw = psMetadataLookupPtr (&status, config->files, "PSPHOT.STACK.INPUT.RAW");
@@ -86,4 +88,5 @@
 	if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE ("failed output for Chip in psphot.");
     }
+    psMemDump("doneloop");
 
     SetAstrometryFPA(config, view, bilevelAstrometry);
@@ -96,4 +99,6 @@
 
     psFree (view);
+
+    psMemDump("doneoutput");
     return true;
 }
Index: branches/eam_branches/ipp-20110213/psphot/src/psphotStackReadout.c
===================================================================
--- branches/eam_branches/ipp-20110213/psphot/src/psphotStackReadout.c	(revision 30772)
+++ branches/eam_branches/ipp-20110213/psphot/src/psphotStackReadout.c	(revision 30776)
@@ -211,4 +211,6 @@
     }
 
+    psMemDump("psfstats");
+
     psphotStackObjectsUnifyPosition (objects);
 
@@ -230,4 +232,6 @@
     }
 
+    psMemDump("extmeas");
+
     bool smoothAgain = true;
     for (int nMatchedPSF = 0; smoothAgain; nMatchedPSF++) {
@@ -250,4 +254,5 @@
 	// smooth to the next FWHM, or set 'smoothAgain' to false if no more 
 	psphotStackMatchPSFsNext(&smoothAgain, config, view, STACK_OUT, nMatchedPSF);
+	psMemDump("matched");
     }
 
@@ -264,5 +269,5 @@
 
     // drop the references to the image pixels held by each source
-    // psphotSourceFreePixels (config, view, STACK_OUT);
+    psphotSourceFreePixels (config, view, STACK_OUT);
     psphotSourceFreePixels (config, view, STACK_SRC);
 
