Index: trunk/ippconfig/recipes/ppSim.config
===================================================================
--- trunk/ippconfig/recipes/ppSim.config	(revision 31110)
+++ trunk/ippconfig/recipes/ppSim.config	(revision 31163)
@@ -89,4 +89,5 @@
 GALAXY.GRID.DY     S32    200             # Spacing between galaxies in grid in y
 GALAXY.GRID.RANDOM BOOL   FALSE		# randomize shape parameters in grid (or sequence?)
+GALAXY.GRID.PEAK   F32    100.0		# peak flux of the grid galaxies
 
 GALAXY.MODEL     STR    PS_MODEL_GAUSS
Index: trunk/ippconfig/recipes/ppStack.config
===================================================================
--- trunk/ippconfig/recipes/ppStack.config	(revision 31110)
+++ trunk/ippconfig/recipes/ppStack.config	(revision 31163)
@@ -5,5 +5,5 @@
 
 COMBINE.ITER	F32	0.5		# Number of rejection iterations per input
-COMBINE.REJ	F32	2.5		# Rejection threshold in combination (sigma)
+COMBINE.REJ	F32	3.5		# Rejection threshold in combination (sigma)
 COMBINE.SYS	F32	0.1		# Relative systematic error in combination
 COMBINE.DISCARD	F32	0.2		# Discard fraction for Olympic weighted mean
@@ -74,4 +74,5 @@
 	w	F32	25.0
 END
+ZP.AIRMASS.TARGET F32 1.0
 
 PSF.INSTANCES	S32	15		# Number of instances for PSF generation
@@ -82,4 +83,7 @@
 PSF.AUTOSIZE	BOOL	TRUE		# Determine output PSF size from input PSFs?
 PSF.OUTPUT.FWHM	F32	5.0		# Target size for output PSF (if not auto-sized)
+
+PSF.INPUT.MAX           F32  NAN
+PSF.INPUT.CLIP.NSIGMA   F32  NAN
 
 TEMP.IMAGE	STR	conv.im.fits	# Suffix for temporary convolved images
@@ -100,4 +104,7 @@
 END
 
+# Recipe overrides for STACK
+STACKPHOT METADATA
+END
 
 # Debugging
Index: trunk/ippconfig/recipes/ppSub.config
===================================================================
--- trunk/ippconfig/recipes/ppSub.config	(revision 31110)
+++ trunk/ippconfig/recipes/ppSub.config	(revision 31163)
@@ -125,4 +125,12 @@
 END
 
+# Difference of two stacks : uses SINGLE not DUAL convolution
+STACKPHOT	METADATA
+	DUAL		BOOL	FALSE	# Dual convolution?
+	INVERSE		BOOL	FALSE   # Generate inverse subtraction?
+	PHOTOMETRY	BOOL	TRUE	# Perform photometry?
+	CONVOLVE.TARGET STR     SINGLE2	# convolution direction
+END
+
 # Difference of warp - stack
 WARPSTACK_FORCED     METADATA
Index: trunk/ippconfig/recipes/psastro.config
===================================================================
--- trunk/ippconfig/recipes/psastro.config	(revision 31110)
+++ trunk/ippconfig/recipes/psastro.config	(revision 31163)
@@ -40,5 +40,7 @@
 PSASTRO.GRID.OFFSET    F32  10000.
 PSASTRO.GRID.SCALE     F32    500.
-PSASTRO.GRID.NSTAR.MAX S32    300 # max stars accepted for fitting
+PSASTRO.GRID.NSTAR.MAX S32    300 # deprecated
+PSASTRO.GRID.NREF.MAX  S32    500 # max stars accepted for fitting
+PSASTRO.GRID.NRAW.MAX  S32   1000 # max stars accepted for fitting
 
 # sources with these mask flags raised should be ignored
@@ -244,2 +246,4 @@
 END
 
+STS_DATASET METADATA
+END
Index: trunk/ippconfig/recipes/psphot.config
===================================================================
--- trunk/ippconfig/recipes/psphot.config	(revision 31110)
+++ trunk/ippconfig/recipes/psphot.config	(revision 31163)
@@ -11,4 +11,8 @@
 LOAD.PSF                            BOOL  FALSE
 
+# optional outputs for psphotStack
+SAVE.CNV                            BOOL  FALSE
+SAVE.CHISQ                          BOOL  FALSE
+
 # format for output CMF files
 OUTPUT.FORMAT                       STR   PS1_V3
@@ -20,4 +24,6 @@
 BACKGROUND.XBIN                     S32   128             # size of background superpixels
 BACKGROUND.YBIN                     S32   128             # size of background superpixels
+BACKGROUND.XSAMPLE                  F32   1.0             # size of background superpixels
+BACKGROUND.YSAMPLE                  F32   1.0             # size of background superpixels
 IMSTATS_NPIX                        S32   10000           # number of pixels to use for sky estimate boxes:
 
@@ -175,4 +181,5 @@
 EXTENDED_SOURCE_ANNULI              BOOL  FALSE
 EXTENDED_SOURCE_KRON                BOOL  FALSE
+PETROSIAN_FOR_STARS                 BOOL  FALSE
 
 # Extended source fit parameters
@@ -290,4 +297,8 @@
 TEST_FIT_PAR                        F32   NAN
 
+IMAGE.BACKGROUND.CELL.HISTOGRAM   BOOL  FALSE
+IMAGE.BACKGROUND.CELL.HISTOGRAM.X S32   0
+IMAGE.BACKGROUND.CELL.HISTOGRAM.Y S32   0
+
 DIAGNOSTIC.PLOTS                    METADATA
   IMAGE.BACKGROUND.CELL.HISTOGRAM   BOOL  FALSE
@@ -327,17 +338,4 @@
 
 # Extended source fit parameters
-STACKPHOT_TEST                       METADATA
-  EXTENDED_SOURCE_ANALYSIS            BOOL  TRUE  # perform any of the aperture-like measurements?
-  EXTENDED_SOURCE_SN_LIM              F32   20.0
-  EXTENDED_SOURCE_PETROSIAN           BOOL  TRUE
-  EXTENDED_SOURCE_ISOPHOTAL           BOOL  FALSE
-  EXTENDED_SOURCE_ANNULI              BOOL  TRUE
-  EXTENDED_SOURCE_KRON                BOOL  FALSE
-  PSPHOT.STACK.MATCH.PSF.SOURCE       STR   AUTO # which inputs to convolve? (RAW, CNV, AUTO)
-  PSPHOT.STACK.TARGET.PSF.AUTO        BOOL  F    # automatically determine target PSF size?
-  PSPHOT.STACK.TARGET.PSF.FWHM        F32   4.5  # FWHM of target PSF (if NOT AUTO sized; pixels)
-END
-
-# Extended source fit parameters
 STACKPHOT                             METADATA
   EXTENDED_SOURCE_FITS                BOOL  TRUE  # perform any of the aperture-like measurements?
@@ -348,5 +346,6 @@
   PSPHOT.STACK.MATCH.PSF.SOURCE       STR   AUTO # which inputs to convolve? (RAW, CNV, AUTO)
   PSPHOT.STACK.TARGET.PSF.AUTO        BOOL  F    # automatically determine target PSF size?
-  @PSPHOT.STACK.TARGET.PSF.FWHM        F32   5.0 6.5 8.0 # FWHM of target PSF (if NOT AUTO sized; pixels)
+  PSPHOT.STACK.USE.RAW                BOOL  F    # perform photometry & morphology analysis on the raw image
+  @PSPHOT.STACK.TARGET.PSF.FWHM       F32   6.5 8.0 # FWHM of target PSF (if NOT AUTO sized; pixels)
   RADIAL_APERTURES                    BOOL  T    # calculate flux in circular radial apertures?
   RADIAL_APERTURES_SN_LIM             F32   0.0  # S/N limit for radial aperture calculation
@@ -354,5 +353,25 @@
 
   EXT_FIT_MAX_RADIUS                  F32   50.0
-  PSF_MODEL                           STR   PS_MODEL_GAUSS 
+  PSF_MODEL                           STR   PS_MODEL_QGAUSS 
+  EXT_MODEL                           STR   PS_MODEL_SERSIC
+END
+
+# Extended source fit parameters
+STACKPHOT_TEST                        METADATA
+  EXTENDED_SOURCE_FITS                BOOL  TRUE  # perform any of the aperture-like measurements?
+  EXTENDED_SOURCE_ANALYSIS            BOOL  TRUE  # perform any of the aperture-like measurements?
+  EXTENDED_SOURCE_SN_LIM              F32   20.0
+  EXTENDED_SOURCE_PETROSIAN           BOOL  TRUE
+  EXTENDED_SOURCE_ANNULI              BOOL  TRUE
+  PSPHOT.STACK.MATCH.PSF.SOURCE       STR   AUTO # which inputs to convolve? (RAW, CNV, AUTO)
+  PSPHOT.STACK.TARGET.PSF.AUTO        BOOL  F    # automatically determine target PSF size?
+  PSPHOT.STACK.USE.RAW                BOOL  F    # perform photometry & morphology analysis on the raw image
+  @PSPHOT.STACK.TARGET.PSF.FWHM       F32   8.0 10.0 # FWHM of target PSF (if NOT AUTO sized; pixels)
+  RADIAL_APERTURES                    BOOL  T    # calculate flux in circular radial apertures?
+  RADIAL_APERTURES_SN_LIM             F32   0.0  # S/N limit for radial aperture calculation
+  OUTPUT.FORMAT                       STR   PS1_SV1
+
+  EXT_FIT_MAX_RADIUS                  F32   50.0
+  PSF_MODEL                           STR   PS_MODEL_QGAUSS 
   EXT_MODEL                           STR   PS_MODEL_SERSIC
 END
Index: trunk/ippconfig/recipes/reductionClasses.mdc
===================================================================
--- trunk/ippconfig/recipes/reductionClasses.mdc	(revision 31110)
+++ trunk/ippconfig/recipes/reductionClasses.mdc	(revision 31163)
@@ -144,18 +144,20 @@
 # basic science analysis
 DEFAULT		METADATA
-	CHIP_PPIMAGE	STR	CHIP
-	CHIP_PSPHOT	STR	CHIP
-	WARP_PSWARP	STR	WARP
-	STACK_PPSTACK	STR	STACK
-	STACK_PPSUB	STR	STACK
-	STACK_PSPHOT	STR	STACK
-	DIFF_PPSUB	STR	DIFF
-	DIFF_PSPHOT	STR	DIFF
-	JPEG_BIN1	STR	PPIMAGE_J1
-	JPEG_BIN2	STR	PPIMAGE_J2
-	FAKEPHOT	STR	FAKEPHOT
-	ADDSTAR		STR	ADDSTAR
-	PSASTRO		STR	DEFAULT_RECIPE
-	STACKPHOT       STR     STACKPHOT
+	CHIP_PPIMAGE	  STR	  CHIP
+	CHIP_PSPHOT	  STR	  CHIP
+	WARP_PSWARP	  STR	  WARP
+	STACK_PPSTACK	  STR	  STACK
+	STACK_PPSUB	  STR	  STACK
+	STACK_PSPHOT	  STR	  STACK
+	DIFF_PPSUB	  STR	  DIFF
+	DIFF_PSPHOT	  STR	  DIFF
+	JPEG_BIN1	  STR	  PPIMAGE_J1
+	JPEG_BIN2	  STR	  PPIMAGE_J2
+	FAKEPHOT	  STR	  FAKEPHOT
+	ADDSTAR		  STR	  ADDSTAR
+	PSASTRO		  STR	  DEFAULT_RECIPE
+	STACKPHOT_PSPHOT  STR     STACKPHOT
+	STACKPHOT_PPSUB   STR     STACKPHOT
+	STACKPHOT_PPSTACK STR     STACKPHOT
 	BACKGROUND_PPBACKGROUND	STR	BACKGROUND
 	BACKGROUND_PSWARP	STR	BACKGROUND
@@ -330,4 +332,11 @@
 	PSASTRO		STR	PS1_REFERENCE
 	STACKPHOT       STR     STACKPHOT
+END
+
+# stackphot (static sky) test reduction
+STACKPHOT_TEST	METADATA
+	STACKPHOT_PSPHOT  STR     STACKPHOT_TEST
+	STACKPHOT_PPSUB   STR     STACKPHOT
+	STACKPHOT_PPSTACK STR     STACKPHOT
 END
 
