Index: /branches/eam_branches/20090715/ippconfig/gpc1/Makefile.am
===================================================================
--- /branches/eam_branches/20090715/ippconfig/gpc1/Makefile.am	(revision 25407)
+++ /branches/eam_branches/20090715/ippconfig/gpc1/Makefile.am	(revision 25408)
@@ -20,5 +20,4 @@
 	psastro.config \
         pswarp.config \
-	ppStack.config \
 	rejections.config
 
Index: /branches/eam_branches/20090715/ippconfig/gpc1/camera.config
===================================================================
--- /branches/eam_branches/20090715/ippconfig/gpc1/camera.config	(revision 25407)
+++ /branches/eam_branches/20090715/ippconfig/gpc1/camera.config	(revision 25408)
@@ -132,4 +132,5 @@
   CMF.XSRC STR {CHIP.NAME}.xsrc # use .PSF and .EXT?
   CMF.XFIT STR {CHIP.NAME}.xfit # use .PSF and .EXT?
+  CMF.DETEFF STR {CHIP.NAME}.deteff
 
   PSF.HEAD  STR	{CHIP.NAME}.hdr
Index: /branches/eam_branches/20090715/ippconfig/gpc1/format_20090220.config
===================================================================
--- /branches/eam_branches/20090715/ippconfig/gpc1/format_20090220.config	(revision 25407)
+++ /branches/eam_branches/20090715/ippconfig/gpc1/format_20090220.config	(revision 25408)
@@ -185,5 +185,5 @@
         FPA.ALT         STR     ALT
         FPA.AZ          STR     AZ
-        FPA.TEMP        STR     DETTEM
+        # FPA.TEMP        STR     DETTEM
         FPA.M1X         STR     M1X
         FPA.M1Y         STR     M1Y   
@@ -501,4 +501,6 @@
 # How to translation PS concepts into database lookups
 DATABASE        METADATA
+	# this rule is fragile : does not match the camera
+        FPA.TEMP        STR     SELECT ccd_temp FROM rawExp WHERE dateobs >= '{FPA.DATE}' and abs(timediff(dateobs, cast('{FPA.TIME}' as datetime))) < 2
 END
 
Index: anches/eam_branches/20090715/ippconfig/gpc1/ppStack.config
===================================================================
--- /branches/eam_branches/20090715/ippconfig/gpc1/ppStack.config	(revision 25407)
+++ 	(revision )
@@ -1,38 +1,0 @@
-# Recipe configuration for ppStack (image combination)
-
-ITER		S32	1		# Number of rejection iterations
-COMBINE.REJ	F32	4.0		# Rejection threshold in combination (sigma)
-MASK.VAL	STR	MASK.VALUE,CONV.BAD	# Mask value of input bad pixels
-MASK.BAD	STR	BLANK		# Mask value to give bad pixels
-MASK.POOR	STR	CONV.POOR	# Mask value to give poor pixels
-POOR.FRACTION	F32	0.1		# Maximum fraction of bad weight for poor pixels
-THRESHOLD.MASK	F32	0.8		# Threshold for mask deconvolution (0..1)
-IMAGE.REJ	F32	0.2		# Rejected pixel fraction threshold for rejecting entire image
-ROWS		S32	64		# Number of rows to read at once
-VARIANCE	BOOL	TRUE		# Use variance in rejection?
-SAFE		BOOL	FALSE		# Play safe when combining small number of values?
-
-RENORM		BOOL	FALSE		# Renormalise variance maps?
-RENORM.MEAN	STR	ROBUST_MEDIAN	# Statistic to use for mean in renormalisation
-RENORM.STDEV	STR	ROBUST_STDEV	# Statistic to use for stdev in renormalisation
-RENORM.WIDTH	S32	300		# Size of renormalisation boxes (pixels)
-
-SOURCE.RADIUS	F32	1.0		# Radius (pixels) for matching sources
-SOURCE.MIN	S32	15		# Minimum number of sources for merging source lists
-SOURCE.ITER	S32	2		# Number of rejection iterations for magnitude difference
-SOURCE.REJ	F32	2.0		# Rejection limit (sigma) for magnitude difference
-
-PSF.INSTANCES	S32	9		# Number of instances for PSF generation
-PSF.RADIUS	F32	20.0		# Radius for PSF generation
-PSF.ORDER	S32	2		# Order of spatial variation for PSF generation
-PSF.MODEL	STR	PS_MODEL_GAUSS	# Model for PSF generation
-
-TEMP.IMAGE	STR	conv.im.fits	# Suffix for convolved images
-TEMP.MASK	STR	conv.mk.fits	# Suffix for convolved masks
-TEMP.VARIANCE	STR	conv.var.fits	# Suffix for convolved variance maps
-TEMP.DELETE	BOOL	FALSE		# Delete temporary files on completion?
-
-PR	METADATA
-	CONVOLVE	BOOL	FALSE
-	IMAGE.REJ	F32	0.5
-END
Index: /branches/eam_branches/20090715/ippconfig/recipes/masks.16bit.config
===================================================================
--- /branches/eam_branches/20090715/ippconfig/recipes/masks.16bit.config	(revision 25407)
+++ /branches/eam_branches/20090715/ippconfig/recipes/masks.16bit.config	(revision 25408)
@@ -20,4 +20,5 @@
 
 # Mask values which represent non-astronomical structures
+BURNTOOL        U16     0x0080          # Pixel may contain uncorrected streak.
 CR		U16	0x0100		# Pixel contains a cosmic ray
 SPIKE		U16	0x0200		# Pixel contains a diffraction spike
Index: /branches/eam_branches/20090715/ippconfig/recipes/ppImage.config
===================================================================
--- /branches/eam_branches/20090715/ippconfig/recipes/ppImage.config	(revision 25407)
+++ /branches/eam_branches/20090715/ippconfig/recipes/ppImage.config	(revision 25408)
@@ -16,4 +16,5 @@
 MASK.SATURATED     BOOL    TRUE            # Mask the saturated pixels
 MASK.LOW           BOOL    TRUE            # Mask pixels below valid range
+MASK.BURNTOOL      BOOL    TRUE            # Mask potential burntool trails
 VARIANCE.BUILD     BOOL    FALSE           # Build internal variance image
 PATTERN            BOOL    FALSE           # Fit and remove pattern noise?
@@ -54,4 +55,6 @@
 ## if we use multithreaded detrending, detrend this number of rows per thread
 SCAN.ROWS        S32     100
+
+BURNTOOL.TRAILS U16 0x01
 
 # Non-linearity correction
Index: /branches/eam_branches/20090715/ippconfig/recipes/ppStack.config
===================================================================
--- /branches/eam_branches/20090715/ippconfig/recipes/ppStack.config	(revision 25407)
+++ /branches/eam_branches/20090715/ippconfig/recipes/ppStack.config	(revision 25408)
@@ -21,9 +21,8 @@
 SKIP.BG.SUB	BOOL	FALSE		# Bypass background subtraction?
 
-RENORM		BOOL	FALSE		# Renormalise variance maps?
-RENORM.NUM	S32	10000		# Number of samples for renormalisation
-RENORM.MEAN	STR	ROBUST_MEDIAN	# Statistic to use for mean in renormalisation
-RENORM.STDEV	STR	ROBUST_STDEV	# Statistic to use for stdev in renormalisation
-RENORM.WIDTH	F32	2.2		# Gaussian width for normalisation
+RENORM		BOOL	TRUE		# Renormalise weight maps?
+RENORM.NUM	S32	100000		# Number of samples for renormalisation
+RENORM.MIN	F32	NAN		# Minimum value for renormlisation
+RENORM.MAX	F32	NAN		# Maximum value for renormalisation
 
 ### The PHOT mode is intended as a quick and dirty stopgap; it should disappear soon.
Index: /branches/eam_branches/20090715/ippconfig/recipes/ppSub.config
===================================================================
--- /branches/eam_branches/20090715/ippconfig/recipes/ppSub.config	(revision 25407)
+++ /branches/eam_branches/20090715/ippconfig/recipes/ppSub.config	(revision 25408)
@@ -37,16 +37,10 @@
 OPTIMUM.ORDER	S32	2		# Maximum polynomial order for optimum search
 
-RENORM		BOOL	FALSE		# Renormalise weight maps?
-RENORM.NUM	S32	10000		# Number of samples for renormalisation
-RENORM.MEAN	STR	ROBUST_MEDIAN	# Statistic to use for mean in renormalisation
-RENORM.STDEV	STR	ROBUST_STDEV	# Statistic to use for stdev in renormalisation
-RENORM.WIDTH	F32	2.2		# Gaussian width for normalisation
+RENORM		BOOL	TRUE		# Renormalise weight maps?
+RENORM.NUM	S32	100000		# Number of samples for renormalisation
+RENORM.MIN	F32	0.6		# Minimum value for renormlisation
+RENORM.MAX	F32	1.5		# Maximum value for renormalisation
 
 INTERPOLATION	STR	LANCZOS3	# Interpolation mode for bad pixels
-
-VARIANCE.RESCALE           BOOL FALSE	# empirically rescale the variance?
-VARIANCE.RESCALE.NSAMPLE   S32  100000	# number of pixels to select from image for measurement
-VARIANCE.RESCALE.MIN.VALID F32  0.66	# do not rescale the variance if the measured sigma less than this value (where 1.0 is expected)
-VARIANCE.RESCALE.MAX.VALID F32  1.50	# do not rescale the variance if the measured sigma more than this value (where 1.0 is expected)
 
 DUAL		BOOL	FALSE		# Dual convolution?
Index: /branches/eam_branches/20090715/ippconfig/recipes/psastro.config
===================================================================
--- /branches/eam_branches/20090715/ippconfig/recipes/psastro.config	(revision 25407)
+++ /branches/eam_branches/20090715/ippconfig/recipes/psastro.config	(revision 25408)
@@ -3,4 +3,7 @@
 PSASTRO.ONLY.REFSTARS      BOOL FALSE  # skip all but refstar matches
 PSASTRO.SAVE.REFMATCH      BOOL FALSE  # save refstar matches as table in output smf file
+
+# select which WCS style to use on output images.
+PSASTRO.WCS.USECDKEYS	 BOOL FALSE
 
 # perform single-chip astrometry?
Index: /branches/eam_branches/20090715/ippconfig/recipes/psphot.config
===================================================================
--- /branches/eam_branches/20090715/ippconfig/recipes/psphot.config	(revision 25407)
+++ /branches/eam_branches/20090715/ippconfig/recipes/psphot.config	(revision 25408)
@@ -266,4 +266,7 @@
 PSPHOT.CR.NSIGMA.SOFTEN             F32   0.0025          # Softening parameter for weights
 
+# Detection efficiency
+EFF.NUM                             S32   500			# Number of fake sources per bin
+@EFF.MAG			    F32	  -2.0 -1.0 -0.5 -0.25 -0.1 -0.05 0.0 0.05 0.1 0.25 0.5 1.0 2.0	# Magnitude of fake sources relative to limit
 
 # Recipe overrides for CHIP
Index: /branches/eam_branches/20090715/ippconfig/vysos5/psastro.config
===================================================================
--- /branches/eam_branches/20090715/ippconfig/vysos5/psastro.config	(revision 25407)
+++ /branches/eam_branches/20090715/ippconfig/vysos5/psastro.config	(revision 25408)
@@ -12,5 +12,5 @@
 PSASTRO.GRID.NSTAR.MAX S32     800 # max stars accepted for fitting
 
-PSASTRO.MAX.NRAW      S32       500   # max stars accepted for fitting (0 for all)
+PSASTRO.MAX.NRAW      S32      1000   # max stars accepted for fitting (0 for all)
 PSASTRO.MAX.NREF      S32      2000   # max stars accepted for fitting (0 for all)
 
@@ -26,12 +26,12 @@
 # PSASTRO.GRID.MAX.ANGLE F32 360.0
 # PSASTRO.GRID.DEL.ANGLE F32  1.0
-PSASTRO.GRID.MIN.ANGLE F32 -10.0 # start angle (degrees)
+PSASTRO.GRID.MIN.ANGLE F32 +6.0 # start angle (degrees)
 PSASTRO.GRID.MAX.ANGLE F32 +10.0
-PSASTRO.GRID.DEL.ANGLE F32  2.5
+PSASTRO.GRID.DEL.ANGLE F32  1.0
 
 #
-PSASTRO.GRID.MIN.SCALE F32  0.90
-PSASTRO.GRID.MAX.SCALE F32  1.10
-PSASTRO.GRID.DEL.SCALE F32  0.025
+PSASTRO.GRID.MIN.SCALE F32  0.99
+PSASTRO.GRID.MAX.SCALE F32  1.01
+PSASTRO.GRID.DEL.SCALE F32  0.01
 
 # single-chip radius match in pixels
@@ -71,7 +71,23 @@
 DVO.GETSTAR.PHOTCODE        STR      r
 
+PHOTCODE.DATA MULTI
+PHOTCODE.DATA METADATA
+  FILTER   STR r
+  ZEROPT   F32 19.0
+  PHOTCODE STR r_SYNTH
+  GHOST_MAX_MAG                   F32 -20.0
+END
+PHOTCODE.DATA METADATA
+  FILTER   STR g
+  ZEROPT   F32 15.0
+  PHOTCODE STR g_SYNTH
+  GHOST_MAX_MAG                   F32 -20.0
+END
+
 PSASTRO.PLOT.REF.MAG.MIN  F32 +5.0
 PSASTRO.PLOT.REF.MAG.MAX  F32 +12.0
 
+# PSASTRO.MATCH.LUMFUNC  BOOL     TRUE
+
 # DVO.GETSTAR.MAG.MAX         F32      20.0
 # XXX need to be able to limit the density!
