Index: /trunk/ippconfig/mcshort/camera.config
===================================================================
--- /trunk/ippconfig/mcshort/camera.config	(revision 9892)
+++ /trunk/ippconfig/mcshort/camera.config	(revision 9893)
@@ -87,11 +87,15 @@
 	# Recipes for ppImage
         PPIMAGE         STR     megacam/ppImage.config          # Default: all (normal) options on
-	PPIMAGE_O	STR	megacam/ppImage_o.config	# Overscan only
-	PPIMAGE_OB	STR	megacam/ppImage_ob.config	# Overscan, bias only
-	PPIMAGE_OBD	STR	megacam/ppImage_obd.config	# Overscan, bias, dark only
-	PPIMAGE_OBDF	STR	megacam/ppImage_obdf.config	# Overscan, bias, dark, flat only
+	PPIMAGE_O	STR	megacam/ppImage_o.config	# Overscan
+	PPIMAGE_OB	STR	megacam/ppImage_ob.config	# Overscan, bias
+	PPIMAGE_OBD	STR	megacam/ppImage_obd.config	# Overscan, bias, dark
+	PPIMAGE_OBDS	STR	megacam/ppImage_obds.config	# Overscan, bias, dark, shutter, flat
+	PPIMAGE_OBDSF	STR	megacam/ppImage_obdsf.config	# Overscan, bias, dark, shutter, flat
+	PPIMAGE_OBDSFR	STR	megacam/ppImage_obdsfr.config	# Overscan, bias, dark, shutter, flat, fringe
 	PPIMAGE_B	STR	megacam/ppImage_b.config	# Bias only
 	PPIMAGE_D	STR	megacam/ppImage_d.config	# Dark only
+	PPIMAGE_S	STR	megacam/ppImage_n.config	# NOTHING --- no need for shutter yet
 	PPIMAGE_F	STR	megacam/ppImage_f.config	# Flat only
+	PPIMAGE_R	STR	megacam/ppImage_r.config	# Fringe only
 	PPIMAGE_J1	STR	megacam/ppImage_j1.config	# JPEG only; binning 1
 	PPIMAGE_J2	STR	megacam/ppImage_j2.config	# JPEG only; binning 2
@@ -103,4 +107,5 @@
 	PPMERGE_DARK	STR	megacam/ppMerge_dark.config
 	PPMERGE_FLAT	STR	megacam/ppMerge_flat.config
+	PPMERGE_FRINGE	STR	megacam/ppMerge_fringe.config
 
 	# Other recipes
@@ -156,4 +161,5 @@
    PPIMAGE.DARK       INPUT MegaCam.dark.2.0.{CHIP.NAME}.fits      {CHIP.NAME}   {CHIP.NAME}  NONE         CHIP       IMAGE     
    PPIMAGE.FLAT       INPUT MegaCam.flat.3.0.{CHIP.NAME}.fits      {CHIP.NAME}   {CHIP.NAME}  NONE         CHIP       IMAGE     
+   PPIMAGE.FRINGE     INPUT MegaCam.fringe.4.0.{CHIP.NAME}.fits    {CHIP.NAME}   {CHIP.NAME}  NONE         CHIP       IMAGE     
 
    ### use these entries to get the detrend images from the database
Index: /trunk/ippconfig/megacam/camera.config
===================================================================
--- /trunk/ippconfig/megacam/camera.config	(revision 9892)
+++ /trunk/ippconfig/megacam/camera.config	(revision 9893)
@@ -88,11 +88,15 @@
 	# Recipes for ppImage
         PPIMAGE         STR     megacam/ppImage.config          # Default: all (normal) options on
-	PPIMAGE_O	STR	megacam/ppImage_o.config	# Overscan only
-	PPIMAGE_OB	STR	megacam/ppImage_ob.config	# Overscan, bias only
-	PPIMAGE_OBD	STR	megacam/ppImage_obd.config	# Overscan, bias, dark only
-	PPIMAGE_OBDF	STR	megacam/ppImage_obdf.config	# Overscan, bias, dark, flat only
+	PPIMAGE_O	STR	megacam/ppImage_o.config	# Overscan
+	PPIMAGE_OB	STR	megacam/ppImage_ob.config	# Overscan, bias
+	PPIMAGE_OBD	STR	megacam/ppImage_obd.config	# Overscan, bias, dark
+	PPIMAGE_OBDS	STR	megacam/ppImage_obds.config	# Overscan, bias, dark, shutter, flat
+	PPIMAGE_OBDSF	STR	megacam/ppImage_obdsf.config	# Overscan, bias, dark, shutter, flat
+	PPIMAGE_OBDSFR	STR	megacam/ppImage_obdsfr.config	# Overscan, bias, dark, shutter, flat, fringe
 	PPIMAGE_B	STR	megacam/ppImage_b.config	# Bias only
 	PPIMAGE_D	STR	megacam/ppImage_d.config	# Dark only
+	PPIMAGE_S	STR	megacam/ppImage_n.config	# NOTHING --- no need for shutter yet
 	PPIMAGE_F	STR	megacam/ppImage_f.config	# Flat only
+	PPIMAGE_R	STR	megacam/ppImage_r.config	# Fringe only
 	PPIMAGE_J1	STR	megacam/ppImage_j1.config	# JPEG only; binning 1
 	PPIMAGE_J2	STR	megacam/ppImage_j2.config	# JPEG only; binning 2
@@ -104,4 +108,5 @@
 	PPMERGE_DARK	STR	megacam/ppMerge_dark.config
 	PPMERGE_FLAT	STR	megacam/ppMerge_flat.config
+	PPMERGE_FRINGE	STR	megacam/ppMerge_fringe.config
 
 	# Other recipes
Index: /trunk/ippconfig/megacam/ppImage.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage.config	(revision 9892)
+++ /trunk/ippconfig/megacam/ppImage.config	(revision 9893)
@@ -3,9 +3,10 @@
 # List of tasks to perform
 MASK		BOOL	FALSE		# Mask bad pixels
-MASK.VALUE      U8      0x10            # only mask pixels matching this bitmask
+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
Index: /trunk/ippconfig/megacam/ppImage_b.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_b.config	(revision 9892)
+++ /trunk/ippconfig/megacam/ppImage_b.config	(revision 9893)
@@ -3,9 +3,10 @@
 # List of tasks to perform
 MASK		BOOL	FALSE		# Mask bad pixels
-MASK.VALUE      U8      0x10            # only mask pixels matching this bitmask
+MASK.VALUE      U8      0xff            # only mask pixels matching this bitmask
 NONLIN		BOOL	FALSE		# Non-linearity correction
 OVERSCAN	BOOL	FALSE		# Overscan subtraction
 BIAS		BOOL	TRUE		# Bias subtraction
 DARK		BOOL	FALSE		# Dark subtraction
+SHUTTER		BOOL	FALSE		# Shutter correction
 FLAT		BOOL	FALSE		# Flat-field normalisation
 FRINGE		BOOL	FALSE		# Fringe subtraction
Index: /trunk/ippconfig/megacam/ppImage_d.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_d.config	(revision 9892)
+++ /trunk/ippconfig/megacam/ppImage_d.config	(revision 9893)
@@ -3,9 +3,10 @@
 # List of tasks to perform
 MASK		BOOL	FALSE		# Mask bad pixels
-MASK.VALUE      U8      0x10            # only mask pixels matching this bitmask
+MASK.VALUE      U8      0xff            # only mask pixels matching this bitmask
 NONLIN		BOOL	FALSE		# Non-linearity correction
 OVERSCAN	BOOL	FALSE		# Overscan subtraction
 BIAS		BOOL	FALSE		# Bias subtraction
 DARK		BOOL	TRUE		# Dark subtraction
+SHUTTER		BOOL	FALSE		# Shutter correction
 FLAT		BOOL	FALSE		# Flat-field normalisation
 FRINGE		BOOL	FALSE		# Fringe subtraction
Index: /trunk/ippconfig/megacam/ppImage_f.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_f.config	(revision 9892)
+++ /trunk/ippconfig/megacam/ppImage_f.config	(revision 9893)
@@ -3,9 +3,10 @@
 # List of tasks to perform
 MASK		BOOL	FALSE		# Mask bad pixels
-MASK.VALUE      U8      0x10            # only mask pixels matching this bitmask
+MASK.VALUE      U8      0xff            # only mask pixels matching this bitmask
 NONLIN		BOOL	FALSE		# Non-linearity correction
 OVERSCAN	BOOL	FALSE		# Overscan subtraction
 BIAS		BOOL	FALSE		# Bias subtraction
 DARK		BOOL	FALSE		# Dark subtraction
+SHUTTER		BOOL	FALSE		# Shutter correction
 FLAT		BOOL	TRUE		# Flat-field normalisation
 FRINGE		BOOL	FALSE		# Fringe subtraction
Index: /trunk/ippconfig/megacam/ppImage_j1.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_j1.config	(revision 9892)
+++ /trunk/ippconfig/megacam/ppImage_j1.config	(revision 9893)
@@ -11,4 +11,5 @@
 BIAS		BOOL	FALSE		# Bias subtraction
 DARK		BOOL	FALSE		# Dark subtraction
+SHUTTER		BOOL	FALSE		# Shutter correction
 FLAT		BOOL	FALSE		# Flat-field normalisation
 FRINGE		BOOL	FALSE		# Fringe subtraction
Index: /trunk/ippconfig/megacam/ppImage_j2.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_j2.config	(revision 9892)
+++ /trunk/ippconfig/megacam/ppImage_j2.config	(revision 9893)
@@ -11,4 +11,5 @@
 BIAS		BOOL	FALSE		# Bias subtraction
 DARK		BOOL	FALSE		# Dark subtraction
+SHUTTER		BOOL	FALSE		# Shutter correction
 FLAT		BOOL	FALSE		# Flat-field normalisation
 FRINGE		BOOL	FALSE		# Fringe subtraction
Index: /trunk/ippconfig/megacam/ppImage_n.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_n.config	(revision 9892)
+++ /trunk/ippconfig/megacam/ppImage_n.config	(revision 9893)
@@ -3,9 +3,10 @@
 # List of tasks to perform
 MASK		BOOL	FALSE		# Mask bad pixels
-MASK.VALUE      U8      0x10            # only mask pixels matching this bitmask
+MASK.VALUE      U8      0xff            # only mask pixels matching this bitmask
 NONLIN		BOOL	FALSE		# Non-linearity correction
 OVERSCAN	BOOL	FALSE		# Overscan subtraction
 BIAS		BOOL	FALSE		# Bias subtraction
 DARK		BOOL	FALSE		# Dark subtraction
+SHUTTER		BOOL	FALSE		# Shutter correction
 FLAT		BOOL	FALSE		# Flat-field normalisation
 FRINGE		BOOL	FALSE		# Fringe subtraction
Index: /trunk/ippconfig/megacam/ppImage_o.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_o.config	(revision 9892)
+++ /trunk/ippconfig/megacam/ppImage_o.config	(revision 9893)
@@ -3,9 +3,10 @@
 # List of tasks to perform
 MASK		BOOL	FALSE		# Mask bad pixels
-MASK.VALUE      U8      0x10            # only mask pixels matching this bitmask
+MASK.VALUE      U8      0xff            # only mask pixels matching this bitmask
 NONLIN		BOOL	FALSE		# Non-linearity correction
 OVERSCAN	BOOL	TRUE		# Overscan subtraction
 BIAS		BOOL	FALSE		# Bias subtraction
 DARK		BOOL	FALSE		# Dark subtraction
+SHUTTER		BOOL	FALSE		# Shutter correction
 FLAT		BOOL	FALSE		# Flat-field normalisation
 FRINGE		BOOL	FALSE		# Fringe subtraction
Index: /trunk/ippconfig/megacam/ppImage_ob.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_ob.config	(revision 9892)
+++ /trunk/ippconfig/megacam/ppImage_ob.config	(revision 9893)
@@ -3,9 +3,10 @@
 # List of tasks to perform
 MASK		BOOL	FALSE		# Mask bad pixels
-MASK.VALUE      U8      0x10            # only mask pixels matching this bitmask
+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	FALSE		# Dark subtraction
+SHUTTER		BOOL	FALSE		# Shutter correction
 FLAT		BOOL	FALSE		# Flat-field normalisation
 FRINGE		BOOL	FALSE		# Fringe subtraction
Index: /trunk/ippconfig/megacam/ppImage_obd.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_obd.config	(revision 9892)
+++ /trunk/ippconfig/megacam/ppImage_obd.config	(revision 9893)
@@ -3,9 +3,10 @@
 # List of tasks to perform
 MASK		BOOL	FALSE		# Mask bad pixels
-MASK.VALUE      U8      0x10            # only mask pixels matching this bitmask
+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	FALSE		# Flat-field normalisation
 FRINGE		BOOL	FALSE		# Fringe subtraction
Index: unk/ippconfig/megacam/ppImage_obdf.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_obdf.config	(revision 9892)
+++ 	(revision )
@@ -1,82 +1,0 @@
-### Phase 2 recipe configuration file
-
-# List of tasks to perform
-MASK		BOOL	FALSE		# Mask bad pixels
-MASK.VALUE      U8      0x10            # 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
-FLAT		BOOL	TRUE		# Flat-field normalisation
-FRINGE		BOOL	FALSE		# Fringe subtraction
-PHOTOM		BOOL	FALSE		# Source identification and photometry
-ASTROM.CHIP	BOOL	FALSE
-ASTROM.MOSAIC	BOOL	FALSE		# Astrometry
-
-BASE.FITS       BOOL    TRUE            # Save base detrended image?
-CHIP.FITS       BOOL   	FALSE           # Save chip-mosaic-ed image? 
-FPA1.FITS       BOOL   	FALSE           # Save 1st binned fpa image? 
-FPA2.FITS       BOOL   	FALSE           # 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	FALSE		# 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		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
-
-# 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/megacam/ppImage_obds.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_obds.config	(revision 9893)
+++ /trunk/ippconfig/megacam/ppImage_obds.config	(revision 9893)
@@ -0,0 +1,83 @@
+### 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	FALSE		# Flat-field normalisation
+FRINGE		BOOL	FALSE		# Fringe subtraction
+PHOTOM		BOOL	FALSE		# Source identification and photometry
+ASTROM.CHIP	BOOL	FALSE
+ASTROM.MOSAIC	BOOL	FALSE		# Astrometry
+
+BASE.FITS       BOOL    TRUE            # Save base detrended image?
+CHIP.FITS       BOOL   	FALSE           # Save chip-mosaic-ed image? 
+FPA1.FITS       BOOL   	FALSE           # Save 1st binned fpa image? 
+FPA2.FITS       BOOL   	FALSE           # 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	FALSE		# 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		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
+
+# 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/megacam/ppImage_obdsf.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_obdsf.config	(revision 9893)
+++ /trunk/ippconfig/megacam/ppImage_obdsf.config	(revision 9893)
@@ -0,0 +1,83 @@
+### 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
+ASTROM.MOSAIC	BOOL	FALSE		# Astrometry
+
+BASE.FITS       BOOL    TRUE            # Save base detrended image?
+CHIP.FITS       BOOL   	FALSE           # Save chip-mosaic-ed image? 
+FPA1.FITS       BOOL   	FALSE           # Save 1st binned fpa image? 
+FPA2.FITS       BOOL   	FALSE           # 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	FALSE		# 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		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
+
+# 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/megacam/ppImage_obdsfr.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_obdsfr.config	(revision 9893)
+++ /trunk/ippconfig/megacam/ppImage_obdsfr.config	(revision 9893)
@@ -0,0 +1,83 @@
+### 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	TRUE		# Fringe subtraction
+PHOTOM		BOOL	FALSE		# Source identification and photometry
+ASTROM.CHIP	BOOL	FALSE
+ASTROM.MOSAIC	BOOL	FALSE		# Astrometry
+
+BASE.FITS       BOOL    TRUE            # Save base detrended image?
+CHIP.FITS       BOOL   	FALSE           # Save chip-mosaic-ed image? 
+FPA1.FITS       BOOL   	FALSE           # Save 1st binned fpa image? 
+FPA2.FITS       BOOL   	FALSE           # 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	FALSE		# 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		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
+
+# 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/megacam/ppImage_r.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage_r.config	(revision 9893)
+++ /trunk/ippconfig/megacam/ppImage_r.config	(revision 9893)
@@ -0,0 +1,87 @@
+### 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	FALSE		# Overscan subtraction
+BIAS		BOOL	FALSE		# Bias subtraction
+DARK		BOOL	FALSE		# Dark subtraction
+SHUTTER		BOOL	FALSE		# Shutter correction
+FLAT		BOOL	FALSE		# Flat-field normalisation
+FRINGE		BOOL	TRUE		# Fringe subtraction
+PHOTOM		BOOL	FALSE		# Source identification and photometry
+ASTROM.CHIP	BOOL	FALSE
+ASTROM.MOSAIC	BOOL	FALSE		# Astrometry
+
+BASE.FITS       BOOL    TRUE            # Save base detrended image?
+CHIP.FITS       BOOL   	FALSE           # Save chip-mosaic-ed image? 
+FPA1.FITS       BOOL   	FALSE           # Save 1st binned fpa image? 
+FPA2.FITS       BOOL   	FALSE           # Save 2nd binned fpa image? 
+BIN1.FITS	BOOL	FALSE		# Save 1st binned chip image?
+BIN2.FITS	BOOL	FALSE		# Save 2nd binned chip image?
+BIN1.JPEG	BOOL	FALSE		# 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		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
+
+# 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}
+
+FRINGE.REJ		F32	2.0
+FRINGE.ITER		S32	3
+FRINGE.KEEP		F32	0.5
Index: /trunk/ippconfig/megacam/ppMerge_fringe.config
===================================================================
--- /trunk/ippconfig/megacam/ppMerge_fringe.config	(revision 9893)
+++ /trunk/ippconfig/megacam/ppMerge_fringe.config	(revision 9893)
@@ -0,0 +1,21 @@
+# 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	2		# Number of iterations for shutter measurement
+SHUTTER.REJECT	F32	3		# Rejection limit for shutter measurement
+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
