Index: /trunk/ippconfig/cfh12k/camera.config
===================================================================
--- /trunk/ippconfig/cfh12k/camera.config	(revision 12585)
+++ /trunk/ippconfig/cfh12k/camera.config	(revision 12586)
@@ -139,12 +139,5 @@
    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
+   ### these IO files are independently defined so we can supply hard-coded names (in place of @DETDB)
    PPIMAGE.MASK       INPUT @DETDB                       CHIP       IMAGE
    PPIMAGE.BIAS       INPUT @DETDB                       CHIP       IMAGE
@@ -153,10 +146,23 @@
    PPIMAGE.FRINGE     INPUT @DETDB                       CHIP       FRINGE     
 
+   # IO files for building the DVO flatfield correction
+   DVOCORR.INPUT      INPUT @FILES                       CHIP       IMAGE     
+   DVOFLAT.INPUT      INPUT @FILES                       CHIP       IMAGE 	
+   DVOCORR.REFHEAD    INPUT @FILES                       CHIP       HEADER     
+   DVOFLAT.CORR       INPUT @DETDB                       CHIP       IMAGE 	
+
+   # psphot input files
+   PSPHOT.LOAD        INPUT @FILES                       CHIP       IMAGE     
    PSPHOT.INPUT       INPUT @FILES                       CHIP       IMAGE     
+   PSPHOT.MASK        INPUT @FILES                       CHIP       MASK     
+   PSPHOT.WEIGHT      INPUT @FILES                       CHIP       WEIGHT     
+
+   # we should be able to distinguish the inport format from the file
    PSASTRO.INPUT.CMP  INPUT @FILES                       CHIP       CMP       
    PSASTRO.INPUT.CMF  INPUT @FILES                       CHIP       CMF       
 
-   PSWARP.INPUT       INPUT    none.fits                 FPA        IMAGE     
-   PSWARP.SKYCELL     INPUT    none.fits                 FPA        IMAGE     
+   # why is this "FPA"
+   PSWARP.INPUT       INPUT @FILES                 	 FPA        IMAGE     
+   PSWARP.SKYCELL     INPUT @FILES                 	 FPA        IMAGE     
    PSWARP.ASTROM      INPUT @FILES                       CHIP       CMF       
 
@@ -198,6 +204,6 @@
    PSPHOT.OUTPUT.CMP   OUTPUT {OUTPUT}.{CHIP.NAME}.cmp         CHIP       CMP       TRUE      NONE
 
-   PSASTRO.OUTPUT.CMF  OUTPUT {OUTPUT}.smf                     CHIP       CMF       TRUE      NONE
-   PSASTRO.OUTPUT.CMP  OUTPUT {OUTPUT}.{CHIP.NAME}.smp         CHIP       CMP       TRUE      NONE
+   PSASTRO.OUTPUT.CMF  OUTPUT {OUTPUT}.cmf                     CHIP       CMF       TRUE      NONE
+   PSASTRO.OUTPUT.CMP  OUTPUT {OUTPUT}.{CHIP.NAME}.cmp         CHIP       CMP       TRUE      NONE
 
 END
Index: /trunk/ippconfig/cfh12k/psphot.config
===================================================================
--- /trunk/ippconfig/cfh12k/psphot.config	(revision 12585)
+++ /trunk/ippconfig/cfh12k/psphot.config	(revision 12586)
@@ -2,9 +2,12 @@
 # turn these on to see specific outputs
 #SAVE.BACKMDL	BOOL 	TRUE
-#SAVE.BACKGND	BOOL 	TRUE
+SAVE.BACKGND	BOOL 	TRUE
 #SAVE.BACKSUB	BOOL 	TRUE
 SAVE.RESID	BOOL 	TRUE
 #SAVE.PSF	BOOL 	TRUE
 #LOAD.PSF	BOOL 	FALSE
+
+BACKGROUND.XBIN	    S32   64            # size of background superpixels
+BACKGROUND.YBIN	    S32   64            # size of background superpixels
 
 IMSTATS_NPIX        S32  5000    	 # number of pixels to use for sky estimate boxes:
@@ -33,4 +36,13 @@
 SKY_CLIP_SIGMA    F32  2.0             # statistic used to measure background
 
+# masking parameters (XXX EAM : rework this to use psRegion like ANALYSIS_REGION)
+XMIN                F32      8        	 # maximum valid x-coord
+XMAX                F32   2047        	 # maximum valid x-coord
+YMIN                F32     12        	 # maximum valid y-coord
+YMAX                F32   4095        	 # maximum valid y-coord
+
 # BREAK_POINT may be one of (PEAKS, MOMENTS, PSFMODEL, ENSEMBLE)
 BREAK_POINT         STR ENSEMBLE
+
+# OUTPUT.FORMAT       STR SMPDATA
+OUTPUT.FORMAT       STR PS1_DEV_0
Index: /trunk/ippconfig/megacam/camera.config
===================================================================
--- /trunk/ippconfig/megacam/camera.config	(revision 12585)
+++ /trunk/ippconfig/megacam/camera.config	(revision 12586)
@@ -179,4 +179,5 @@
    PPIMAGE.FRINGE     INPUT @DETDB                       CHIP       FRINGE     
 
+   PSPHOT.LOAD        INPUT @FILES                       CHIP       IMAGE     
    PSPHOT.INPUT       INPUT @FILES                       CHIP       IMAGE     
    PSASTRO.INPUT.CMP  INPUT @FILES                       CHIP       CMP       
Index: /trunk/ippconfig/megacam/format_split.config
===================================================================
--- /trunk/ippconfig/megacam/format_split.config	(revision 12585)
+++ /trunk/ippconfig/megacam/format_split.config	(revision 12586)
@@ -91,7 +91,11 @@
 # How to translate PS concepts into FITS headers
 TRANSLATION	METADATA
+	FPA.TELESCOPE	STR	TELESCOP
+	FPA.INSTRUMENT	STR	INSTRUME
+	FPA.DETECTOR	STR	DETECTOR
         FPA.NAME        STR     EXPNUM
         FPA.AIRMASS     STR     AIRMASS
         FPA.FILTER      STR     FILTER
+        FPA.FILTERID    STR     FILTER
         FPA.POSANGLE    STR     ROTANGLE
         FPA.RA          STR     RA
Index: /trunk/ippconfig/megacam/ppImage.config
===================================================================
--- /trunk/ippconfig/megacam/ppImage.config	(revision 12585)
+++ /trunk/ippconfig/megacam/ppImage.config	(revision 12586)
@@ -50,2 +50,4 @@
 FRINGE.FILTERS	STR i
 FRINGE.FILTERS	STR z
+
+PHOTCODE.RULE		STR	{DETECTOR}.{FILTER.ID}.{CHIP.N}
Index: /trunk/ippconfig/megacam/psastro.config
===================================================================
--- /trunk/ippconfig/megacam/psastro.config	(revision 12585)
+++ /trunk/ippconfig/megacam/psastro.config	(revision 12586)
@@ -3,19 +3,11 @@
 
 # nominal plate scale (microns / pixel)
-# PSASTRO.PLATE.SCALE    F32  13.5
-PSASTRO.PLATE.SCALE    F32  1.0
-
-# pmAstromGridMatch:
-PSASTRO.GRID.MIN.ANGLE F32 -0.0851
-PSASTRO.GRID.MAX.ANGLE F32 +0.0851
-PSASTRO.GRID.DEL.ANGLE F32  0.0170
+PSASTRO.PIXEL.SCALE    F32  13.5
 
 # pmAstromGridAngle
 # max grid offset in FP units (microns)
 # use plate-scale to make this in pixels?
-# PSASTRO.GRID.OFFSET    F32  10000.
-# PSASTRO.GRID.SCALE     F32    500.
-PSASTRO.GRID.OFFSET    F32   1000.
-PSASTRO.GRID.SCALE     F32     50
+PSASTRO.GRID.OFFSET    F32   10000.
+PSASTRO.GRID.SCALE     F32     500
 
 # these tweak are in FP units (pixels, currently)
@@ -24,13 +16,2 @@
 PSASTRO.TWEAK.SMOOTH    F32      2
 PSASTRO.TWEAK.NSIGMA    F32      3
-
-# pmAstromRadiusMatch
-# use plate-scale to make this in pixels?
-PSASTRO.MATCH.RADIUS   F32    8
-
-# pmAstromMatchFit
-PSASTRO.CHIP.NX        S32      1  # fit order
-PSASTRO.CHIP.NY        S32      1  # fit order
-PSASTRO.CHIP.NITER     S32      3  # fit clipping iterations
-PSASTRO.CHIP.NSIGMA    F32      3  # fit clipping sigmas
-
Index: /trunk/ippconfig/megacam/psphot.config
===================================================================
--- /trunk/ippconfig/megacam/psphot.config	(revision 12585)
+++ /trunk/ippconfig/megacam/psphot.config	(revision 12586)
@@ -1,6 +1,6 @@
 
-#SAVE.BACKMDL	BOOL 	TRUE
-#SAVE.BACKGND	BOOL 	TRUE
-#SAVE.BACKSUB	BOOL 	TRUE
+SAVE.BACKMDL	BOOL 	TRUE
+SAVE.BACKGND	BOOL 	TRUE
+SAVE.BACKSUB	BOOL 	TRUE
 #SAVE.RESID	BOOL 	TRUE
 #SAVE.PSF	BOOL 	TRUE
@@ -14,5 +14,5 @@
 
 # image statistics parameters
-IMSTATS_NPIX        S32  1000    	 # number of pixels to use for sky estimate boxes:
+IMSTATS_NPIX        S32  3000    	 # number of pixels to use for sky estimate boxes:
 
 PSF_SN_LIM          F32  100             # minimum S/N for stars used for PSF model
Index: /trunk/ippconfig/recipes/ppImage.config
===================================================================
--- /trunk/ippconfig/recipes/ppImage.config	(revision 12585)
+++ /trunk/ippconfig/recipes/ppImage.config	(revision 12586)
@@ -69,5 +69,5 @@
 END
 
-PHOTCODE.RULE		STR	{CAMERA}.{FILTER.ID}.{CHIP.N}
+PHOTCODE.RULE		STR	{DETECTOR}.{FILTER.ID}.{CHIP.N}
 
 DETREND.CONSTRAINTS  METADATA
Index: /trunk/ippconfig/recipes/psastro.config
===================================================================
--- /trunk/ippconfig/recipes/psastro.config	(revision 12585)
+++ /trunk/ippconfig/recipes/psastro.config	(revision 12586)
@@ -16,8 +16,6 @@
 # max grid offset in FP units (microns)
 # use plate-scale to make this in pixels?
-# PSASTRO.GRID.OFFSET    F32  10000.
-# PSASTRO.GRID.SCALE     F32    500.
-PSASTRO.GRID.OFFSET    F32   1000.
-PSASTRO.GRID.SCALE     F32     50
+PSASTRO.GRID.OFFSET    F32  10000.
+PSASTRO.GRID.SCALE     F32    500.
 
 # these tweak are in FP units (pixels, currently)
Index: /trunk/ippconfig/recipes/psphot.config
===================================================================
--- /trunk/ippconfig/recipes/psphot.config	(revision 12585)
+++ /trunk/ippconfig/recipes/psphot.config	(revision 12586)
@@ -13,8 +13,9 @@
 # XXX it may not currently be read : double check this (EAM)
 ZERO_POINT          F32  25.000          # zero point used by DVO
+ZERO_PT             F32  25.000          # zero point used by DVO
 
 # these parameter govern how the background is measured
-BACKGROUND_XBIN	    S32   128            # size of background superpixels
-BACKGROUND_YBIN	    S32   128            # size of background superpixels
+BACKGROUND.XBIN	    S32   128            # size of background superpixels
+BACKGROUND.YBIN	    S32   128            # size of background superpixels
 IMSTATS_NPIX        S32  10000    	 # number of pixels to use for sky estimate boxes:
 
@@ -117,2 +118,4 @@
 INTERPOLATE_AP BOOL TRUE
 POISSON_ERRORS BOOL TRUE
+
+OUTPUT.FORMAT       STR SMPDATA
