Index: unk/ippconfig/phase2_template.config
===================================================================
--- /trunk/ippconfig/phase2_template.config	(revision 10455)
+++ 	(revision )
@@ -1,69 +1,0 @@
-### Phase 2 recipe configuration file
-
-# List of tasks to perform
-MASK		BOOL	FALSE		# Mask bad pixels
-NONLIN		BOOL	FALSE		# Non-linearity correction
-OVERSCAN	BOOL	TRUE		# Overscan subtraction
-BIAS		BOOL	FALSE		# Bias subtraction
-DARK		BOOL	FALSE		# Dark subtraction
-FLAT		BOOL	FALSE		# Flat-field normalisation
-FRINGE		BOOL	FALSE		# Fringe subtraction
-SOURCE		BOOL	FALSE		# Source identification and photometry
-ASTROM		BOOL	FALSE		# Astrometry
-
-
-# Loading issues
-LOAD.DEPTH		STR	CHIP		# Depth at which to load pixels
-
-
-# Non-linearity correction
-NONLIN.SOURCE		STR	CHIP.NAME	# How to determine the source
-#@NONLIN.DATA		F32	0.0 1.001 0.001	# A polynomial
-NONLIN.DATA		STR	nonlin.dat	# Filename for lookup table
-#NONLIN.DATA		METADATA		# Source of non-linearity data
-#	ccd00		STR	nonlin00.dat	# A lookup table 
-#	@ccd01		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd02		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd03		F32	1.2345 		# A polynomial
-#	@ccd04		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd05		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd06		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd07		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd08		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd09		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd10		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd11		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd12		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd13		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd14		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd15		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd16		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd17		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd18		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd19		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd10		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd21		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd22		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd23		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd24		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd25		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd26		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd27		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd28		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd29		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd30		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd31		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd32		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd33		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd34		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd35		F32	0.0 1.001 0.001	# A polynomial
-#	@ccd36		F32	0.0 1.001 0.001	# A polynomial
-#END
-
-# Overscan subtraction
-OVERSCAN.SINGLE		BOOL	FALSE		# Reduce overscan to a single value?
-#OVERSCAN.FIT		STR	SPLINE		# NONE | POLYNOMIAL | SPLINE
-OVERSCAN.FIT		STR	POLYNOMIAL	# NONE | POLYNOMIAL | SPLINE
-OVERSCAN.ORDER		S32	5		# Order of polynomial fit
-OVERSCAN.STAT		STR	MEAN		# MEAN | MEDIAN
-
Index: unk/ippconfig/ppMerge_template.config
===================================================================
--- /trunk/ippconfig/ppMerge_template.config	(revision 10455)
+++ 	(revision )
@@ -1,23 +1,0 @@
-# Recipe configuration for ppMerge
- 
-ROWS            S32     128		# Number of rows to read at once
-ELECTRONS       F32     100.0           # Minimum number of electrons for useful signal
-SAMPLE          S32     100             # Sampling factor for measuring the background
-REJ		F32	3.0		# Rejection threshold (sigma)
-ITER		S32	1		# Number of rejection iterations
-FRACHIGH	F32	0.3		# Fraction of high pixels to reject immediately
-FRACLOW		F32	0.1		# Fraction of low pixels to reject immediately
-NKEEP		S32	5		# Minimum number of pixels in stack to keep
-FRINGE.NUM	S32	5000		# Number of fringe regions
-FRINGE.SIZE	S32	3		# Half-size of fringe regions
-FRINGE.XSMOOTH	S32	11		# Number of smoothing regions in x
-FRINGE.YSMOOTH	S32	5		# Number of smoothing regions in y
-SHUTTER.SIZE	S32	128		# Size for shutter measurement regions
-SHUTTER.ITER	S32	1		# Number of iterations for shutter measurement
-SHUTTER.REJECT	F32	2		# Rejection limit for shutter measurement
-MASK.SUSPECT	F32	5.0		# Threshold for suspect pixels (sigma)
-MASK.BAD	F32	-4.0		# Threshold for bad pixels (sigma)
-MASKVAL		S32	0xff		# Mask value for input data
-COMBINE		STR	MEAN		# Statistic to use for combination
-MEAN		STR	ROBUST_MEDIAN	# Statistic to use to measure the mean
-STDEV		STR	ROBUST_STDEV	# Statistic to use to measure the stdev
Index: unk/ippconfig/ppNorm_template.config
===================================================================
--- /trunk/ippconfig/ppNorm_template.config	(revision 10455)
+++ 	(revision )
@@ -1,6 +1,0 @@
-# Template recipe for ppNorm
-MASKVAL		S32	0xff		# Mask value for images
-SAMPLE		F32	0.1		# Fraction of pixels to use to determine background
-STAT		STR	MEDIAN		# Statistic to use to measure background
-ITER		S32	0		# Number of rejection iterations for clipped stats
-REJ		F32	0.0		# Rejection threshold for clipped stats
Index: unk/ippconfig/ppStats_phase0.config
===================================================================
--- /trunk/ippconfig/ppStats_phase0.config	(revision 10455)
+++ 	(revision )
@@ -1,24 +1,0 @@
-### ppStats recipe for Phase 0 with MegaCam
-
-# Options governing statistics
-SAMPLE          F32     0.1     # Fraction of cell to sample
-MASKVAL         U8      0xff    # Mask value to use for statistics
-
-# Define the outputs as MULTI
-HEADER		MULTI
-CONCEPT		MULTI
-STAT		MULTI
-
-# Values to return
-CONCEPT		STR	FPA.OBJECT	# Object name
-CONCEPT		STR	FPA.OBSTYPE	# Observation type
-CONCEPT		STR	FPA.FILTER	# Filter
-CONCEPT		STR	FPA.RA FPA.DEC	# Telescope pointing
-CONCEPT		STR	FPA.AIRMASS	# Airmass
-CONCEPT		STR	FPA.ALT FPA.AZ	# Telescopy alt/az
-CONCEPT		STR	FPA.POSANGLE	# Rotator angle
-CONCEPT		STR	FPA.TIME	# Time of exposure
-CONCEPT		STR	CHIP.TEMP	# Detector temperature
-CONCEPT		STR	CELL.EXPOSURE	# Exposure time
-STAT		STR	ROBUST_MEDIAN	# Background estimator
-STAT		STR	ROBUST_STDEV	# Background standard deviation estimator
Index: unk/ippconfig/psastro_template.config
===================================================================
--- /trunk/ippconfig/psastro_template.config	(revision 10455)
+++ 	(revision )
@@ -1,36 +1,0 @@
-
-# astrometry matching parameters
-
-# nominal plate scale (microns / pixel)
-# PSASTRO.PLATE.SCALE    F32  13.5
-PSASTRO.PLATE.SCALE    F32  1.0
-
-# pmAstromGridMatch:
-PSASTRO.GRID.MIN.ANGLE F32 -0.0851
-PSASTRO.GRID.MAX.ANGLE F32 +0.0851
-PSASTRO.GRID.DEL.ANGLE F32  0.0170
-
-# pmAstromGridAngle
-# max grid offset in FP units (microns)
-# use plate-scale to make this in pixels?
-# PSASTRO.GRID.OFFSET    F32  10000.
-# PSASTRO.GRID.SCALE     F32    500.
-PSASTRO.GRID.OFFSET    F32   1000.
-PSASTRO.GRID.SCALE     F32     50
-
-# these tweak are in FP units (pixels, currently)
-PSASTRO.TWEAK.SCALE     F32      1
-PSASTRO.TWEAK.RANGE     F32     75
-PSASTRO.TWEAK.SMOOTH    F32      2
-PSASTRO.TWEAK.NSIGMA    F32      3
-
-# pmAstromRadiusMatch
-# use plate-scale to make this in pixels?
-PSASTRO.MATCH.RADIUS   F32    8
-
-# pmAstromMatchFit
-PSASTRO.CHIP.NX        S32      1  # fit order
-PSASTRO.CHIP.NY        S32      1  # fit order
-PSASTRO.CHIP.NITER     S32      3  # fit clipping iterations
-PSASTRO.CHIP.NSIGMA    F32      3  # fit clipping sigmas
-
Index: unk/ippconfig/psphot_template.config
===================================================================
--- /trunk/ippconfig/psphot_template.config	(revision 10455)
+++ 	(revision )
@@ -1,72 +1,0 @@
-
-# BREAK_POINT STR PEAKS
-# PEAKS_OUTPUT_FILE STR peaks.dat
-# MOMENTS_OUTPUT_FILE STR moments.dat
-
-# image noise parameters
-RDNOISE             STR  HD:RDNOISE      # read-noise in electrons
-GAIN                STR  HD:GAIN         # electrons / DN
-ZERO_POINT          F32  25.000          # zero point used by DVO
-
-# background model : 
-BACKGROUND_XBIN	    S32   128
-BACKGROUND_YBIN	    S32   128
-
-# masking parameters
-XMIN                F32   2        	 # minimum valid x-coord
-XMAX                F32   -2        	 # maximum valid x-coord
-YMIN                F32   2        	 # minimum valid y-coord
-YMAX                F32   -2        	 # maximum valid y-coord
-SATURATION          F32  50000     	 # saturation level on this chip
-MIN_VALID_PIXEL     F32      1     	 # saturation level on this chip
-# ANALYSIS_REGION     STR  [1000:1600,2800:3400]
-
-# image statistics parameters
-IMSTATS_NPIX        S32  1000    	 # number of pixels to use for sky estimate boxes:
-
-# peak finding 
-PEAKS_SMOOTH_SIGMA  F32  1.0       	 # smoothing kernel sigma in pixels
-PEAKS_SMOOTH_NSIGMA F32  3.0   	   	 # smoothing kernel width in sigmas
-# PEAKS_NSIGMA_LIMIT  F32  10.0 	   	 # peak significance threshold
-PEAKS_NSIGMA_LIMIT  F32  5.0 	   	 # peak significance threshold
-
-# basic object statistics
-SKY_INNER_RADIUS    F32  15		 # square annulus for local sky measurement
-SKY_OUTER_RADIUS    F32  25		 # square annulus for local sky measurement
-PSF_MOMENTS_RADIUS  F32  3               # calculate initial source moments with this radius
-PSF_SN_LIM          F32  100             # minimum S/N for stars used for PSF model
-PSF_MAX_NSTARS      S32  300             # limit number of stars used for PSF model
-
-# PSF model parameters : choose the PSF model
-# list as many PSF_MODEL options as desired
-# PSF_MODEL           MULTI
-PSF_MODEL           STR  PS_MODEL_QGAUSS
-# PSF_MODEL           STR  PS_MODEL_GAUSS
-# PSF_MODEL           STR  PS_MODEL_PGAUSS
-# PSF_MODEL           STR  PS_MODEL_TGAUSS  ## not well tested, not very successful
-
-PSF_FIT_RADIUS      F32  15.0	         # fitting radius for test PSF model
-PSF_REF_RADIUS      F32  25.0            # aperture magnitudes are scaled via 
-					 # curve-of-growth to this radius
-
-# PSF-like source model parameters
-PSF_FIT_NSIGMA       F32  1.0		 # significance for pixel included in fit
-PSF_FIT_PADDING      F32  5.0            # extra annulus to use for fit 
-PSF_SHAPE_NSIGMA     F32  3.0		 # max significance for shape variation
-PSF_MIN_SN           F32  2.0		 # reject objects below this significance
-PSF_MAX_CHI          F32  50.0		 # reject objects worse that this
-
-# EXTended source model parameters
-EXT_MODEL            STR  PS_MODEL_PGAUSS
-EXT_MIN_SN           F32  50.0           # fit galaxies above this S/N limit
-EXT_FIT_NSIGMA       F32  1		 # significance for pixel included in fit
-EXT_FIT_PADDING      F32  5              # extra annulus to use for fit 
-EXT_MOMENTS_RADIUS   F32  9
-
-FITMODE              STR  BLEND
-DEBLEND_PEAK_FRACTION   F32 0.1
-DEBLEND_SKY_NSIGMA      F32 10.0
-
-APTREND 	     STR SKYSAT
-
-FULL_FIT_SN_LIM      F32  5.0
Index: /trunk/ippconfig/recipes/ppImage.config
===================================================================
--- /trunk/ippconfig/recipes/ppImage.config	(revision 10456)
+++ /trunk/ippconfig/recipes/ppImage.config	(revision 10456)
@@ -0,0 +1,51 @@
+### Phase 2 recipe configuration file
+
+# List of tasks to perform
+MASK		BOOL	FALSE		# Mask bad pixels
+MASK.VALUE      U8      0xff            # only mask pixels matching this bitmask
+NONLIN		BOOL	FALSE		# Non-linearity correction
+OVERSCAN	BOOL	TRUE		# Overscan subtraction
+BIAS		BOOL	TRUE		# Bias subtraction
+DARK		BOOL	TRUE		# Dark subtraction
+SHUTTER		BOOL	FALSE		# Shutter correction
+FLAT		BOOL	TRUE		# Flat-field normalisation
+FRINGE		BOOL	FALSE		# Fringe subtraction
+PHOTOM		BOOL	FALSE		# Source identification and photometry
+ASTROM.CHIP	BOOL	FALSE		# Astrometry per chip?
+ASTROM.MOSAIC	BOOL	FALSE		# Astrometry for mosaic?
+
+# output data formats to save
+BASE.FITS       BOOL    TRUE            # Save base detrended image?
+CHIP.FITS       BOOL   	TRUE            # Save chip-mosaic-ed image? 
+FPA1.FITS       BOOL   	TRUE            # Save 1st binned fpa image? 
+FPA2.FITS       BOOL   	TRUE            # Save 2nd binned fpa image? 
+BIN1.FITS	BOOL	TRUE		# Save 1st binned chip image?
+BIN2.FITS	BOOL	TRUE		# Save 2nd binned chip image?
+BIN1.JPEG	BOOL	TRUE		# Save 1st binned jpeg?
+BIN2.JPEG	BOOL	FALSE		# Save 2nd binned jpeg?
+
+# Non-linearity correction
+NONLIN.SOURCE		STR	CHIP.NAME	# How to determine the source
+NONLIN.DATA		STR	nonlin.dat	# Filename for lookup table
+
+# examples of other possible non-linearity correction representations
+#@NONLIN.DATA		F32	0.0 1.001 0.001	# A polynomial
+#NONLIN.DATA		METADATA		# Source of non-linearity data
+#	ccd00		STR	nonlin00.dat	# A lookup table 
+#	@ccd01		F32	0.0 1.001 0.001	# A polynomial
+#END
+
+# Overscan subtraction
+OVERSCAN.SINGLE		BOOL	FALSE		# Reduce overscan to a single value?
+#OVERSCAN.FIT		STR	SPLINE		# NONE | POLYNOMIAL | SPLINE
+OVERSCAN.FIT		STR	POLYNOMIAL	# NONE | POLYNOMIAL | SPLINE
+OVERSCAN.ORDER		S32	5		# Order of polynomial fit
+OVERSCAN.STAT		STR	MEAN		# MEAN | MEDIAN
+
+# binned output image options
+BIN1.XBIN		S32	8
+BIN1.YBIN		S32	8
+BIN2.XBIN		S32	64
+BIN2.YBIN		S32	64
+
+PHOTCODE.RULE		STR	{CAMERA}.{FILTER.ID}.{CHIP.N}
Index: /trunk/ippconfig/recipes/ppMerge.config
===================================================================
--- /trunk/ippconfig/recipes/ppMerge.config	(revision 10456)
+++ /trunk/ippconfig/recipes/ppMerge.config	(revision 10456)
@@ -0,0 +1,23 @@
+# Recipe configuration for ppMerge
+ 
+ROWS            S32     128		# Number of rows to read at once
+ELECTRONS       F32     100.0           # Minimum number of electrons for useful signal
+SAMPLE          S32     100             # Sampling factor for measuring the background
+REJ		F32	3.0		# Rejection threshold (sigma)
+ITER		S32	1		# Number of rejection iterations
+FRACHIGH	F32	0.3		# Fraction of high pixels to reject immediately
+FRACLOW		F32	0.1		# Fraction of low pixels to reject immediately
+NKEEP		S32	5		# Minimum number of pixels in stack to keep
+FRINGE.NUM	S32	5000		# Number of fringe regions
+FRINGE.SIZE	S32	3		# Half-size of fringe regions
+FRINGE.XSMOOTH	S32	11		# Number of smoothing regions in x
+FRINGE.YSMOOTH	S32	5		# Number of smoothing regions in y
+SHUTTER.SIZE	S32	128		# Size for shutter measurement regions
+SHUTTER.ITER	S32	1		# Number of iterations for shutter measurement
+SHUTTER.REJECT	F32	2		# Rejection limit for shutter measurement
+MASK.SUSPECT	F32	5.0		# Threshold for suspect pixels (sigma)
+MASK.BAD	F32	-4.0		# Threshold for bad pixels (sigma)
+MASKVAL		S32	0xff		# Mask value for input data
+COMBINE		STR	MEAN		# Statistic to use for combination
+MEAN		STR	ROBUST_MEDIAN	# Statistic to use to measure the mean
+STDEV		STR	ROBUST_STDEV	# Statistic to use to measure the stdev
Index: /trunk/ippconfig/recipes/ppNorm.config
===================================================================
--- /trunk/ippconfig/recipes/ppNorm.config	(revision 10456)
+++ /trunk/ippconfig/recipes/ppNorm.config	(revision 10456)
@@ -0,0 +1,6 @@
+# Template recipe for ppNorm
+MASKVAL		S32	0xff		# Mask value for images
+SAMPLE		F32	0.1		# Fraction of pixels to use to determine background
+STAT		STR	MEDIAN		# Statistic to use to measure background
+ITER		S32	0		# Number of rejection iterations for clipped stats
+REJ		F32	0.0		# Rejection threshold for clipped stats
Index: /trunk/ippconfig/recipes/ppStats_phase0.config
===================================================================
--- /trunk/ippconfig/recipes/ppStats_phase0.config	(revision 10456)
+++ /trunk/ippconfig/recipes/ppStats_phase0.config	(revision 10456)
@@ -0,0 +1,24 @@
+### ppStats recipe for Phase 0 with MegaCam
+
+# Options governing statistics
+SAMPLE          F32     0.1     # Fraction of cell to sample
+MASKVAL         U8      0xff    # Mask value to use for statistics
+
+# Define the outputs as MULTI
+HEADER		MULTI
+CONCEPT		MULTI
+STAT		MULTI
+
+# Values to return
+CONCEPT		STR	FPA.OBJECT	# Object name
+CONCEPT		STR	FPA.OBSTYPE	# Observation type
+CONCEPT		STR	FPA.FILTER	# Filter
+CONCEPT		STR	FPA.RA FPA.DEC	# Telescope pointing
+CONCEPT		STR	FPA.AIRMASS	# Airmass
+CONCEPT		STR	FPA.ALT FPA.AZ	# Telescopy alt/az
+CONCEPT		STR	FPA.POSANGLE	# Rotator angle
+CONCEPT		STR	FPA.TIME	# Time of exposure
+CONCEPT		STR	CHIP.TEMP	# Detector temperature
+CONCEPT		STR	CELL.EXPOSURE	# Exposure time
+STAT		STR	ROBUST_MEDIAN	# Background estimator
+STAT		STR	ROBUST_STDEV	# Background standard deviation estimator
Index: /trunk/ippconfig/recipes/psastro.config
===================================================================
--- /trunk/ippconfig/recipes/psastro.config	(revision 10456)
+++ /trunk/ippconfig/recipes/psastro.config	(revision 10456)
@@ -0,0 +1,36 @@
+
+# astrometry matching parameters
+
+# nominal plate scale (microns / pixel)
+# PSASTRO.PLATE.SCALE    F32  13.5
+PSASTRO.PLATE.SCALE    F32  1.0
+
+# pmAstromGridMatch:
+PSASTRO.GRID.MIN.ANGLE F32 -0.0851
+PSASTRO.GRID.MAX.ANGLE F32 +0.0851
+PSASTRO.GRID.DEL.ANGLE F32  0.0170
+
+# pmAstromGridAngle
+# max grid offset in FP units (microns)
+# use plate-scale to make this in pixels?
+# PSASTRO.GRID.OFFSET    F32  10000.
+# PSASTRO.GRID.SCALE     F32    500.
+PSASTRO.GRID.OFFSET    F32   1000.
+PSASTRO.GRID.SCALE     F32     50
+
+# these tweak are in FP units (pixels, currently)
+PSASTRO.TWEAK.SCALE     F32      1
+PSASTRO.TWEAK.RANGE     F32     75
+PSASTRO.TWEAK.SMOOTH    F32      2
+PSASTRO.TWEAK.NSIGMA    F32      3
+
+# pmAstromRadiusMatch
+# use plate-scale to make this in pixels?
+PSASTRO.MATCH.RADIUS   F32    8
+
+# pmAstromMatchFit
+PSASTRO.CHIP.NX        S32      1  # fit order
+PSASTRO.CHIP.NY        S32      1  # fit order
+PSASTRO.CHIP.NITER     S32      3  # fit clipping iterations
+PSASTRO.CHIP.NSIGMA    F32      3  # fit clipping sigmas
+
Index: /trunk/ippconfig/recipes/psphot.config
===================================================================
--- /trunk/ippconfig/recipes/psphot.config	(revision 10456)
+++ /trunk/ippconfig/recipes/psphot.config	(revision 10456)
@@ -0,0 +1,116 @@
+
+# these options turn on different inputs and/or outputs
+SAVE.BACKMDL	BOOL 	FALSE
+SAVE.BACKGND	BOOL 	FALSE
+SAVE.BACKSUB	BOOL 	FALSE
+SAVE.RESID	BOOL 	FALSE
+SAVE.PSF	BOOL 	FALSE
+LOAD.PSF	BOOL 	FALSE
+SAVE.PLOTS      BOOL    FALSE
+
+# the zero point is used to set a basic scale for DVO
+# XXX it may not currently be read : double check this (EAM)
+ZERO_POINT          F32  25.000          # zero point used by DVO
+
+# these parameter govern how the background is measured
+BACKGROUND_XBIN	    S32   128            # size of background superpixels
+BACKGROUND_YBIN	    S32   128            # size of background superpixels
+IMSTATS_NPIX        S32  10000    	 # number of pixels to use for sky estimate boxes:
+
+SKY_BIAS            F32  0.0             # offset applied to measured sky (FOR TESTING)
+SKY_FIT_ORDER       S32  0
+SKY_FIT_LINEAR      BOOL FALSE
+SKY_STAT            STR  FITTED_MEAN     # statistic used to measure background
+# allowed values for SKY_STAT: 
+# SAMPLE_MEAN, SAMPLE_MEDIAN, CLIPPED_MEAN, ROBUST_MEAN, ROBUST_QUARTILE, FITTED_MEAN
+
+# masking parameters (XXX EAM : rework this to use psRegion like ANALYSIS_REGION)
+XMIN                F32   2        	 # minimum valid x-coord
+XMAX                F32   -2        	 # maximum valid x-coord
+YMIN                F32   2        	 # minimum valid y-coord
+YMAX                F32   -2        	 # maximum valid y-coord
+SATURATION          F32  50000     	 # saturation level on this chip
+
+# peak finding 
+PEAKS_SMOOTH_SIGMA  F32  1.0       	 # smoothing kernel sigma in pixels
+PEAKS_SMOOTH_NSIGMA F32  2.0   	   	 # smoothing kernel width in sigmas
+PEAKS_NSIGMA_LIMIT  F32  10.0 	   	 # peak significance threshold
+
+# parameters to control the selection of the peak in the Sx,Sy plane
+MOMENTS_SCALE       F32   0.1
+MOMENTS_SN_MIN      F32   10.0
+MOMENTS_SX_MAX      F32   3.0
+MOMENTS_SY_MAX      F32   3.0
+MOMENTS_AR_MAX      F32   1.5		 # maximum axial ratio: 1 / AR < (sx / sy) < AR
+
+# basic object statistics
+SKY_INNER_RADIUS    F32  15		 # square annulus for local sky measurement
+SKY_OUTER_RADIUS    F32  25		 # square annulus for local sky measurement
+PSF_MOMENTS_RADIUS  F32  3               # calculate initial source moments with this radius
+PSF_SN_LIM          F32  50              # minimum S/N for stars used for PSF model
+PSF_MAX_NSTARS      S32  300             # limit number of stars used for PSF model
+
+# PSF model parameters : choose the PSF model
+# list as many PSF_MODEL options as desired
+# PSF_MODEL           MULTI
+PSF_MODEL           STR  PS_MODEL_GAUSS
+# PSF_MODEL           STR  PS_MODEL_PGAUSS
+# PSF_MODEL           STR  PS_MODEL_QGAUSS
+# PSF_MODEL           STR  PS_MODEL_TGAUSS  ## not well tested, not very successful
+
+# PSF.TREND.MASK must be a 2D polynomial
+# the specified values are ignored but define the active components of the polynomial
+PSF.TREND.MASK  METADATA  
+   NORDER_X         S32       2                # number of x orders
+   NORDER_Y         S32       2                # number of y orders
+   VAL_X00_Y00      F64       1                # polynomial coefficient
+   VAL_X01_Y00      F64       1                # polynomial coefficient
+   VAL_X00_Y01      F64       1                # polynomial coefficient
+   VAL_X02_Y00      F64       1                # polynomial coefficient
+   VAL_X01_Y01      F64       1                # polynomial coefficient
+   VAL_X00_Y02      F64       1                # polynomial coefficient
+   NELEMENTS        S32       6                # number of unmasked components
+END  # folder for 2D polynomial
+
+PSF_FIT_RADIUS      F32  15.0	         # fitting radius for test PSF model
+PSF_REF_RADIUS      F32  25.0            # aperture magnitudes are scaled via 
+					 # curve-of-growth to this radius
+# PSF-like source model parameters
+PSF_FIT_NSIGMA       F32  1.0		 # significance for pixel included in fit
+PSF_FIT_PADDING      F32  2.0            # extra annulus to use for fit 
+PSF_SHAPE_NSIGMA     F32  3.0		 # max significance for shape variation
+PSF_MIN_SN           F32  2.0		 # reject objects below this significance
+PSF_MAX_CHI          F32  50.0		 # reject objects worse that this
+FULL_FIT_SN_LIM      F32  10.0
+
+# EXTended source model parameters
+EXT_MODEL            STR  PS_MODEL_PGAUSS
+EXT_MIN_SN           F32  50.0           # fit galaxies above this S/N limit
+EXT_FIT_NSIGMA       F32  1		 # significance for pixel included in fit
+EXT_FIT_PADDING      F32  5              # extra annulus to use for fit 
+EXT_MOMENTS_RADIUS   F32  9
+
+FITMODE              STR  BLEND
+DEBLEND_PEAK_FRACTION   F32 0.1
+DEBLEND_SKY_NSIGMA      F32 10.0
+
+# APTREND 	     STR  NONE, CONSTANT, SKYBIAS, SKYSAT, XY_LIN, SKY_XY_LIN, SKYSAT_XY_LIN, ALL
+APTREND 	     STR  CONSTANT
+AP_MIN_SN            F32  25.0
+
+# test options
+# BREAK_POINT may be one of (PEAKS, MOMENTS, PSFMODEL, ENSEMBLE)
+# BREAK_POINT           STR  ENSEMBLE
+# PEAKS_OUTPUT_FILE   STR  peaks.dat
+# MOMENTS_OUTPUT_FILE STR  moments.dat
+# ANALYSIS_REGION     STR  [1000:1600,2800:3400]
+# POISSON_ERRORS      BOOL TRUE
+
+# optional parameter to limit the actual analysis to a fraction of the image
+# do not uncomment this in the master psphot.config file
+# ANALYSIS_REGION     STR  [1000:1600,2800:3400]
+
+IGNORE_GROWTH BOOL FALSE
+CONSTANT_PHOTOMETRIC_WEIGHTS BOOL TRUE # Should the photometric code [currently only ensemblePSF] refuse to weight each pixel by it's significance?
+INTERPOLATE_AP BOOL TRUE
+POISSON_ERRORS BOOL TRUE
