Index: /trunk/ippconfig/gpc1/format_20100723.config
===================================================================
--- /trunk/ippconfig/gpc1/format_20100723.config	(revision 41897)
+++ /trunk/ippconfig/gpc1/format_20100723.config	(revision 41898)
@@ -531,68 +531,76 @@
 # Pattern correction information:
 
+# NOTE: PATTERN.ROW.SUBSET is defined in the format_DATE.config files because
+# in different periods, the camera had different amounts of row-by-row bias drift
+# for a given cell.  It is necessary to make the choice of whether to correct the 
+# pattern based on the epoch the exposure was taken.
+
+# NOTE: if PATTERN.ROW.SUBSET entries are missing for a given chip, the default 
+# behavior is to NOT correct for the effect. (This makes sense since most camera
+# are not GPC1 and thus do not need the correction).
+
 # PATTERN.ROW		BOOL 	TRUE	# Do any row pattern correction at all?
 PATTERN.ROW.SUBSET	METADATA	# List of chips and whether to do row pattern correction
-	XY01	BOOL	FALSE
-#	XY02	STR     0000000000000000000000000000000000000000000000000000000000000001 # xy77
-	XY02	BOOL	FALSE
-	XY03	BOOL	FALSE
-	XY04	BOOL	FALSE
-	XY05	BOOL	FALSE
-	XY06	BOOL	FALSE
-	XY10	BOOL	FALSE
-	XY11	STR	0011100100000000000000000000000000000000000000000000000000000000
-	XY12	BOOL	FALSE
-	XY13	BOOL	FALSE
-	XY14	STR     0000000000000000000100000000000000000000000000000000000000000000 # xy23
-	XY15	STR     1111111100000000000000000000000000000000000000000000000000000000 # cols: 0
-	XY16	BOOL	FALSE
-	XY17	BOOL	FALSE
-	XY20	BOOL	FALSE
-	XY21	BOOL	FALSE
-	XY22	BOOL	FALSE
-	XY23	BOOL	FALSE
-	XY24	BOOL	FALSE
-	XY25	BOOL	FALSE
-	XY26	BOOL	FALSE
-	XY27	STR     1111111111111111111111111111111100000000000000000000000011111111 # cols: 0,1,2,3,7
-	XY30	BOOL	FALSE
-	XY31	STR     0000000000000000000000000000000000000000000000000000000011111111 # cols: 7
-	XY32	STR     0000000000000000000000001111111100000000000000000000000011111111 # cols: 3,7
-	XY33	BOOL	FALSE
-	XY34	BOOL	FALSE
-	XY35	BOOL	FALSE
-	XY36	BOOL	FALSE
-	XY37	BOOL	FALSE
-	XY40	BOOL	FALSE
-	XY41	BOOL	FALSE
-	XY42	BOOL	FALSE
-	XY43	BOOL	FALSE
-	XY44	BOOL	FALSE
-	XY45	STR     0000000000000000000000001111111100000000000000000000000011111111 # cols: 3,7
-	XY46	BOOL	FALSE
-	XY47	STR     1111111100000000000000001111111100000000111111110000000011111111 # cols: 0,3,5,7
-	XY50	BOOL	FALSE
-	XY51	BOOL	FALSE
-	XY52	BOOL	FALSE
-	XY53	BOOL	FALSE
-	XY54	BOOL	FALSE
-	XY55	BOOL	FALSE
-	XY56	BOOL	FALSE
-	XY57	STR     1111111111111111111111110000000000000000000000001111111111111111 # cols: 0,1,2,6,7
-	XY60	STR	0000000000000000000000000000000000000000000001000000000000000000 # cell xy55
-	XY61	BOOL	FALSE
-	XY62	BOOL	FALSE
-	XY63	BOOL	FALSE
-	XY64	BOOL	FALSE
-	XY65	BOOL	FALSE
-#	XY66	STR	0000000000000000000000000000000000000000000000000000000000000100 # cell xy75
-	XY66	BOOL	FALSE
-	XY67	BOOL	FALSE
-	XY71	BOOL	FALSE
-	XY72	BOOL	FALSE
-	XY73	BOOL	FALSE
-	XY74	STR     0000000000000000111111110000000000000000000000000000000011111111 # cols: 2,7
-	XY75	BOOL	FALSE
-	XY76	BOOL	FALSE
+	XY01	BOOL	TRUE
+ 	XY02	BOOL    TRUE
+	XY02	BOOL	TRUE
+	XY03	BOOL	TRUE
+	XY04	BOOL	TRUE
+	XY05	BOOL	TRUE
+	XY06	BOOL	TRUE
+	XY10	BOOL	TRUE
+	XY11	BOOL	TRUE
+	XY12	BOOL	TRUE
+	XY13	BOOL	TRUE
+	XY14	BOOL    TRUE 
+	XY15	BOOL    TRUE 
+	XY16	BOOL	TRUE
+	XY17	BOOL	TRUE
+	XY20	BOOL	TRUE
+	XY21	BOOL	TRUE
+	XY22	BOOL	TRUE
+	XY23	BOOL	TRUE
+	XY24	BOOL	TRUE
+	XY25	BOOL	TRUE
+	XY26	BOOL	TRUE
+	XY27	BOOL    TRUE 
+	XY30	BOOL	TRUE
+	XY31	BOOL    TRUE 
+	XY32	BOOL    TRUE 
+	XY33	BOOL	TRUE
+	XY34	BOOL	TRUE
+	XY35	BOOL	TRUE
+	XY36	BOOL	TRUE
+	XY37	BOOL	TRUE
+	XY40	BOOL	TRUE
+	XY41	BOOL	TRUE
+	XY42	BOOL	TRUE
+	XY43	BOOL	TRUE
+	XY44	BOOL	TRUE
+	XY45	BOOL    TRUE 
+	XY46	BOOL	TRUE
+	XY47	BOOL    TRUE
+	XY50	BOOL	TRUE
+	XY51	BOOL	TRUE
+	XY52	BOOL	TRUE
+	XY53	BOOL	TRUE
+	XY54	BOOL	TRUE
+	XY55	BOOL	TRUE
+	XY56	BOOL	TRUE
+	XY57	BOOL    TRUE 
+	XY60	BOOL	TRUE
+	XY61	BOOL	TRUE
+	XY62	BOOL	TRUE
+	XY63	BOOL	TRUE
+	XY64	BOOL	TRUE
+	XY65	BOOL	TRUE
+	XY66	BOOL	TRUE
+	XY67	BOOL	TRUE
+	XY71	BOOL	TRUE
+	XY72	BOOL	TRUE
+	XY73	BOOL	TRUE
+	XY74	BOOL	TRUE
+	XY75	BOOL	TRUE
+	XY76	BOOL	TRUE
 END
 
Index: /trunk/ippconfig/gpc1/psastro.config
===================================================================
--- /trunk/ippconfig/gpc1/psastro.config	(revision 41897)
+++ /trunk/ippconfig/gpc1/psastro.config	(revision 41898)
@@ -82,10 +82,17 @@
 PSASTRO.MOSAIC.UNIQ.ITER      S32      3  # for iterations >= N, require a single match per reference
 
-PSASTRO.MOSAIC.MAX.ERROR.N0 F32    0.00 # max allow error for valid solution (arcsec)
-PSASTRO.MOSAIC.MAX.ERROR.N1 F32    0.00 # max allow error for valid solution (arcsec)
-PSASTRO.MOSAIC.MAX.ERROR.N2 F32    0.00 # max allow error for valid solution (arcsec)
-PSASTRO.MOSAIC.MAX.ERROR.N3 F32    0.00 # max allow error for valid solution (arcsec)
-PSASTRO.MOSAIC.MAX.ERROR.N4 F32    0.00 # max allow error for valid solution (arcsec)
-PSASTRO.MOSAIC.MAX.ERROR.N5 F32    0.30 # max allow error for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.ERROR.N0 F32    0.00 # max allowed error for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.ERROR.N1 F32    0.00 # max allowed error for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.ERROR.N2 F32    0.00 # max allowed error for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.ERROR.N3 F32    0.00 # max allowed error for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.ERROR.N4 F32    0.00 # max allowed error for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.ERROR.N5 F32    0.30 # max allowed error for valid solution (arcsec)
+
+PSASTRO.MOSAIC.MAX.STDEV.N0 F32    0.00 # max allowed stdev for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.STDEV.N1 F32    0.00 # max allowed stdev for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.STDEV.N2 F32    0.00 # max allowed stdev for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.STDEV.N3 F32    0.00 # max allowed stdev for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.STDEV.N4 F32    0.00 # max allowed stdev for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.STDEV.N5 F32    0.00 # max allowed stdev for valid solution (arcsec)
 
 # mosaic radius match in pixels (do these make sense?)
Index: /trunk/ippconfig/recipes/filerules-mef.mdc
===================================================================
--- /trunk/ippconfig/recipes/filerules-mef.mdc	(revision 41897)
+++ /trunk/ippconfig/recipes/filerules-mef.mdc	(revision 41898)
@@ -67,4 +67,5 @@
 PPIMAGE.SHUTTER         INPUT    @DETDB        CHIP       IMAGE     
 PPIMAGE.LINEARITY       INPUT    @DETDB        CHIP       LINEARITY
+PPIMAGE.PATTERN.ROW.AMP INPUT    @DETDB        FPA       PATTERN.ROW.AMP
 
 ## Files used by ppMerge
Index: /trunk/ippconfig/recipes/filerules-split.mdc
===================================================================
--- /trunk/ippconfig/recipes/filerules-split.mdc	(revision 41897)
+++ /trunk/ippconfig/recipes/filerules-split.mdc	(revision 41898)
@@ -51,4 +51,5 @@
 PPIMAGE.SHUTTER           INPUT    @DETDB        CHIP       IMAGE
 PPIMAGE.LINEARITY         INPUT    @DETDB        CHIP       LINEARITY
+PPIMAGE.PATTERN.ROW.AMP   INPUT    @DETDB        FPA        PATTERN.ROW.AMP
 
 ## Files used by psvideophot
Index: /trunk/ippconfig/recipes/ppImage.config
===================================================================
--- /trunk/ippconfig/recipes/ppImage.config	(revision 41897)
+++ /trunk/ippconfig/recipes/ppImage.config	(revision 41898)
@@ -23,16 +23,7 @@
 VARIANCE.BUILD     BOOL    FALSE           # Build internal variance image
 ADDNOISE           BOOL    FALSE           # Add noise to degrade an MD image to a 3pi image?
-PATTERN.ROW        BOOL    FALSE           # Row pattern correction
-PATTERN.ROW.SUBSET METADATA		   # Menu of chips and/or cells for row pattern correction
-END
-PATTERN.CELL       BOOL    FALSE           # Cell pattern correction
-PATTERN.CELL.SUBSET METADATA		   # Menu of chips and/or cells for cell pattern correction
-END
-PATTERN.SUBSET	   METADATA
-END
-PATTERN.CONTINUITY BOOL    FALSE
-PATTERN.CONTINUITY.WIDTH S32  50
-PATTERN.CONTINUITY.SUBSET METADATA	   # Menu of chips and/or cells for cell pattern continuity correction
-END
+PATTERN.ROW        BOOL    FALSE           # Row pattern correction (see options below)
+PATTERN.CELL       BOOL    FALSE           # Cell pattern correction (see options below)
+PATTERN.CONTINUITY BOOL    FALSE           # continuity corrections (see options below)
 FRINGE             BOOL    FALSE           # Fringe subtraction
 PHOTOM             BOOL    FALSE           # Source identification and photometry
@@ -111,13 +102,40 @@
 OVERSCAN.VALUE	        F32	0.0		# value to apply, if requested
 
-# Pattern subtraction options
+# Pattern Row subtraction options
 PATTERN.ROW.ORDER      S32     2               # Polynomial order for row pattern
-PATTERN.ROW.ITER       S32     4               # Rejection iterations for row pattern
+PATTERN.ROW.ITER       S32     3               # Rejection iterations for row pattern
 PATTERN.ROW.REJ        F32     2.5             # Rejection threshold for row pattern
-PATTERN.ROW.THRESH     F32     20.0            # Ignore threshold for row pattern
+PATTERN.ROW.THRESH     F32     3.0             # Ignore threshold for row pattern
 PATTERN.ROW.MEAN       STR     SAMPLE_MEAN     # Statistic for mean for row pattern
 PATTERN.ROW.STDEV      STR     SAMPLE_STDEV    # Statistic for standard deviation for row pattern
+PATTERN.ROW.USE.BINNED BOOL    TRUE	       # pre-bin along the row before calculating (NOT yet respected r41656)
+PATTERN.ROW.POISSON    BOOL    TRUE	       # use Poisson stats on the sky to set threshold (NOT yet respected r41656)
+
+PATTERN.ROW.SUBSET     METADATA		       # Menu of chips and/or cells for row pattern correction
+END
+
+# NOTE: PATTERN.ROW.SUBSET is defined in the format_DATE.config files because
+# in different periods, the camera had different amounts of row-by-row bias drift
+# for a given cell.  It is necessary to make the choice of whether to correct the 
+# pattern based on the epoch the exposure was taken.
+
+# NOTE: if PATTERN.ROW.SUBSET entries are missing for a given chip, the default 
+# behavior is to NOT correct for the effect. (This makes sense since most camera
+# are not GPC1 and thus do not need the correction).
+
+# Pattern Cell options
 PATTERN.CELL.BG	       STR     FITTED_MEAN     # Statistic for background for cell pattern
 PATTERN.CELL.MEAN      STR     SAMPLE_MEDIAN   # Statistic for mean for cell pattern
+PATTERN.CELL.SUBSET    METADATA  	       # Menu of chips and/or cells for cell pattern correction
+END
+
+# Pattern Continuity options
+PATTERN.CONTINUITY.WIDTH S32  50
+PATTERN.CONTINUITY.SUBSET METADATA	   # Menu of chips and/or cells for cell pattern continuity correction
+END
+
+# r41656 : this does not appear to be used any more: superceded by PATTERN.ROW, .CELL, .CONTINUITY
+PATTERN.SUBSET	   METADATA
+END
 
 # Fringe subtraction options
Index: /trunk/ippconfig/recipes/ppStack.config
===================================================================
--- /trunk/ippconfig/recipes/ppStack.config	(revision 41897)
+++ /trunk/ippconfig/recipes/ppStack.config	(revision 41898)
@@ -8,4 +8,8 @@
 COMBINE.SYS	F32	0.1		# Relative systematic error in combination
 COMBINE.DISCARD	F32	0.2		# Discard fraction for Olympic weighted mean
+
+COMBINE.PERCENT   BOOL  FALSE           # Use a single percentile clipping?
+COMBINE.MIN.RANGE F32   0.16            # Minimum fraction for percentile clipping
+COMBINE.MAX.RANGE F32   0.84            # Maximum fraction for percentile clipping
 
 MASK.VAL	STR	MASK.VALUE,CONV.BAD,GHOST # Mask value of input bad pixels
Index: /trunk/ippconfig/recipes/psastro.config
===================================================================
--- /trunk/ippconfig/recipes/psastro.config	(revision 41897)
+++ /trunk/ippconfig/recipes/psastro.config	(revision 41898)
@@ -91,5 +91,6 @@
 PSASTRO.CHIP.NSIGMA    F32      3  # fit clipping sigmas
 
-PSASTRO.MAX.ERROR      F32      1.5 # max allow error for valid solution (UNITS?)
+PSASTRO.MAX.ERROR      F32      1.5 # max allowed error for valid solution (arcsec)
+PSASTRO.MAX.STDEV      F32      1.0 # max allowed stdev for valid solution (arcsec)
 PSASTRO.MIN.NSTAR      S32      3   # min fitted stars in solution
 PSASTRO.MAX.NSTAR      S32      300   # max fitted stars in solution
@@ -135,10 +136,17 @@
 PSASTRO.MOSAIC.CHIP.NSIGMA    F32      3  # fit clipping sigmas
 
-PSASTRO.MOSAIC.MAX.ERROR.N0   F32      1.5 # max allow error for valid solution (UNITS?)
-PSASTRO.MOSAIC.MAX.ERROR.N1   F32      1.5 # max allow error for valid solution (UNITS?)
-PSASTRO.MOSAIC.MAX.ERROR.N2   F32      1.5 # max allow error for valid solution (UNITS?)
-PSASTRO.MOSAIC.MAX.ERROR.N3   F32      1.5 # max allow error for valid solution (UNITS?)
-PSASTRO.MOSAIC.MAX.ERROR.N4   F32      1.5 # max allow error for valid solution (UNITS?)
-PSASTRO.MOSAIC.MAX.ERROR.N5   F32      1.5 # max allow error for valid solution (UNITS?)
+PSASTRO.MOSAIC.MAX.ERROR.N0   F32      1.5 # max allowed error for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.ERROR.N1   F32      1.5 # max allowed error for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.ERROR.N2   F32      1.5 # max allowed error for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.ERROR.N3   F32      1.5 # max allowed error for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.ERROR.N4   F32      1.5 # max allowed error for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.ERROR.N5   F32      1.5 # max allowed error for valid solution (arcsec)
+
+PSASTRO.MOSAIC.MAX.STDEV.N0   F32      1.5 # max allowed stdev for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.STDEV.N1   F32      1.5 # max allowed stdev for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.STDEV.N2   F32      1.5 # max allowed stdev for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.STDEV.N3   F32      1.5 # max allowed stdev for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.STDEV.N4   F32      1.5 # max allowed stdev for valid solution (arcsec)
+PSASTRO.MOSAIC.MAX.STDEV.N5   F32      1.5 # max allowed stdev for valid solution (arcsec)
 
 # need at least this fraction of chips to pass for exposure to be considered acceptable
Index: /trunk/ippconfig/recipes/pswarp.config
===================================================================
--- /trunk/ippconfig/recipes/pswarp.config	(revision 41897)
+++ /trunk/ippconfig/recipes/pswarp.config	(revision 41898)
@@ -14,5 +14,6 @@
 APPLY.PIXELNAN		BOOL	FALSE		# Apply NAN'ing of pixels underneath masks
 
-MAX.CERROR		F32	0.1		# Maximum allowed CERROR value (astrometric error in arcsec)
+MAX.CERROR		F32	0.30	        # Maximum allowed CERROR value (astrometric error in arcsec)
+MAX.CERSTD		F32	0.15		# Maximum allowed CERSTD value (astrometric error in arcsec)
 
 NO.COMPRESS             BOOL    FALSE           # turn off image compression (if enabled)
