Index: trunk/ippconfig/recipes/psphot.config
===================================================================
--- trunk/ippconfig/recipes/psphot.config	(revision 40797)
+++ trunk/ippconfig/recipes/psphot.config	(revision 40798)
@@ -574,13 +574,78 @@
   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
+
+  # NOTE: if PSPHOT.STACK.USE.RAW is set to False, KRON.SMOOTH should be
+  # set to false as well in order to get the best MOMENTS_R1 measurement
+  PSPHOT.STACK.USE.RAW                BOOL  T    # perform photometry & morphology analysis on the raw image
+  KRON_SMOOTH                         BOOL  T    # smooth before kron radius measurement
   @PSPHOT.STACK.TARGET.PSF.FWHM       F32   6.0 8.0 # FWHM of target PSF (if NOT AUTO sized; pixels)
-  RADIAL_APERTURES                    BOOL  F    # calculate flux in circular radial apertures?
+  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_SV3
+  OUTPUT.FORMAT                       STR   PS1_SV4
+
+  # subtract radial profiles for extremely bright stars?
+  SUBTRACT_SATSTAR_PROFILE            BOOL  T
+  
+  CONSTANT_PHOTOMETRIC_WEIGHTS        BOOL  TRUE 
+  POISSON.ERRORS.PHOT.LMM             BOOL  TRUE
+
+  LMM_FIT_CHISQ_CONVERGENCE           BOOL  FALSE           # use the (old) chisq convergence or the new parameter one 
+  LMM_FIT_GAIN_FACTOR_MODE            S32   2               # there are 3 options to determine the gain factor (0,1,2)
+  EXT_FIT_MIN_TOL                     F32   0.1             # Fit tolerance for EXT
 
   EXT_FIT_MAX_RADIUS                  F32   50.0
-  PSF_MODEL                           STR   PS_MODEL_GAUSS 
+  PSF_MODEL                           STR   PS_MODEL_PS1_V1 
   EXT_MODEL                           STR   PS_MODEL_QGAUSS
+  PEAKS_NMAX_TOTAL                    S32   0 # set this to limit the allowed number of peaks - Yields fault instead of avoid memory explosion
+
+  REPAIR.PETROSIAN.MAG.ERRORS         BOOL  TRUE # write PETRO_MAG_ERR as dFlux / Flux when writing
+
+  SAVE.RESID                          BOOL  FALSE
+END
+
+# Extended source fit parameters
+STACKPHOT_EUCLID                      METADATA
+  EXTENDED_SOURCE_FITS                BOOL  TRUE  # perform any of the aperture-like measurements?
+  EXTENDED_SOURCE_GALAXY_PARAMS       BOOL  TRUE  # measure additional paramters for "galaxies"
+  EXTENDED_SOURCE_SN_LIM              F32   10.0
+  EXTENDED_SOURCE_PETROSIAN           BOOL  TRUE
+  EXTENDED_SOURCE_ANNULI              BOOL  TRUE
+  EXT.NSIGMA.LIMIT.USE                BOOL  FALSE
+  EXT.FIT.MIN.GAL.LIMIT.USE           BOOL  TRUE  # limit extended source fits by galactic coordinates
+
+  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?
+  # NOTE: if PSPHOT.STACK.USE.RAW is set to False, KRON.SMOOTH should be
+  # set to false as well in order to get the best MOMENTS_R1 measurement
+  PSPHOT.STACK.USE.RAW                BOOL  T    # perform photometry & morphology analysis on the raw image
+  KRON_SMOOTH                         BOOL  T    # smooth before kron radius measurement
+  @PSPHOT.STACK.TARGET.PSF.FWHM       F32   6.0 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
+  OUTPUT.FORMAT                       STR   PS1_SV4
+
+  # PS1 EUCLID values (dropped inner 2 apertures)
+  @RADIAL.ANNULAR.BINS.LOWER           F32      0.00  5.38 10.77 16.15 21.54 32.30 # perl parser fails without a comment ticket #1476 still?
+  @RADIAL.ANNULAR.BINS.UPPER           F32      5.38 10.77 16.15 21.54 32.30 43.06 # perl parser fails without a comment ticket #1476 still?
+  #                aperture radius in arcsec:   1.0   2.0   3.0   4.0   6.0   8.0
+
+  # subtract radial profiles for extremely bright stars?
+  SUBTRACT_SATSTAR_PROFILE            BOOL  T
+  
+  CONSTANT_PHOTOMETRIC_WEIGHTS        BOOL  TRUE 
+  POISSON.ERRORS.PHOT.LMM             BOOL  TRUE
+
+  LMM_FIT_CHISQ_CONVERGENCE           BOOL  FALSE           # use the (old) chisq convergence or the new parameter one 
+  LMM_FIT_GAIN_FACTOR_MODE            S32   2               # there are 3 options to determine the gain factor (0,1,2)
+  EXT_FIT_MIN_TOL                     F32   0.1             # Fit tolerance for EXT
+
+  EXT_FIT_MAX_RADIUS                  F32   50.0
+  PSF_MODEL                           STR   PS_MODEL_PS1_V1 
+  EXT_MODEL                           STR   PS_MODEL_QGAUSS
+  PEAKS_NMAX_TOTAL                    S32   0 # set this to limit the allowed number of peaks - Yields fault instead of avoid memory explosion
+
+  REPAIR.PETROSIAN.MAG.ERRORS         BOOL  TRUE # write PETRO_MAG_ERR as dFlux / Flux when writing
+
+  SAVE.RESID                          BOOL  FALSE
 END
 
@@ -860,4 +925,26 @@
 END
 
+FULLFORCE_EUCLID METADATA
+    GALAXY_SHAPES           BOOL    TRUE
+
+    # new recipe values which set paramter spacing based on signal to noise
+    # DELTA = Q / SN
+    # F_MIN = 1 - NSIGMA * DELTA
+    # F_MAX = 1 + NSIGMA * DELTA
+    GALAXY_SHAPES_Q                     F32   1.5       # these values result in
+    GALAXY_SHAPES_NSIGMA                F32   4.0       # a 9 x 9 grid
+    GALAXY_SHAPES_CLAMP_SN              F32   50.       # with minimum delta .03 pixels
+
+    RADIAL_APERTURES        BOOL    TRUE
+    EXTENDED_SOURCE_FITS    BOOL    TRUE    # this casues the xfit extension to be written out
+    EXTENDED_SOURCE_PETROSIAN BOOL  TRUE    # To measure petrosian magnitudes
+    EXTENDED_SOURCE_ANNULI  BOOL    TRUE
+    LENSING_PARAMETERS      BOOL    TRUE
+    SAVE.PSF                BOOL    FALSE
+    SAVE.BACKMDL            BOOL    FALSE
+    SAVE.RESID              BOOL    FALSE
+    OUTPUT.FORMAT           STR     PS1_V5
+END
+
 CHIP_SHALLOW METADATA
   PEAKS_NSIGMA_LIMIT                  F32   25.0            # peak significance threshold
