### File rules for PHU=FPA, EXT=NONE


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
TYPE               INPUT    FILENAME.RULE                 DATA.LEVEL FILE.TYPE 
PPIMAGE.INPUT      INPUT    none.fits                     FPA        IMAGE     
INPUT.MASK         INPUT    none.fits                     FPA        MASK      
INPUT.WEIGHT       INPUT    none.fits                     FPA        WEIGHT    
INPUT.PSF          INPUT    none.fits                     READOUT    PSF       
INPUT.SRC          INPUT    none.fits                     READOUT    CMF       
PPIMAGE.BIAS       INPUT    @DETDB                        CHIP       IMAGE     
PPIMAGE.DARK       INPUT    @DETDB                        CHIP       IMAGE     
PPIMAGE.SHUTTER    INPUT    @DETDB                        CHIP       IMAGE     
PPIMAGE.FLAT       INPUT    @DETDB                        CHIP       IMAGE     
PPIMAGE.MASK       INPUT    @DETDB                        CHIP       IMAGE     

## files used by psphot 
PSPHOT.LOAD        INPUT    @FILES                        CHIP       IMAGE
PSPHOT.INPUT       INPUT    none.fits                     CHIP       IMAGE     

PSWARP.INPUT       INPUT    none.fits                     FPA        IMAGE     
PSWARP.WEIGHT      INPUT    none.fits                     FPA        WEIGHT
PSWARP.MASK        INPUT    none.fits                     FPA        MASK
PSWARP.SKYCELL     INPUT    none.fits                     FPA        IMAGE     
PSWARP.ASTROM      INPUT    none.fits                     FPA        CMF

PSASTRO.INPUT.CMP  INPUT    none.fits                     CHIP       CMP       
PSASTRO.INPUT.CMF  INPUT    none.fits                     CHIP       CMF       
PSPHOT.PSF.LOAD    INPUT    none.psf                      CHIP       PSF       
PSPHOT.INPUT.CMF   INPUT    none.fits                     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

### output file definitions
TYPE                OUTPUT   FILENAME.RULE           FILE.TYPE FITS.TYPE DATA.LEVEL FILE.SAVE FILE.FORMAT
PPIMAGE.OUTPUT      OUTPUT   {OUTPUT}.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}.ch.fits        IMAGE     NONE      FPA        TRUE      NONE
PPIMAGE.CHIP.MASK   OUTPUT   {OUTPUT}.ch.mask.fits   MASK      NONE      FPA        TRUE      NONE
PPIMAGE.CHIP.WEIGHT OUTPUT   {OUTPUT}.ch.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.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}.b1.fits        IMAGE     NONE      FPA        TRUE      NONE
PPIMAGE.BIN2        OUTPUT   {OUTPUT}.b2.fits        IMAGE     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
SOURCE.PLOT.APRESID  OUTPUT  {OUTPUT}.dap.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
PPSTACK.OUTPUT.WEIGHT OUTPUT {OUTPUT}.weight.fits    WEIGHT    NONE      FPA        TRUE      NONE

PPSIM.OUTPUT        OUTPUT   {OUTPUT}.fits           IMAGE     NONE      FPA        TRUE      SIMTEST
PPSIM.SOURCES       OUTPUT   {OUTPUT}.cmf            CMF       NONE      FPA        TRUE      NONE

LOG.IMFILE            OUTPUT {OUTPUT}.imfile.log     TEXT      NONE      FPA        TRUE      NONE
LOG.EXP               OUTPUT {OUTPUT}.exp.log        TEXT      NONE      FPA        TRUE      NONE
