Index: trunk/psphot/doc/stack.txt
===================================================================
--- trunk/psphot/doc/stack.txt	(revision 24583)
+++ trunk/psphot/doc/stack.txt	(revision 26894)
@@ -1,2 +1,84 @@
+
+20100126:
+
+  * watch out for psphotSetMomentsWindow & MOMENTS_SX_MAX,etc
+  * watch out for psphotSignificanceImage.c:,psphotEfficiency using the FWHM_MAJ from psphotChoosePSF
+    * ppSimDetections.c : SIGMA_SMOOTH
+ppSmooth/src/ppSmoothReadout.c:    psMetadataAddF32(recipe, PS_LIST_TAIL, "EFFECTIVE_AREA", PS_META_REPLACE, "Effective Area", effArea);
+ppSmooth/src/ppSmoothReadout.c:    psMetadataAddF32(recipe, PS_LIST_TAIL, "SIGNIFICANCE_SCALE_FACTOR", PS_META_REPLACE, "Signicance scale factor", factor);
+
+
+20100120 : more stack processing mods:
+
+  there are a number of data collections generated during psphotReadout:
+
+  * detections (currently a structure containing multiple arrays)
+  * sources (a psArray)
+  * psf (the psf model structure)
+  
+  * new sources vs old sources:
+    there is a sequence on the second pass in which we need to distinguish the sources
+    from the first pass from those on the second pass:
+
+    - add noise (old sources only)
+    - find detections
+    - subtract noise (old sources only)
+    - generate sources (new detections only)
+    - source classifications (new sources only)
+    - guess models (new sources only)
+    - replace sources (old sources only)
+    - merge sources (new + old -> sources)
+
+    currently we are distiguishing the old vs new based on different arrays.
+    can we use the processing flags to distinguish the these cases and carry around 
+    only a single source list?
+
+    * detections->peaks holds the most recently detected set of peaks
+      detections->oldPeaks holds the previous collection
+
+      detections->footprints holds the full set of merged footprints,
+      including assigned peaks from the old and new set.
+
+20100107 : updates for stack processing
+
+  I am building a new version of psphot that operates on a set of
+  images (eg, multi-filter or multi-epoch).  The assumptions are:
+
+  * each input image represents the same sky pixels : they are warped to a common frame.
+  * each image has been previously processed, with the background
+    subtracted (and the psf model determined?)
+  * all planes are / can be loaded into memory at once (otherwise I
+    need to add a lot of I/O layers)
+
+  psphot currently expects the pmFPAfile of interest to be available in
+  config->files with the name PSPHOT.INPUT.  To update the code for
+  stacks, I am extending this concept with the pmFPAfileSelectSingle
+  API: config->files may contain multiple PSPHOT.INPUT entries, and
+  functions which access this file / these files need to specify
+  *which* image they want.  The number of PSPHOT.INPUT entries is
+  saved in config->arguments as PSPHOT.INPUT.NUM (this can be
+  generated from the filerule PSPHOT.INPUT for extension).
+
+  As a result, we need a number of wrapper functions which loop over
+  all PSPHOT.INPUT.NUM entries and perform a particular operation on
+  one of the entries.  Here are the functions which I have modified
+  in this way (function -> child)
+
+  * psphotAddPhotcode -> psphotAddPhotcodeReadout
+    * note that the photcode is now saved on readout->analysis
+  * psphotSetMaskAndVariance -> psphotSetMaskAndVarianceReadout
+  * psphotModelBackground -> psphotModelBackgroundReadoutFileIndex
+  * psphotSubtractBackground -> psphotSubtractBackgroundReadout
+
+  side notes on 
+  
+  * psphotModelBackground vs psphotBackgroundModel : I've renamed
+    psphotBackgroundModel (used only by ppStack for now) to
+    psphotModelBackgroundReadoutNoFile.  I've also named the
+    single-readout version used by psphotModelBackground to
+    psphotModelBackgroundReadoutFileIndex.  These two functions do the
+    same thing, but psphotModelBackgroundReadoutNoFile does not save
+    a pmFPAfile on config->files
+
 
 20090606 : design notes on the multi-image photometry analysis
