Index: /branches/eam_branch_20080408/ippconfig/cfh12k/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/cfh12k/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/cfh12k/camera.config	(revision 17486)
@@ -111,5 +111,5 @@
 REDUCTION	STR	recipes/reductionClasses.mdc
 
-FITS            STR     recipes/fitstypes.mdc
+FITSTYPES       STR     recipes/fitstypes.mdc
 
 FILERULES	STR	recipes/filerules-mef.mdc		# File rules appropriate for MEF format
Index: /branches/eam_branch_20080408/ippconfig/esowfi/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/esowfi/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/esowfi/camera.config	(revision 17486)
@@ -69,76 +69,5 @@
 REDUCTION	STR	recipes/reductionClasses.mdc
 
-FITS    METADATA
-# BITPIX is the bits per pixel for writing the output data
-# COMP = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ] are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE [0..16] is the number of "noise bits" to preserve when quantising floating point data; 16 for no loss
-# HSCALE is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-
-# BITPIX(S32) is the bits per pixel for writing the output data
-# COMPRESSION(STR) = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ](S32) are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE(S32) [0..16] is the number of "noise bits" to preserve when quantising floating point data
-# HSCALE(S32) is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH(S32) is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-# SCALING(STR) = NONE|RANGE|STDEV_POSITIVE|STDEV_NEGATIVE|STDEV_BOTH|MANUAL is the scaling scheme
-# BSCALE(F32) is the manual scaling to apply (when SCALING = MANUAL)
-# BZERO(F32) is the manual zero-point to apply (when SCALING = MANUAL)
-# STDEV.BITS(S32) is the number of bits to map to a standard deviation (when SCALING = STDEV_*)
-# STDEV.NUM(F32) is the number of standard deviations to the edge (when SCALING = STDEV_NEGATIVE|STDEV_POSITIVE)
-# FLOAT(STR) is the name of a custom floating-point type
-
-	DET_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	DET_MASK	METADATA
-		BITPIX		S32	8
-	END
-	DET_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	SKY_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	SKY_MASK	METADATA
-		BITPIX		S32	8
-	END
-	SKY_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	COMPRESSED_POSITIVE	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_POSITIVE
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	10
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_MASK		METADATA
-		COMPRESSION	STR	PLIO
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_SUBTRACTION	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_BOTH
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	5
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-
-END
+FITSTYPES       STR     recipes/fitstypes.mdc
 
 FILERULES	STR	recipes/filerules-mef.mdc		# File rules appropriate for MEF format
Index: /branches/eam_branch_20080408/ippconfig/gpc1/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/gpc1/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/gpc1/camera.config	(revision 17486)
@@ -103,5 +103,5 @@
 REDUCTION	STR	recipes/reductionClasses.mdc
 
-FITS            STR     recipes/fitstypes.mdc
+FITSTYPES       STR     recipes/fitstypes.mdc
 
 FILERULES	STR	recipes/filerules-split.mdc
Index: /branches/eam_branch_20080408/ippconfig/isp/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/isp/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/isp/camera.config	(revision 17486)
@@ -53,5 +53,5 @@
 REDUCTION	STR	recipes/reductionClasses.mdc
 
-FITS            STR     recipes/fitstypes.mdc
+FITSTYPES       STR     recipes/fitstypes.mdc
 
 FILERULES	STR	recipes/filerules-simple.mdc
Index: /branches/eam_branch_20080408/ippconfig/lbc_red/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/lbc_red/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/lbc_red/camera.config	(revision 17486)
@@ -53,19 +53,5 @@
 REDUCTION	STR	recipes/reductionClasses.mdc
 
-FITS    METADATA
-# BITPIX is the bits per pixel for writing the output data
-# COMP = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ] are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE [0..16] is the number of "noise bits" to preserve when quantising floating point data; 16 for no loss
-# HSCALE is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-        TYPE            FITS    FLOAT	BITPIX  COMP     TILE.X  TILE.Y  TILE.Z  NOISE   HSCALE  HSMOOTH
-        DET_IMAGE       FITS    NONE	-32     RICE     0       1       1       16      0       0
-        DET_MASK        FITS    NONE	8       PLIO     0       1       1       0       0       0
-        DET_WEIGHT      FITS    NONE	-32     RICE     0       1       1       16      0       0
-        SKY_IMAGE       FITS    NONE	-32     RICE     0       1       1       16      0       0
-        SKY_MASK        FITS    NONE	8       PLIO     0       1       1       0       0       0
-        SKY_WEIGHT      FITS    NONE	-32     RICE     0       1       1       16      0       0
-END
+FITSTYPES       STR     recipes/fitstypes.mdc
 
 FILERULES	STR	lbc_red/filerules.mdc	# File rules
Index: /branches/eam_branch_20080408/ippconfig/mcshort/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/mcshort/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/mcshort/camera.config	(revision 17486)
@@ -96,133 +96,8 @@
 
 
-FITS    METADATA
-# BITPIX is the bits per pixel for writing the output data
-# COMP = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ] are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE [0..16] is the number of "noise bits" to preserve when quantising floating point data; 16 for no loss
-# HSCALE is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
+# reduction classes (recipes which are grouped together)
+REDUCTION	STR	recipes/reductionClasses.mdc
 
-# BITPIX(S32) is the bits per pixel for writing the output data
-# COMPRESSION(STR) = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ](S32) are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE(S32) [0..16] is the number of "noise bits" to preserve when quantising floating point data
-# HSCALE(S32) is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH(S32) is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-# SCALING(STR) = NONE|RANGE|STDEV_POSITIVE|STDEV_NEGATIVE|STDEV_BOTH|MANUAL is the scaling scheme
-# BSCALE(F32) is the manual scaling to apply (when SCALING = MANUAL)
-# BZERO(F32) is the manual zero-point to apply (when SCALING = MANUAL)
-# STDEV.BITS(S32) is the number of bits to map to a standard deviation (when SCALING = STDEV_*)
-# STDEV.NUM(F32) is the number of standard deviations to the edge (when SCALING = STDEV_NEGATIVE|STDEV_POSITIVE)
-# FLOAT(STR) is the name of a custom floating-point type
+FITSTYPES       STR     recipes/fitstypes.mdc
+FILERULES       STR     recipes/filerules-mef.mdc
 
-	DET_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	DET_MASK	METADATA
-		BITPIX		S32	8
-	END
-	DET_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	SKY_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	SKY_MASK	METADATA
-		BITPIX		S32	8
-	END
-	SKY_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	COMPRESSED_POSITIVE	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_POSITIVE
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	10
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_MASK		METADATA
-		COMPRESSION	STR	PLIO
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_SUBTRACTION	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_BOTH
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	5
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-
-END
-
-FILERULES METADATA
-   ### Redirections
-   PSASTRO.INPUT      STR PSASTRO.INPUT.CMP
-   PSASTRO.OUTPUT     STR PSASTRO.OUTPUT.CMP
-   PSPHOT.OUTPUT      STR PSPHOT.OUTPUT.CMF
-
-   ### input file definitions
-   TYPE               INPUT FILENAME.RULE                 DATA.LEVEL FILE.TYPE
-   PPIMAGE.INPUT      INPUT @FILES                        CHIP       IMAGE
-
-   ### use these entries to get the detrend images from specific files
-   PPIMAGE.MASK       INPUT mcshort/mask.{CHIP.NAME}.fits                            CHIP       MASK
-   PPIMAGE.BIAS       INPUT path://somewhere/MCSHORT.bias.norm.1.2.{CHIP.NAME}.fits  CHIP       IMAGE
-   PPIMAGE.DARK       INPUT path://somewhere/MCSHORT.dark.norm.2.1.{CHIP.NAME}.fits  CHIP       IMAGE
-   PPIMAGE.FLAT       INPUT path://somewhere/MCSHORT.flat.norm.3.1.{CHIP.NAME}.fits  CHIP       IMAGE
-   PPIMAGE.FRINGE     INPUT path://somewhere/fringe.fits	                     CHIP       FRINGE
-
-   ### use these entries to get the detrend images from the database
-   #PPIMAGE.MASK       INPUT @DETDB                       CHIP       IMAGE
-   #PPIMAGE.BIAS       INPUT @DETDB                       CHIP       IMAGE
-   #PPIMAGE.DARK       INPUT @DETDB                       CHIP       IMAGE
-   #PPIMAGE.FLAT       INPUT @DETDB                       CHIP       IMAGE
-
-   PSPHOT.INPUT        INPUT @FILES                       CHIP       IMAGE
-
-   PSASTRO.INPUT.CMP   INPUT @FILES                       CHIP       CMP
-   PSASTRO.INPUT.CMF   INPUT @FILES                       CHIP       CMF
-
-   ### output file definitions
-   TYPE                OUTPUT FILENAME.RULE                  DATA.LEVEL FILE.TYPE FILE.SAVE FILE.FORMAT
-#   PPIMAGE.OUTPUT      OUTPUT {OUTPUT}.{CHIP.NAME}.fits     CHIP       IMAGE     TRUE      NONE
-   PPIMAGE.OUTPUT      OUTPUT {OUTPUT}.fits                  CHIP       IMAGE     TRUE      SPLICED
-   PPIMAGE.OUTPUT.MASK OUTPUT {OUTPUT}.{CHIP.NAME}.mask.fits CHIP       MASK      FALSE     NONE
-   PPIMAGE.OUTPUT.WEIGHT OUTPUT {OUTPUT}.{CHIP.NAME}.wt.fits CHIP       WEIGHT    FALSE     NONE
-   PPIMAGE.BIN1        OUTPUT {OUTPUT}.{CHIP.NAME}.b1.fits   CHIP       IMAGE     TRUE      NONE
-   PPIMAGE.BIN2        OUTPUT {OUTPUT}.{CHIP.NAME}.b2.fits   CHIP       IMAGE     TRUE      NONE
-
-   PPIMAGE.OUTPUT.CHIP OUTPUT {OUTPUT}.{CHIP.NAME}.chip.fits CHIP       IMAGE     TRUE      NONE
-   PPIMAGE.OUTPUT.FPA1 OUTPUT {OUTPUT}.b1.fits               FPA        IMAGE     TRUE      NONE
-   PPIMAGE.OUTPUT.FPA2 OUTPUT {OUTPUT}.b2.fits               FPA        IMAGE     TRUE      NONE
-
-   PPIMAGE.JPEG1       OUTPUT {OUTPUT}.b1.jpg                FPA        JPEG      TRUE      NONE
-   PPIMAGE.JPEG2       OUTPUT {OUTPUT}.b2.jpg                FPA        JPEG      TRUE      NONE
-
-   PSPHOT.RESID        OUTPUT {OUTPUT}.res.fits              CHIP       IMAGE     TRUE      SPLICED
-   PSPHOT.BACKGND      OUTPUT {OUTPUT}.bck.fits              CHIP       IMAGE     TRUE      SPLICED
-   PSPHOT.BACKSUB      OUTPUT {OUTPUT}.sub.fits              CHIP       IMAGE     TRUE      SPLICED
-   PSPHOT.BACKMDL      OUTPUT {OUTPUT}.mdl.fits              CHIP       IMAGE     TRUE      SPLICED
-
-   PSPHOT.OUTPUT.RAW   OUTPUT {OUTPUT}.{CHIP.NAME}           CHIP       RAW       TRUE      NONE
-   PSPHOT.OUTPUT.SX    OUTPUT {OUTPUT}.sx                    CHIP       SX        TRUE      NONE
-   PSPHOT.OUTPUT.OBJ   OUTPUT {OUTPUT}.obj                   CHIP       OBJ       TRUE      NONE
-   PSPHOT.OUTPUT.CMF   OUTPUT {OUTPUT}.cmf                   CHIP       CMF       TRUE      NONE
-   PSPHOT.OUTPUT.CMP   OUTPUT {OUTPUT}.{CHIP.NAME}.cmp       CHIP       CMP       TRUE      NONE
-
-   PSASTRO.OUTPUT.CMP  OUTPUT {OUTPUT}.{CHIP.NAME}.smp       CHIP       CMP       TRUE      NONE
-
-END
Index: /branches/eam_branch_20080408/ippconfig/megacam/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/megacam/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/megacam/camera.config	(revision 17486)
@@ -125,92 +125,5 @@
 REDUCTION	STR	recipes/reductionClasses.mdc
 
-FITS    METADATA
-# BITPIX is the bits per pixel for writing the output data
-# COMP = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ] are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE [0..16] is the number of "noise bits" to preserve when quantising floating point data; 16 for no loss
-# HSCALE is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-
-# BITPIX(S32) is the bits per pixel for writing the output data
-# COMPRESSION(STR) = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ](S32) are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE(S32) [0..16] is the number of "noise bits" to preserve when quantising floating point data
-# HSCALE(S32) is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH(S32) is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-# SCALING(STR) = NONE|RANGE|STDEV_POSITIVE|STDEV_NEGATIVE|STDEV_BOTH|MANUAL is the scaling scheme
-# BSCALE(F32) is the manual scaling to apply (when SCALING = MANUAL)
-# BZERO(F32) is the manual zero-point to apply (when SCALING = MANUAL)
-# STDEV.BITS(S32) is the number of bits to map to a standard deviation (when SCALING = STDEV_*)
-# STDEV.NUM(F32) is the number of standard deviations to the edge (when SCALING = STDEV_NEGATIVE|STDEV_POSITIVE)
-# FLOAT(STR) is the name of a custom floating-point type
-
-	DET_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	DET_MASK	METADATA
-		BITPIX		S32	8
-	END
-	DET_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	SKY_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	SKY_MASK	METADATA
-		BITPIX		S32	8
-	END
-	SKY_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	# Compressed positive image
-	COMP_IMG	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_POSITIVE
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	10
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	# Compressed mask
-	COMP_MASK	METADATA
-		BITPIX		S32	8
-		COMPRESSION	STR	PLIO
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	# Compressed weight image
-	COMP_WT		METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_POSITIVE
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	10
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	# Compressed subtraction image
-	COMP_SUB	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_BOTH
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	5
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-
-END
+FITSTYPES       STR     recipes/fitstypes.mdc
 
 FILERULES	STR	recipes/filerules-mef.mdc		# File rules appropriate for MEF format
Index: /branches/eam_branch_20080408/ippconfig/mosaic2/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/mosaic2/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/mosaic2/camera.config	(revision 17486)
@@ -78,85 +78,5 @@
 REDUCTION	STR	recipes/reductionClasses.mdc
 
-FITS    METADATA
-# BITPIX(S32) is the bits per pixel for writing the output data
-# COMPRESSION(STR) = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ](S32) are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE(S32) [0..16] is the number of "noise bits" to preserve when quantising floating point data
-# HSCALE(S32) is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH(S32) is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-# SCALING(STR) = NONE|RANGE|STDEV_POSITIVE|STDEV_NEGATIVE|STDEV_BOTH|MANUAL is the scaling scheme
-# BSCALE(F32) is the manual scaling to apply (when SCALING = MANUAL)
-# BZERO(F32) is the manual zero-point to apply (when SCALING = MANUAL)
-# STDEV.BITS(S32) is the number of bits to map to a standard deviation (when SCALING = STDEV_*)
-# STDEV.NUM(F32) is the number of standard deviations to the edge (when SCALING = STDEV_NEGATIVE|STDEV_POSITIVE)
-# FLOAT(STR) is the name of a custom floating-point type
-
-        DET_IMAGE       METADATA
-                BITPIX          S32     -32
-        END
-        DET_MASK        METADATA
-                BITPIX          S32     8
-        END
-        DET_WEIGHT      METADATA
-                BITPIX          S32     -32
-        END
-
-        SKY_IMAGE       METADATA
-                BITPIX          S32     -32
-        END
-        SKY_MASK        METADATA
-                BITPIX          S32     8
-        END
-        SKY_WEIGHT      METADATA
-                BITPIX          S32     -32
-        END
-
-        # Compressed positive image
-        COMP_IMG        METADATA
-               BITPIX          S32     16
-               SCALING         STR     STDEV_POSITIVE
-               STDEV.BITS      S32     4
-               STDEV.NUM       F32     10
-               COMPRESSION     STR     RICE
-               TILE.X          S32     0
-               TILE.Y          S32     1
-               TILE.Z          S32     1
-               NOISE           S32     8
-        END
-        # Compressed mask
-        COMP_MASK       METADATA
-               BITPIX          S32     8
-               COMPRESSION     STR     PLIO
-               TILE.X          S32     0
-               TILE.Y          S32     1
-               TILE.Z          S32     1
-               NOISE           S32     8
-        END
-        # Compressed weight image
-        COMP_WT         METADATA
-               BITPIX          S32     16
-               SCALING         STR     STDEV_POSITIVE
-               STDEV.BITS      S32     4
-               STDEV.NUM       F32     10
-               COMPRESSION     STR     RICE
-               TILE.X          S32     0
-               TILE.Y          S32     1
-               TILE.Z          S32     1
-               NOISE           S32     8
-        END
-        # Compressed subtraction image
-        COMP_SUB        METADATA
-               BITPIX          S32     16
-               SCALING         STR     STDEV_BOTH
-               STDEV.BITS      S32     4
-               STDEV.NUM       F32     5
-               COMPRESSION     STR     RICE
-               TILE.X          S32     0
-               TILE.Y          S32     1
-               TILE.Z          S32     1
-               NOISE           S32     8
-        END
-
-END
+FITSTYPES       STR     recipes/fitstypes.mdc
 
 # Set file rules appropriate for mef format (common to all mef cameras)
Index: /branches/eam_branch_20080408/ippconfig/recipes/ppImage.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/recipes/ppImage.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/recipes/ppImage.config	(revision 17486)
@@ -483,5 +483,5 @@
   BIN2.FITS        BOOL    TRUE            # Save 2nd binned chip image?
   PHOTOM           BOOL    TRUE            # Source identification and photometry
-  ASTROM.CHIP      BOOL    TRUE            # Astrometry per chip?
+  ASTROM.CHIP      BOOL    FALSE           # Astrometry per chip?
   ASTROM.MOSAIC    BOOL    FALSE           # Astrometry for mosaic?
 END
Index: /branches/eam_branch_20080408/ippconfig/recipes/reductionClasses.mdc
===================================================================
--- /branches/eam_branch_20080408/ippconfig/recipes/reductionClasses.mdc	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/recipes/reductionClasses.mdc	(revision 17486)
@@ -74,12 +74,12 @@
 # basic science analysis
 DEFAULT		METADATA
-	CHIP		STR	PPIMAGE_OBDSFRA
+	CHIP		STR	PPIMAGE_OBDSFRP
 	JPEG_BIN1       STR     PPIMAGE_J1
 	JPEG_BIN2       STR     PPIMAGE_J2
 END
 
-# photometry & astrometry for pre-detrended images
+# photometry for pre-detrended images
 PROCESSED	METADATA
-	CHIP		STR	PPIMAGE_PA
+	CHIP		STR	PPIMAGE_P
 	JPEG_BIN1       STR     PPIMAGE_J1
 	JPEG_BIN2       STR     PPIMAGE_J2
Index: /branches/eam_branch_20080408/ippconfig/sdss/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/sdss/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/sdss/camera.config	(revision 17486)
@@ -54,77 +54,7 @@
 REDUCTION	STR	recipes/reductionClasses.mdc
 
-FITS    METADATA
-# BITPIX is the bits per pixel for writing the output data
-# COMP = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ] are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE [0..16] is the number of "noise bits" to preserve when quantising floating point data; 16 for no loss
-# HSCALE is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-
-# BITPIX(S32) is the bits per pixel for writing the output data
-# COMPRESSION(STR) = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ](S32) are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE(S32) [0..16] is the number of "noise bits" to preserve when quantising floating point data
-# HSCALE(S32) is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH(S32) is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-# SCALING(STR) = NONE|RANGE|STDEV_POSITIVE|STDEV_NEGATIVE|STDEV_BOTH|MANUAL is the scaling scheme
-# BSCALE(F32) is the manual scaling to apply (when SCALING = MANUAL)
-# BZERO(F32) is the manual zero-point to apply (when SCALING = MANUAL)
-# STDEV.BITS(S32) is the number of bits to map to a standard deviation (when SCALING = STDEV_*)
-# STDEV.NUM(F32) is the number of standard deviations to the edge (when SCALING = STDEV_NEGATIVE|STDEV_POSITIVE)
-# FLOAT(STR) is the name of a custom floating-point type
-
-	DET_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	DET_MASK	METADATA
-		BITPIX		S32	8
-	END
-	DET_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	SKY_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	SKY_MASK	METADATA
-		BITPIX		S32	8
-	END
-	SKY_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	COMPRESSED_POSITIVE	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_POSITIVE
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	10
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_MASK		METADATA
-		COMPRESSION	STR	PLIO
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_SUBTRACTION	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_BOTH
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	5
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-
-END
-
+FITSTYPES       STR     recipes/fitstypes.mdc
+
+## XXX replace with appropriate common filerules?
 FILERULES METADATA
    PSASTRO.INPUT       STR PSASTRO.INPUT.CMF
Index: /branches/eam_branch_20080408/ippconfig/simmosaic/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/simmosaic/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/simmosaic/camera.config	(revision 17486)
@@ -63,236 +63,7 @@
 REDUCTION	STR	recipes/reductionClasses.mdc
 
-FITS    METADATA
-# BITPIX is the bits per pixel for writing the output data
-# COMP = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ] are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE [0..16] is the number of "noise bits" to preserve when quantising floating point data; 16 for no loss
-# HSCALE is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
+FITSTYPES       STR     recipes/fitstypes.mdc
 
-# BITPIX(S32) is the bits per pixel for writing the output data
-# COMPRESSION(STR) = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ](S32) are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE(S32) [0..16] is the number of "noise bits" to preserve when quantising floating point data
-# HSCALE(S32) is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH(S32) is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-# SCALING(STR) = NONE|RANGE|STDEV_POSITIVE|STDEV_NEGATIVE|STDEV_BOTH|MANUAL is the scaling scheme
-# BSCALE(F32) is the manual scaling to apply (when SCALING = MANUAL)
-# BZERO(F32) is the manual zero-point to apply (when SCALING = MANUAL)
-# STDEV.BITS(S32) is the number of bits to map to a standard deviation (when SCALING = STDEV_*)
-# STDEV.NUM(F32) is the number of standard deviations to the edge (when SCALING = STDEV_NEGATIVE|STDEV_POSITIVE)
-# FLOAT(STR) is the name of a custom floating-point type
-
-	DET_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	DET_MASK	METADATA
-		BITPIX		S32	8
-	END
-	DET_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	SKY_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	SKY_MASK	METADATA
-		BITPIX		S32	8
-	END
-	SKY_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	COMPRESSED_POSITIVE	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_POSITIVE
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	10
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_MASK		METADATA
-		COMPRESSION	STR	PLIO
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_SUBTRACTION	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_BOTH
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	5
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-
-END
-
-FILERULES METADATA
-   ### Redirections
-   PSASTRO.INPUT      STR PSASTRO.INPUT.CMF
-   PSASTRO.OUTPUT     STR PSASTRO.OUT.CMF.SPL
-   PSASTRO.OUTPUT.MEF STR PSASTRO.OUT.CMF.MEF
-   PSPHOT.OUTPUT      STR PSPHOT.OUT.CMF.SPL
-
-   ### input file definitions
-   ### use @DETDB entries to get the detrend images from the database
-   ### replace @DETDB with @FILES if you want to require it from the 
-   ### command line, or with an explicit name to require a specific file
-   TYPE               INPUT FILENAME.RULE DATA.LEVEL FILE.TYPE 
-
-   ## files used by ppImage
-   PPIMAGE.INPUT      INPUT @FILES        CHIP       IMAGE     
-   PPIMAGE.MASK       INPUT @DETDB        CELL       IMAGE     
-   PPIMAGE.BIAS       INPUT @DETDB        CELL       IMAGE     
-   PPIMAGE.DARK       INPUT @DETDB        CELL       DARK     
-   PPIMAGE.FLAT       INPUT @DETDB        CELL       IMAGE     
-   PPIMAGE.FRINGE     INPUT @DETDB        CHIP       FRINGE     
-   PPIMAGE.SHUTTER    INPUT @DETDB        CELL       IMAGE     
-
-   ## Files used by ppMerge
-   PPMERGE.INPUT      INPUT @FILES        CHIP       IMAGE
-   PPMERGE.INPUT.MASK INPUT @FILES        CHIP       MASK
-   PPMERGE.INPUT.WEIGHT INPUT @FILES      CHIP       WEIGHT
-
-   ## files used to build and apply the flat-field correction images
-   DVOCORR.INPUT      INPUT @FILES        CHIP       IMAGE     
-   DVOCORR.REFHEAD    INPUT @FILES        CHIP       HEADER     
-   DVOFLAT.INPUT      INPUT @FILES        CHIP       IMAGE 	
-   DVOFLAT.CORR       INPUT @DETDB        CHIP       IMAGE 	
-
-   ## files used by psphot 
-   PSPHOT.LOAD        INPUT @FILES        CHIP       IMAGE     
-   PSPHOT.INPUT       INPUT @FILES        CHIP       IMAGE     
-   PSPHOT.MASK        INPUT @FILES        CHIP       MASK     
-   PSPHOT.WEIGHT      INPUT @FILES        CHIP       WEIGHT     
-   PSPHOT.PSF.LOAD    INPUT @FILES        CHIP	     PSF       
-   PSPHOT.INPUT.CMF   INPUT @FILES        CHIP	     CMF       
-
-   ## files used by psastro 
-   PSASTRO.INPUT.CMF  INPUT @FILES        CHIP       CMF       
-
-   ## files used by pswarp
-   PSWARP.INPUT       INPUT @FILES        CHIP       IMAGE     
-   PSWARP.SKYCELL     INPUT @FILES        FPA        IMAGE     
-   PSWARP.WEIGHT      INPUT @FILES        CHIP       WEIGHT
-   PSWARP.MASK        INPUT @FILES        CHIP       MASK
-   PSWARP.ASTROM      INPUT @FILES        CHIP       CMF       
-
-   PPSUB.INPUT        INPUT    none.fits  FPA	     IMAGE
-   PPSUB.INPUT.MASK   INPUT    none.fits  FPA	     MASK
-   PPSUB.INPUT.WEIGHT INPUT    none.fits  FPA	     WEIGHT
-   PPSUB.REF          INPUT    none.fits  FPA	     IMAGE
-   PPSUB.REF.MASK     INPUT    none.fits  FPA	     MASK
-   PPSUB.REF.WEIGHT   INPUT    none.fits  FPA	     WEIGHT
-
-   PPSTACK.INPUT      INPUT    none.fits  FPA	     IMAGE
-   PPSTACK.INPUT.MASK INPUT    none.fits  FPA	     MASK
-   PPSTACK.INPUT.WEIGHT INPUT  none.fits  FPA	     WEIGHT
-
-   PPSTAMP.INPUT      INPUT @FILES        CHIP       IMAGE
-
-   PPARITH.INPUT.IMAGE INPUT @FILES        CHIP       IMAGE
-   PPARITH.INPUT.MASK  INPUT @FILES        CHIP       MASK
-
-
-   ### output file definitions
-   TYPE                OUTPUT   FILENAME.RULE      	       FILE.TYPE FITS.TYPE DATA.LEVEL FILE.SAVE FILE.FORMAT
-   PPIMAGE.OUTPUT      OUTPUT   {OUTPUT}.{CHIP.NAME}.fits      IMAGE     NONE      CHIP       TRUE      SPLIT
-   PPIMAGE.OUTPUT.MASK OUTPUT   {OUTPUT}.{CHIP.NAME}.mask.fits MASK      NONE      CHIP       TRUE      SPLIT
-   PPIMAGE.OUTPUT.WEIGHT OUTPUT {OUTPUT}.{CHIP.NAME}.wt.fits   WEIGHT    NONE      CHIP       TRUE      SPLIT
-   PPIMAGE.CHIP        OUTPUT 	{OUTPUT}.{CHIP.NAME}.ch.fits   IMAGE     NONE      CHIP       TRUE      SPLIT
-   PPIMAGE.CHIP.MASK   OUTPUT 	{OUTPUT}.{CHIP.NAME}.ch.mask.fits MASK   NONE      CHIP       TRUE      SPLIT
-   PPIMAGE.CHIP.WEIGHT OUTPUT 	{OUTPUT}.{CHIP.NAME}.ch.wt.fits WEIGHT   NONE      CHIP       TRUE      SPLIT
-   PPIMAGE.OUTPUT.FPA1 OUTPUT 	{OUTPUT}.fpa1.fits             IMAGE     NONE      FPA        TRUE      NONE
-   PPIMAGE.OUTPUT.FPA2 OUTPUT 	{OUTPUT}.fpa2.fits             IMAGE     NONE      FPA        TRUE      NONE
-   PPIMAGE.STATS       OUTPUT   {OUTPUT}.stats                 STATS     NONE      FPA        TRUE      NONE
-
-   PPIMAGE.JPEG1       OUTPUT   {OUTPUT}.b1.jpg    	       JPEG      NONE      FPA        TRUE      NONE
-   PPIMAGE.JPEG2       OUTPUT   {OUTPUT}.b2.jpg    	       JPEG      NONE      FPA        TRUE      NONE
-   PPIMAGE.BIN1        OUTPUT   {OUTPUT}.{CHIP.NAME}.b1.fits   IMAGE     NONE      CHIP       TRUE      SPLIT
-   PPIMAGE.BIN2        OUTPUT   {OUTPUT}.{CHIP.NAME}.b2.fits   IMAGE     NONE      CHIP       TRUE      SPLIT
-
-   PPMERGE.OUTPUT.MASK   OUTPUT {OUTPUT}.{CHIP.NAME}.fits      MASK      NONE      CHIP       TRUE      SPLIT
-   PPMERGE.OUTPUT.BIAS   OUTPUT {OUTPUT}.{CHIP.NAME}.fits      IMAGE     NONE      CHIP       TRUE      SPLIT
-   PPMERGE.OUTPUT.DARK   OUTPUT {OUTPUT}.{CHIP.NAME}.fits      DARK      NONE      CHIP       TRUE      SPLIT
-   PPMERGE.OUTPUT.SHUTTER OUTPUT {OUTPUT}.{CHIP.NAME}.fits     IMAGE     NONE      CHIP       TRUE      SPLIT
-   PPMERGE.OUTPUT.FLAT   OUTPUT {OUTPUT}.{CHIP.NAME}.fits      IMAGE     NONE      CHIP       TRUE      SPLIT
-   PPMERGE.OUTPUT.FRINGE OUTPUT {OUTPUT}.{CHIP.NAME}.fits      FRINGE    NONE      CHIP       TRUE      SPLIT
-   PPMERGE.OUTPUT.SIGMA  OUTPUT {OUTPUT}.sigma.fits            IMAGE     NONE      CHIP       TRUE      NONE
-   PPMERGE.OUTPUT.COUNT  OUTPUT {OUTPUT}.count.fits            IMAGE     NONE      CHIP       TRUE      NONE
-
-   DVOCORR.OUTPUT      OUTPUT 	{OUTPUT}.{CHIP.NAME}.fc.fits   IMAGE     NONE      CHIP       TRUE      NONE
-   DVOFLAT.OUTPUT      OUTPUT 	{OUTPUT}.{CHIP.NAME}.co.fits   IMAGE     NONE      CHIP       TRUE      NONE
-
-   PSPHOT.RESID        OUTPUT   {OUTPUT}.{CHIP.NAME}.res.fits  IMAGE     NONE      CHIP       TRUE      NONE
-   PSPHOT.BACKGND      OUTPUT   {OUTPUT}.{CHIP.NAME}.bck.fits  IMAGE     NONE      CHIP       TRUE      NONE
-   PSPHOT.BACKSUB      OUTPUT   {OUTPUT}.{CHIP.NAME}.sub.fits  IMAGE     NONE      CHIP       TRUE      NONE
-   PSPHOT.BACKMDL      OUTPUT   {OUTPUT}.{CHIP.NAME}.mdl.fits  IMAGE     NONE      CHIP       TRUE      NONE
-   PSPHOT.BACKMDL.STDEV OUTPUT   {OUTPUT}.{CHIP.NAME}.mdd.fits IMAGE     NONE      CHIP       TRUE      NONE
-
-   PSPHOT.OUTPUT.RAW   OUTPUT   {OUTPUT}.{CHIP.NAME}           RAW       NONE      CHIP       TRUE      NONE
-   PSPHOT.OUTPUT.SX    OUTPUT   {OUTPUT}.{CHIP.NAME}.sx        SX        NONE      CHIP       TRUE      NONE
-   PSPHOT.OUTPUT.OBJ   OUTPUT   {OUTPUT}.{CHIP.NAME}.obj       OBJ       NONE      CHIP       TRUE      NONE
-   PSPHOT.OUT.CMF.SPL  OUTPUT   {OUTPUT}.{CHIP.NAME}.cmf       CMF       NONE      CHIP       TRUE      NONE
-   PSPHOT.OUT.CMF.MEF  OUTPUT   {OUTPUT}.cmf                   CMF       NONE      FPA        TRUE      NONE
-
-   PSPHOT.PSF.SAVE     OUTPUT   {OUTPUT}.{CHIP.NAME}.psf       PSF       NONE      CHIP       TRUE      NONE
-
-   SOURCE.PLOT.MOMENTS  OUTPUT  {OUTPUT}.{CHIP.NAME}.mnt.png   KAPA      NONE      CHIP       TRUE      NONE
-   SOURCE.PLOT.PSFMODEL OUTPUT  {OUTPUT}.{CHIP.NAME}.psf.png   KAPA      NONE      CHIP       TRUE      NONE
-   SOURCE.PLOT.APRESID  OUTPUT  {OUTPUT}.{CHIP.NAME}.dap.png   KAPA      NONE      CHIP       TRUE      NONE
-
-   PSASTRO.OUTPUT.CMP   OUTPUT   {OUTPUT}.{CHIP.NAME}.smp      CMP       NONE      CHIP       TRUE      SPLIT
-   PSASTRO.OUT.CMF.SPL  OUTPUT   {OUTPUT}.{CHIP.NAME}.smf      CMF       NONE      CHIP       TRUE      SPLIT
-   PSASTRO.OUT.CMF.MEF  OUTPUT   {OUTPUT}.smf		       CMF       NONE      FPA        TRUE      TOGETHER
-
-   PSWARP.OUTPUT       OUTPUT   {OUTPUT}.fits      	       IMAGE     NONE      FPA        TRUE      NONE
-   PSWARP.OUTPUT.MASK  OUTPUT   {OUTPUT}.mask.fits             MASK      NONE      FPA        TRUE      NONE
-   PSWARP.OUTPUT.WEIGHT OUTPUT  {OUTPUT}.wt.fits               WEIGHT    NONE      FPA        TRUE      NONE
-   PSWARP.BIN1         OUTPUT   {OUTPUT}.b1.fits   	       IMAGE     NONE      FPA        TRUE      NONE
-   PSWARP.BIN2         OUTPUT   {OUTPUT}.b2.fits   	       IMAGE     NONE      FPA        TRUE      NONE
-
-   SKYCELL.STATS       OUTPUT   {OUTPUT}.stats                 STATS     NONE      FPA        TRUE      NONE
-   SKYCELL.TEMPLATE    OUTPUT   {OUTPUT}.skycell               SKYCELL   NONE      FPA        TRUE      NONE
-
-   PPSUB.OUTPUT        OUTPUT   {OUTPUT}.fits                  IMAGE     NONE      FPA        TRUE      NONE
-   PPSUB.OUTPUT.MASK   OUTPUT   {OUTPUT}.mask.fits             MASK      NONE      FPA        TRUE      NONE
-   PPSUB.OUTPUT.WEIGHT OUTPUT   {OUTPUT}.wt.fits               WEIGHT    NONE      FPA        TRUE      NONE
-
-   PPSTACK.OUTPUT      OUTPUT   {OUTPUT}.fits                  IMAGE     NONE      FPA        TRUE      NONE
-   PPSTACK.OUTPUT.MASK OUTPUT   {OUTPUT}.mask.fits             MASK      NONE      FPA        TRUE      NONE
-   PPSTACK.OUTPUT.WEIGHT OUTPUT {OUTPUT}.weight.fits           WEIGHT    NONE      FPA        TRUE      NONE
-
-   PPSTAMP.OUTPUT        OUTPUT {OUTPUT}.fits                  IMAGE     NONE      FPA        TRUE      NONE
-   PPSTAMP.CHIP.MEF      OUTPUT {OUTPUT}.ch.fits               IMAGE     NONE      CHIP       FALSE     MEF
-
-   PPSIM.OUTPUT        OUTPUT   {OUTPUT}.{CHIP.NAME}.fits      IMAGE     NONE      CHIP       TRUE      SPLIT
-   PPSIM.SOURCES       OUTPUT   {OUTPUT}.cmf                   CMF       NONE      FPA        TRUE      NONE
-
-   PPARITH.OUTPUT.IMAGE  OUTPUT {OUTPUT}.fits                  IMAGE     NONE      CHIP       TRUE      NONE
-   PPARITH.OUTPUT.MASK   OUTPUT {OUTPUT}.fits                  MASK     NONE      CHIP       TRUE      NONE
-
-   LOG.IMFILE            OUTPUT {OUTPUT}.{CHIP.NAME}.log       TEXT      NONE      CHIP       TRUE      NONE
-   LOG.EXP               OUTPUT {OUTPUT}.log                   TEXT      NONE      FPA        TRUE      NONE
-END
-
-# FPA file defines properties of a possible input|output object
-# user can set the filename (I|O), filename rules (O), or abstract source (@FILES, @DETDB) (I) 
-# user can set the extension name, if used
-# user can set the file type (IMAGE, JPEG, RAW, SX, OBJ, CMP, CMF) : but these are not variable in most cases!
-# user can set the file depth: only valid for output files
-# user can set the data depth: must be >= file depth
-# user can set the file format: only valid for newly created FPAs
-# user can set the colormap, scaling method, scaling range (JPEG only)
-# user can set the extension name for the data and header segments (CMF only)
-
+FILERULES       STR     recipes/filerules-mef.mdc
 
 EXTNAME.RULES	METADATA
Index: /branches/eam_branch_20080408/ippconfig/simple/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/simple/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/simple/camera.config	(revision 17486)
@@ -48,7 +48,7 @@
 REDUCTION	STR	recipes/reductionClasses.mdc
 
-FITS            STR     recipes/fitstypes.mdc
+FITSTYPES       STR     recipes/fitstypes.mdc
 
-FILERULES STR recipes/filerules-simple.mdc
+FILERULES       STR     recipes/filerules-simple.mdc
 
 EXTNAME.RULES METADATA
Index: /branches/eam_branch_20080408/ippconfig/simtest/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/simtest/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/simtest/camera.config	(revision 17486)
@@ -51,5 +51,5 @@
 REDUCTION	STR	recipes/reductionClasses.mdc
 
-FITS            STR     recipes/fitstypes.mdc
+FITSTYPES       STR     recipes/fitstypes.mdc
 
 FILERULES	STR	recipes/filerules-simple.mdc
Index: /branches/eam_branch_20080408/ippconfig/tc3/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/tc3/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/tc3/camera.config	(revision 17486)
@@ -65,143 +65,7 @@
 END
 
-FITS    METADATA
-# BITPIX is the bits per pixel for writing the output data
-# COMP = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ] are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE [0..16] is the number of "noise bits" to preserve when quantising floating point data; 16 for no loss
-# HSCALE is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
+FITSTYPES       STR     recipes/fitstypes.mdc
 
-# BITPIX(S32) is the bits per pixel for writing the output data
-# COMPRESSION(STR) = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ](S32) are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE(S32) [0..16] is the number of "noise bits" to preserve when quantising floating point data
-# HSCALE(S32) is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH(S32) is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-# SCALING(STR) = NONE|RANGE|STDEV_POSITIVE|STDEV_NEGATIVE|STDEV_BOTH|MANUAL is the scaling scheme
-# BSCALE(F32) is the manual scaling to apply (when SCALING = MANUAL)
-# BZERO(F32) is the manual zero-point to apply (when SCALING = MANUAL)
-# STDEV.BITS(S32) is the number of bits to map to a standard deviation (when SCALING = STDEV_*)
-# STDEV.NUM(F32) is the number of standard deviations to the edge (when SCALING = STDEV_NEGATIVE|STDEV_POSITIVE)
-# FLOAT(STR) is the name of a custom floating-point type
-
-	DET_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	DET_MASK	METADATA
-		BITPIX		S32	8
-	END
-	DET_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	SKY_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	SKY_MASK	METADATA
-		BITPIX		S32	8
-	END
-	SKY_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	COMPRESSED_POSITIVE	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_POSITIVE
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	10
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_MASK		METADATA
-		COMPRESSION	STR	PLIO
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_SUBTRACTION	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_BOTH
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	5
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-
-END
-
-FILERULES METADATA
-   ### Redirections
-   PSASTRO.INPUT      STR PSASTRO.INPUT.CMP
-   PSASTRO.OUTPUT     STR PSASTRO.OUTPUT.CMP
-   PSPHOT.OUTPUT      STR PSPHOT.OUTPUT.CMF
-   DVOCORR.OUTPUT     STR DVOCORR.MEF.OUTPUT
-   DVOFLAT.OUTPUT     STR DVOFLAT.MEF.OUTPUT
-
-   ### input file definitions
-   TYPE               INPUT FILENAME.RULE                 DATA.LEVEL FILE.TYPE 
-   PPIMAGE.INPUT      INPUT @FILES                        CHIP       IMAGE
-
-   ## can we just use PPIMAGE.INPUT as the pmFPAfile name?
-   DVOCORR.INPUT      INPUT @FILES                        CHIP       IMAGE     
-   DVOCORR.REFHEAD    INPUT @FILES                        CHIP       HEADER     
-
-   DVOFLAT.INPUT      INPUT @FILES                        CHIP       IMAGE 	
-   DVOFLAT.CORR       INPUT @DETDB                        CHIP       IMAGE 	
-
-   ### use these entries to get the detrend images from the database
-   PPIMAGE.MASK       INPUT @DETDB                        CHIP       IMAGE
-   PPIMAGE.BIAS       INPUT @DETDB                        CHIP       IMAGE
-   PPIMAGE.DARK       INPUT @DETDB                        CHIP       IMAGE
-   PPIMAGE.FLAT       INPUT @DETDB                        CHIP       IMAGE
-   PPIMAGE.FRINGE     INPUT @DETDB                        CHIP       FRINGE     
-
-   PSPHOT.INPUT       INPUT @FILES                        CHIP       IMAGE     
-   PSASTRO.INPUT.CMP  INPUT @FILES                        CHIP       CMP       
-   PSASTRO.INPUT.CMF  INPUT @FILES                        CHIP       CMF       
-
-
-   ### output file definitions
-   TYPE                OUTPUT FILENAME.RULE                  FILE.TYPE FITS.TYPE DATA.LEVEL FILE.SAVE FILE.FORMAT
-   PPIMAGE.OUTPUT      OUTPUT {OUTPUT}.{CHIP.NAME}.fits      IMAGE     NONE      CHIP       TRUE      NONE
-   PPIMAGE.OUTPUT.MASK OUTPUT {OUTPUT}.{CHIP.NAME}.mask.fits MASK      NONE      CHIP       TRUE      NONE
-   PPIMAGE.OUTPUT.WEIGHT OUTPUT {OUTPUT}.{CHIP.NAME}.wt.fits WEIGHT    NONE      CHIP       TRUE      NONE
-   PPIMAGE.BIN1        OUTPUT {OUTPUT}.{CHIP.NAME}.b1.fits   IMAGE     NONE      CHIP       TRUE      NONE
-   PPIMAGE.BIN2        OUTPUT {OUTPUT}.{CHIP.NAME}.b2.fits   IMAGE     NONE      CHIP       TRUE      NONE
-   DVOCORR.MEF.OUTPUT  OUTPUT {OUTPUT}.fc.fits               IMAGE     NONE      CHIP       TRUE      NONE
-   DVOCORR.SPL.OUTPUT  OUTPUT {OUTPUT}.{CHIP.NAME}.fc.fits   IMAGE     NONE      CHIP       TRUE      NONE
-   DVOFLAT.MEF.OUTPUT  OUTPUT {OUTPUT}.co.fits               IMAGE     NONE      CHIP       TRUE      NONE
-   DVOFLAT.SPL.OUTPUT  OUTPUT {OUTPUT}.{CHIP.NAME}.co.fits   IMAGE     NONE      CHIP       TRUE      NONE
-
-   PPIMAGE.OUTPUT.CHIP OUTPUT {OUTPUT}.{CHIP.NAME}.chip.fits IMAGE     NONE      CHIP       TRUE      NONE
-   PPIMAGE.OUTPUT.FPA1 OUTPUT {OUTPUT}.b1.fits               IMAGE     NONE      FPA        TRUE      NONE
-   PPIMAGE.OUTPUT.FPA2 OUTPUT {OUTPUT}.b2.fits               IMAGE     NONE      FPA        TRUE      NONE
-
-   PPIMAGE.JPEG1       OUTPUT {OUTPUT}.b1.jpg                JPEG      NONE      FPA        TRUE      NONE
-   PPIMAGE.JPEG2       OUTPUT {OUTPUT}.b2.jpg                JPEG      NONE      FPA        TRUE      NONE
-
-   PSPHOT.RESID        OUTPUT {OUTPUT}.res.fits              IMAGE     NONE      CHIP       TRUE      NONE
-   PSPHOT.BACKGND      OUTPUT {OUTPUT}.bck.fits              IMAGE     NONE      CHIP       TRUE      NONE
-   PSPHOT.BACKSUB      OUTPUT {OUTPUT}.sub.fits              IMAGE     NONE      CHIP       TRUE      NONE
-   PSPHOT.BACKMDL      OUTPUT {OUTPUT}.mdl.fits              IMAGE     NONE      CHIP       TRUE      NONE
-
-   PSPHOT.OUTPUT.RAW   OUTPUT {OUTPUT}.{CHIP.NAME}           RAW       NONE      CHIP       TRUE      NONE
-   PSPHOT.OUTPUT.SX    OUTPUT {OUTPUT}.sx                    SX        NONE      CHIP       TRUE      NONE
-   PSPHOT.OUTPUT.OBJ   OUTPUT {OUTPUT}.obj                   OBJ       NONE      CHIP       TRUE      NONE
-   PSPHOT.OUTPUT.CMF   OUTPUT {OUTPUT}.cmf                   CMF       NONE      CHIP       TRUE      NONE
-   PSPHOT.OUTPUT.CMP   OUTPUT {OUTPUT}.{CHIP.NAME}.cmp       CMP       NONE      CHIP       TRUE      NONE
-
-   PSASTRO.OUTPUT.CMP  OUTPUT {OUTPUT}.{CHIP.NAME}.smp       CMP       NONE      CHIP       TRUE      NONE
-
-   LOG.IMFILE            OUTPUT {OUTPUT}.{CHIP.NAME}.log     TEXT      NONE      CHIP       TRUE      NONE
-   LOG.EXP               OUTPUT {OUTPUT}.log                 TEXT      NONE      FPA        TRUE      NONE
-END
+FILERULES       STR     recipes/filerules-split.mdc
 
 BLANK.HEADERS	METADATA
Index: /branches/eam_branch_20080408/ippconfig/tek/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/tek/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/tek/camera.config	(revision 17486)
@@ -51,196 +51,7 @@
 END
 
-FITS    METADATA
-# BITPIX is the bits per pixel for writing the output data
-# COMP = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ] are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE [0..16] is the number of "noise bits" to preserve when quantising floating point data; 16 for no loss
-# HSCALE is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
+FITSTYPES       STR     recipes/fitstypes.mdc
 
-# BITPIX(S32) is the bits per pixel for writing the output data
-# COMPRESSION(STR) = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ](S32) are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE(S32) [0..16] is the number of "noise bits" to preserve when quantising floating point data
-# HSCALE(S32) is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH(S32) is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-# SCALING(STR) = NONE|RANGE|STDEV_POSITIVE|STDEV_NEGATIVE|STDEV_BOTH|MANUAL is the scaling scheme
-# BSCALE(F32) is the manual scaling to apply (when SCALING = MANUAL)
-# BZERO(F32) is the manual zero-point to apply (when SCALING = MANUAL)
-# STDEV.BITS(S32) is the number of bits to map to a standard deviation (when SCALING = STDEV_*)
-# STDEV.NUM(F32) is the number of standard deviations to the edge (when SCALING = STDEV_NEGATIVE|STDEV_POSITIVE)
-# FLOAT(STR) is the name of a custom floating-point type
-
-	DET_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	DET_MASK	METADATA
-		BITPIX		S32	8
-	END
-	DET_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	SKY_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	SKY_MASK	METADATA
-		BITPIX		S32	8
-	END
-	SKY_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	COMPRESSED_POSITIVE	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_POSITIVE
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	10
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_MASK		METADATA
-		COMPRESSION	STR	PLIO
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_SUBTRACTION	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_BOTH
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	5
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-
-END
-
-FILERULES METADATA
-   PSASTRO.INPUT       STR PSASTRO.INPUT.CMF
-   PSASTRO.OUTPUT      STR PSASTRO.OUTPUT.CMF
-   PSASTRO.OUTPUT.MEF  STR PSASTRO.OUTPUT.CMF
-   PSPHOT.OUTPUT       STR PSPHOT.OUTPUT.CMF
-
-   ### input file definitions
-   ### use @DETDB entries to get the detrend images from the database
-   ### replace @DETDB with @FILES if you want to require it from the 
-   ### command line, or with an explicit name to require a specific file
-   TYPE               INPUT FILENAME.RULE DATA.LEVEL FILE.TYPE 
-
-   ## files used by ppImage
-   PPIMAGE.INPUT      INPUT @FILES        FPA        IMAGE     
-   PPIMAGE.MASK       INPUT mask.fits     FPA        IMAGE     
-   PPIMAGE.BIAS       INPUT @DETDB        FPA        IMAGE     
-   PPIMAGE.DARK       INPUT @DETDB        FPA        IMAGE     
-   PPIMAGE.FLAT       INPUT @DETDB        FPA        IMAGE     
-   PPIMAGE.FRINGE     INPUT @DETDB        FPA        FRINGE
-   PPIMAGE.SHUTTER    INPUT @DETDB        FPA        IMAGE     
-
-   ## files used to build and apply the flat-field correction images
-   DVOCORR.INPUT      INPUT @FILES        FPA        IMAGE
-   DVOCORR.REFHEAD    INPUT @FILES        FPA        HEADER
-   DVOFLAT.INPUT      INPUT @FILES        FPA        IMAGE
-   DVOFLAT.CORR       INPUT @DETDB        FPA        IMAGE
-
-   ## files used by psphot 
-   PSPHOT.LOAD        INPUT @FILES        FPA        IMAGE
-   PSPHOT.INPUT       INPUT @FILES        FPA        IMAGE     
-   PSPHOT.MASK        INPUT @FILES        FPA        MASK     
-   PSPHOT.WEIGHT      INPUT @FILES        FPA        WEIGHT     
-   PSPHOT.PSF.LOAD    INPUT @FILES        FPA        PSF       
-
-   ## files used by psastro 
-   PSASTRO.INPUT.CMP  INPUT @FILES        FPA        CMP       
-   PSASTRO.INPUT.CMF  INPUT @FILES        FPA        CMF       
-
-   ## files used by pswarp
-   PSWARP.INPUT       INPUT @FILES        FPA        IMAGE
-   PSWARP.WEIGHT      INPUT @FILES        FPA        WEIGHT
-   PSWARP.MASK        INPUT @FILES        FPA        MASK
-   PSWARP.SKYCELL     INPUT @FILES        FPA        IMAGE
-   PSWARP.ASTROM      INPUT @FILES        FPA        CMF
-
-
-   PPSUB.INPUT        INPUT    none.fits                     FPA	IMAGE
-   PPSUB.INPUT.MASK   INPUT    none.fits                     FPA	MASK
-   PPSUB.INPUT.WEIGHT INPUT    none.fits                     FPA	WEIGHT
-   PPSUB.REF          INPUT    none.fits                     FPA	IMAGE
-   PPSUB.REF.MASK     INPUT    none.fits                     FPA	MASK
-   PPSUB.REF.WEIGHT   INPUT    none.fits                     FPA	WEIGHT
-
-   PPSTACK.INPUT      INPUT    none.fits                     FPA	IMAGE
-   PPSTACK.INPUT.MASK INPUT    none.fits                     FPA	MASK
-
-   PPARITH.INPUT.IMAGE INPUT @FILES        CHIP       IMAGE
-   PPARITH.INPUT.MASK  INPUT @FILES        CHIP       MASK
-
-   ### output file definitions
-   TYPE                  OUTPUT  FILENAME.RULE         FILE.TYPE FITS.TYPE DATA.LEVEL FILE.SAVE FILE.FORMAT
-   PPIMAGE.OUTPUT      	 OUTPUT  {OUTPUT}.tek.fits     IMAGE     NONE      FPA        TRUE      NONE
-   PPIMAGE.OUTPUT.MASK 	 OUTPUT  {OUTPUT}.mask.fits    MASK      NONE      FPA        TRUE      NONE
-   PPIMAGE.OUTPUT.WEIGHT OUTPUT  {OUTPUT}.wt.fits      WEIGHT    NONE      FPA        TRUE      NONE
-   PPIMAGE.CHIP 	 OUTPUT  {OUTPUT}.chip.fits    IMAGE     NONE      FPA        TRUE      NONE
-   PPIMAGE.CHIP.MASK     OUTPUT  {OUTPUT}.chip.mk.fits MASK      NONE      FPA        TRUE      NONE
-   PPIMAGE.CHIP.WEIGHT   OUTPUT  {OUTPUT}.chip.wt.fits WEIGHT    NONE      FPA        TRUE      NONE
-
-   PPIMAGE.OUTPUT.FPA1 	 OUTPUT  {OUTPUT}.b1.fits      IMAGE     NONE      FPA        TRUE      NONE
-   PPIMAGE.OUTPUT.FPA2 	 OUTPUT  {OUTPUT}.b2.fits      IMAGE     NONE      FPA        TRUE      NONE
-
-   PPIMAGE.BIN1        	 OUTPUT  {OUTPUT}.b1c.fits     IMAGE     NONE      FPA        TRUE      NONE
-   PPIMAGE.BIN2        	 OUTPUT  {OUTPUT}.b2c.fits     IMAGE     NONE      FPA        TRUE      NONE
-
-   PPIMAGE.JPEG1       	 OUTPUT  {OUTPUT}.b1.jpg       JPEG      NONE      FPA        TRUE      NONE
-   PPIMAGE.JPEG2       	 OUTPUT  {OUTPUT}.b2.jpg       JPEG      NONE      FPA        TRUE      NONE
-
-   DVOCORR.OUTPUT    	 OUTPUT  {OUTPUT}.fc.fits      IMAGE     NONE      FPA        TRUE      NONE
-   DVOFLAT.OUTPUT    	 OUTPUT  {OUTPUT}.co.fits      IMAGE     NONE      FPA        TRUE      NONE
-
-   PSPHOT.RESID        	 OUTPUT  {OUTPUT}.res.fits     IMAGE     NONE      FPA        TRUE      NONE
-   PSPHOT.BACKGND      	 OUTPUT  {OUTPUT}.bck.fits     IMAGE     NONE      FPA        TRUE      NONE
-   PSPHOT.BACKSUB      	 OUTPUT  {OUTPUT}.sub.fits     IMAGE     NONE      FPA        TRUE      NONE
-   PSPHOT.BACKMDL      	 OUTPUT  {OUTPUT}.mdl.fits     IMAGE     NONE      FPA        TRUE      NONE
-
-   PSPHOT.OUTPUT.RAW   	 OUTPUT  {OUTPUT}              RAW       NONE      FPA        TRUE      NONE
-   PSPHOT.OUTPUT.SX    	 OUTPUT  {OUTPUT}.sx           SX        NONE      FPA        TRUE      NONE
-   PSPHOT.OUTPUT.OBJ   	 OUTPUT  {OUTPUT}.obj          OBJ       NONE      FPA        TRUE      NONE
-   PSPHOT.OUTPUT.CMP   	 OUTPUT  {OUTPUT}.cmp          CMP       NONE      FPA        TRUE      NONE
-   PSPHOT.OUTPUT.CMF   	 OUTPUT  {OUTPUT}.cmf          CMF       NONE      FPA        TRUE      NONE
-
-   PSPHOT.PSF.SAVE     	 OUTPUT  {OUTPUT}.psf          PSF       NONE      FPA        TRUE      NONE
-
-   SOURCE.PLOT.MOMENTS   OUTPUT  {OUTPUT}.mnt.png      KAPA      NONE      FPA        TRUE      NONE
-   SOURCE.PLOT.PSFMODEL  OUTPUT  {OUTPUT}.psf.png      KAPA      NONE      FPA        TRUE      NONE
-
-   PSASTRO.OUTPUT.CMP    OUTPUT  {OUTPUT}.smp          CMP       NONE      FPA        TRUE      NONE
-   PSASTRO.OUTPUT.CMF    OUTPUT  {OUTPUT}.smf          CMF       NONE      FPA        TRUE      NONE
-
-   PSWARP.OUTPUT         OUTPUT {OUTPUT}.fits          IMAGE     NONE      FPA        TRUE      NONE
-   PSWARP.OUTPUT.MASK    OUTPUT {OUTPUT}.mask.fits     MASK      NONE      FPA        TRUE      NONE
-   PSWARP.OUTPUT.WEIGHT  OUTPUT {OUTPUT}.wt.fits       WEIGHT    NONE      FPA        TRUE      NONE
-   PSWARP.BIN1           OUTPUT {OUTPUT}.b1.fits       IMAGE     NONE      FPA        TRUE      NONE
-   PSWARP.BIN2           OUTPUT {OUTPUT}.b2.fits       IMAGE     NONE      FPA        TRUE      NONE
-   PPSUB.OUTPUT          OUTPUT {OUTPUT}.fits          IMAGE     NONE      FPA        TRUE      NONE
-   PPSUB.OUTPUT.MASK     OUTPUT {OUTPUT}.mask.fits     MASK      NONE      FPA        TRUE      NONE
-   PPSUB.OUTPUT.WEIGHT   OUTPUT {OUTPUT}.wt.fits       WEIGHT    NONE      FPA        TRUE      NONE
-
-   PPSTACK.OUTPUT        OUTPUT {OUTPUT}.fits          IMAGE     NONE      FPA        TRUE      NONE
-   PPSTACK.OUTPUT.MASK   OUTPUT {OUTPUT}.mask.fits     MASK      NONE      FPA        TRUE      NONE
-
-   PPSIM.OUTPUT          OUTPUT {OUTPUT}.fits          IMAGE     NONE      FPA        TRUE      NONE
-
-   PPARITH.OUTPUT.IMAGE  OUTPUT {OUTPUT}.fits          IMAGE     NONE      CHIP       TRUE      NONE
-   PPARITH.OUTPUT.MASK   OUTPUT {OUTPUT}.fits          MASK      NONE      CHIP       TRUE      NONE
-
-   LOG.IMFILE            OUTPUT {OUTPUT}.log           TEXT      NONE      CHIP       TRUE      NONE
-   LOG.EXP               OUTPUT {OUTPUT}.log           TEXT      NONE      FPA        TRUE      NONE
-END
+FILERULES       STR     recipes/filerules-simple.mdc
 
 EXTNAME.RULES METADATA
Index: /branches/eam_branch_20080408/ippconfig/ucam/camera.config
===================================================================
--- /branches/eam_branch_20080408/ippconfig/ucam/camera.config	(revision 17485)
+++ /branches/eam_branch_20080408/ippconfig/ucam/camera.config	(revision 17486)
@@ -46,136 +46,5 @@
 END
 
-FITS    METADATA
-# BITPIX is the bits per pixel for writing the output data
-# COMP = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ] are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE [0..16] is the number of "noise bits" to preserve when quantising floating point data; 16 for no loss
-# HSCALE is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
+FITSTYPES       STR     recipes/fitstypes.mdc
 
-# BITPIX(S32) is the bits per pixel for writing the output data
-# COMPRESSION(STR) = NONE|RICE|GZIP|HCOMPRESS|PLIO is the compression algorithm
-# TILE.[XYZ](S32) are the tile sizes.  0 means entire the dimension, so (0,1,1) forms tiles from rows
-# NOISE(S32) [0..16] is the number of "noise bits" to preserve when quantising floating point data
-# HSCALE(S32) is the scale factor for lossy compression with HCOMPRESS; 0 or 1 for none; 2*RMS --> 10x compression
-# HSMOOTH(S32) is the smoothing to apply to HCOMPRESSed data when decompressing; 0 for none
-# SCALING(STR) = NONE|RANGE|STDEV_POSITIVE|STDEV_NEGATIVE|STDEV_BOTH|MANUAL is the scaling scheme
-# BSCALE(F32) is the manual scaling to apply (when SCALING = MANUAL)
-# BZERO(F32) is the manual zero-point to apply (when SCALING = MANUAL)
-# STDEV.BITS(S32) is the number of bits to map to a standard deviation (when SCALING = STDEV_*)
-# STDEV.NUM(F32) is the number of standard deviations to the edge (when SCALING = STDEV_NEGATIVE|STDEV_POSITIVE)
-# FLOAT(STR) is the name of a custom floating-point type
-
-	DET_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	DET_MASK	METADATA
-		BITPIX		S32	8
-	END
-	DET_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	SKY_IMAGE	METADATA
-		BITPIX		S32	-32
-	END
-	SKY_MASK	METADATA
-		BITPIX		S32	8
-	END
-	SKY_WEIGHT	METADATA
-		BITPIX		S32	-32
-	END
-
-	COMPRESSED_POSITIVE	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_POSITIVE
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	10
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_MASK		METADATA
-		COMPRESSION	STR	PLIO
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-	COMPRESSED_SUBTRACTION	METADATA
-		BITPIX		S32	16
-		SCALING		STR	STDEV_BOTH
-		STDEV.BITS	S32	4
-		STDEV.NUM	F32	5
-		COMPRESSION	STR	RICE
-		TILE.X		S32	0
-		TILE.Y		S32	1
-		TILE.Z		S32	1
-		NOISE		S32	8
-	END
-
-END
-
-FILERULES METADATA
-   PPIMAGE.OUTPUT     STR PPIMAGE.OUTPUT
-   PPIMAGE.BIN1       STR PPIMAGE.BIN1.OUTPUT
-   PPIMAGE.BIN2	      STR PPIMAGE.BIN2.OUTPUT
-   PPIMAGE.JPEG1      STR PPIMAGE.JPEG1.OUTPUT
-   PPIMAGE.JPEG2      STR PPIMAGE.JPEG2.OUTPUT
-
-   PSASTRO.INPUT      STR PSASTRO.INPUT.CMP
-   PSASTRO.OUTPUT     STR PSASTRO.OUTPUT.CMP
-   PSPHOT.OUTPUT      STR PSPHOT.OUTPUT.CMF
-
-   ### input file definitions
-   TYPE               INPUT FILENAME.RULE                 DATA.LEVEL FILE.TYPE 
-   PPIMAGE.INPUT      INPUT @FILES                        CHIP       IMAGE
-   PPARITH.INPUT      INPUT @FILES                        CHIP       IMAGE
-
-   ### use these entries to get the detrend images from specific files
-   PPIMAGE.MASK       INPUT mask.fits                     CHIP       IMAGE
-   PPIMAGE.BIAS       INPUT bias.fit                      CHIP       IMAGE     
-   PPIMAGE.DARK       INPUT dark.fits                     CHIP       IMAGE     
-   PPIMAGE.FLAT       INPUT flat.fits                     CHIP       IMAGE     
-
-   ### use these entries to get the detrend images from the database
-   #PPIMAGE.MASK       INPUT @DETDB                       CHIP       IMAGE     
-   #PPIMAGE.BIAS       INPUT @DETDB                       CHIP       IMAGE     
-   #PPIMAGE.DARK       INPUT @DETDB                       CHIP       IMAGE     
-   #PPIMAGE.FLAT       INPUT @DETDB                       CHIP       IMAGE     
-
-   PSPHOT.INPUT       INPUT @FILES                        CHIP       IMAGE     
-
-   PSASTRO.INPUT.CMP  INPUT @FILES                        CHIP       CMP       
-   PSASTRO.INPUT.CMF  INPUT @FILES                        CHIP       CMF       
-
-   ### output file definitions
-   TYPE                OUTPUT FILENAME.RULE            FILE.TYPE FITS.TYPE DATA.LEVEL FILE.SAVE FILE.FORMAT
-   PPIMAGE.OUTPUT      OUTPUT     {OUTPUT}.fit         IMAGE     NONE      CHIP       TRUE      NONE
-   PPIMAGE.OUTPUT.CHIP OUTPUT     {OUTPUT}.chip.fit    IMAGE     NONE      FPA        TRUE      NONE
-   PPIMAGE.OUTPUT.FPA1 OUTPUT     {OUTPUT}.fpa1.fit    IMAGE     NONE      FPA        TRUE      NONE
-   PPIMAGE.OUTPUT.FPA2 OUTPUT     {OUTPUT}.fpa2.fit    IMAGE     NONE      FPA        TRUE      NONE
-
-   PPIMAGE.BIN1.OUTPUT OUTPUT {OUTPUT}.b1.fit          IMAGE     NONE      FPA        TRUE      NONE
-   PPIMAGE.BIN2.OUTPUT OUTPUT {OUTPUT}.b2.fit          IMAGE     NONE      FPA        TRUE      NONE
-   PPIMAGE.JPEG1.OUTPUT OUTPUT {OUTPUT}.b1.jpg         JPEG      NONE      FPA        TRUE      NONE
-   PPIMAGE.JPEG2.OUTPUT OUTPUT {OUTPUT}.b2.jpg         JPEG      NONE      FPA        TRUE      NONE
-
-   PSPHOT.RESID        OUTPUT {OUTPUT}.res.fits        IMAGE     NONE      CHIP       TRUE      RAW
-   PSPHOT.BACKGND      OUTPUT {OUTPUT}.bck.fits        IMAGE     NONE      CHIP       TRUE      RAW
-   PSPHOT.BACKSUB      OUTPUT {OUTPUT}.sub.fits        IMAGE     NONE      CHIP       TRUE      RAW
-   PSPHOT.BACKMDL      OUTPUT {OUTPUT}.mdl.fits        IMAGE     NONE      CHIP       TRUE      RAW
-
-   PSPHOT.OUTPUT.RAW   OUTPUT {OUTPUT}.{CHIP.NAME}     RAW       NONE      CHIP       TRUE      NONE
-   PSPHOT.OUTPUT.SX    OUTPUT {OUTPUT}.sx              SX        NONE      CHIP       TRUE      NONE
-   PSPHOT.OUTPUT.OBJ   OUTPUT {OUTPUT}.obj             OBJ       NONE      CHIP       TRUE      NONE
-   PSPHOT.OUTPUT.CMF   OUTPUT {OUTPUT}.cmf             CMF       NONE      CHIP       TRUE      NONE
-   PSPHOT.OUTPUT.CMP   OUTPUT {OUTPUT}.{CHIP.NAME}.cmp CMP       NONE      CHIP       TRUE      NONE
-
-   PSASTRO.OUTPUT.CMP  OUTPUT {OUTPUT}.{CHIP.NAME}.smp CMP       NONE      CHIP       TRUE      NONE
-
-   LOG.IMFILE            OUTPUT {OUTPUT}.{CHIP.NAME}.log TEXT    NONE      CHIP       TRUE      NONE
-   LOG.EXP               OUTPUT {OUTPUT}.log           TEXT      NONE      FPA        TRUE      NONE
-END
+FILERULES       STR     recipes/filerules-simple.mdc
