### ppImage recipe configuration file for simulated test camera

# List of tasks to perform

BASE.FITS       BOOL    FALSE           # Save base detrended image?
CHIP.FITS       BOOL    TRUE            # Save chip-mosaicked image?
BIN1.FITS       BOOL    TRUE            # Save 1st binned chip image?
BIN2.FITS       BOOL    TRUE            # Save 2nd binned chip image?

# binned output image options
BIN1.XBIN               S32     8
BIN1.YBIN               S32     8
BIN2.XBIN               S32     64
BIN2.YBIN               S32     64

# Overscan subtraction
OVERSCAN.SINGLE         BOOL    FALSE           # Reduce overscan to a single value?
OVERSCAN.FIT            STR     POLYNOMIAL      # NONE | POLYNOMIAL | SPLINE
OVERSCAN.ORDER          S32     7               # Order of polynomial fit
OVERSCAN.STAT           STR     MEAN            # MEAN | MEDIAN

# How to select the appropriate detrend image
DETREND.CONSTRAINTS  METADATA
  BIAS METADATA
  END
  MASK METADATA
  END
  DARK METADATA
  END
  FLAT METADATA
    FILTER  STR FPA.FILTER
  END
  FRINGE METADATA
    FILTER   STR FPA.FILTER
  END
  SHUTTER METADATA
  END   
END

########################################################################################
# Need the following in order to turn off overscan and shutter for the site-level recipe
########################################################################################

# Overscan subtraction only
PPIMAGE_O         METADATA
  BASE.FITS        BOOL    TRUE            # Save base detrended image?
  BASE.MASK.FITS   BOOL    FALSE           # Save base detrended image?
  BASE.WEIGHT.FITS BOOL    FALSE           # Save base detrended image?
  CHIP.FITS        BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.MASK.FITS   BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.WEIGHT.FITS BOOL    FALSE           # Save chip-mosaic-ed image? 
  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
  MASK            BOOL    FALSE           # Mask bad pixels
  FRINGE          BOOL    FALSE           # Fringe subtraction
  PHOTOM          BOOL    FALSE           # Source identification and photometry
  ASTROM.CHIP     BOOL    FALSE           # Astrometry per chip?
  ASTROM.MOSAIC   BOOL    FALSE           # Astrometry for mosaic?
END

# Dark subtraction only
PPIMAGE_D         METADATA
  BASE.FITS        BOOL    TRUE            # Save base detrended image?
  BASE.MASK.FITS   BOOL    FALSE           # Save base detrended image?
  BASE.WEIGHT.FITS BOOL    FALSE           # Save base detrended image?
  CHIP.FITS        BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.MASK.FITS   BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.WEIGHT.FITS BOOL    FALSE           # Save chip-mosaic-ed image? 
  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
  MASK            BOOL    FALSE           # Mask bad pixels
  FRINGE          BOOL    FALSE           # Fringe subtraction
  PHOTOM          BOOL    FALSE           # Source identification and photometry
  ASTROM.CHIP     BOOL    FALSE           # Astrometry per chip?
  ASTROM.MOSAIC   BOOL    FALSE           # Astrometry for mosaic?
END

# Shutter correction only
PPIMAGE_S         METADATA
  BASE.FITS        BOOL    TRUE            # Save base detrended image?
  BASE.MASK.FITS   BOOL    FALSE           # Save base detrended image?
  BASE.WEIGHT.FITS BOOL    FALSE           # Save base detrended image?
  CHIP.FITS        BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.MASK.FITS   BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.WEIGHT.FITS BOOL    FALSE           # Save chip-mosaic-ed image? 
  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
  MASK            BOOL    FALSE           # Mask bad pixels
  FRINGE          BOOL    FALSE           # Fringe subtraction
  PHOTOM          BOOL    FALSE           # Source identification and photometry
  ASTROM.CHIP     BOOL    FALSE           # Astrometry per chip?
  ASTROM.MOSAIC   BOOL    FALSE           # Astrometry for mosaic?
END

# Overscan, bias, dark
PPIMAGE_OBD      METADATA
  BASE.FITS        BOOL    TRUE            # Save base detrended image?
  BASE.MASK.FITS   BOOL    FALSE           # Save base detrended image?
  BASE.WEIGHT.FITS BOOL    FALSE           # Save base detrended image?
  CHIP.FITS        BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.MASK.FITS   BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.WEIGHT.FITS BOOL    FALSE           # Save chip-mosaic-ed image? 
  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
  MASK            BOOL    FALSE           # Mask bad pixels
  FRINGE          BOOL    FALSE           # Fringe subtraction
  PHOTOM          BOOL    FALSE           # Source identification and photometry
  ASTROM.CHIP     BOOL    FALSE           # Astrometry per chip?
  ASTROM.MOSAIC   BOOL    FALSE           # Astrometry for mosaic?
END

# Overscan, bias, dark, shutter
PPIMAGE_OBDS      METADATA
  BASE.FITS        BOOL    TRUE            # Save base detrended image?
  BASE.MASK.FITS   BOOL    FALSE           # Save base detrended image?
  BASE.WEIGHT.FITS BOOL    FALSE           # Save base detrended image?
  CHIP.FITS        BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.MASK.FITS   BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.WEIGHT.FITS BOOL    FALSE           # Save chip-mosaic-ed image? 
  OVERSCAN        BOOL    TRUE            # Overscan subtraction
  BIAS            BOOL    TRUE            # Bias subtraction
  DARK            BOOL    TRUE            # Dark subtraction
  SHUTTER         BOOL    TRUE            # Shutter correction
  FLAT            BOOL    FALSE           # Flat-field normalisation
  MASK            BOOL    FALSE           # Mask bad pixels
  FRINGE          BOOL    FALSE           # Fringe subtraction
  PHOTOM          BOOL    FALSE           # Source identification and photometry
  ASTROM.CHIP     BOOL    FALSE           # Astrometry per chip?
  ASTROM.MOSAIC   BOOL    FALSE           # Astrometry for mosaic?
END

# Overscan, bias, dark, shutter, flat-field
PPIMAGE_OBDSF     METADATA
  BASE.FITS        BOOL    TRUE            # Save base detrended image?
  BASE.MASK.FITS   BOOL    FALSE           # Save base detrended image?
  BASE.WEIGHT.FITS BOOL    FALSE           # Save base detrended image?
  CHIP.FITS        BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.MASK.FITS   BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.WEIGHT.FITS BOOL    FALSE           # Save chip-mosaic-ed image? 
  OVERSCAN        BOOL    TRUE            # Overscan subtraction
  BIAS            BOOL    TRUE            # Bias subtraction
  DARK            BOOL    TRUE            # Dark subtraction
  SHUTTER         BOOL    TRUE            # Shutter correction
  FLAT            BOOL    TRUE            # Flat-field normalisation
  MASK            BOOL    FALSE           # Mask bad pixels
  FRINGE          BOOL    FALSE           # Fringe subtraction
  PHOTOM          BOOL    FALSE           # Source identification and photometry
  ASTROM.CHIP     BOOL    FALSE           # Astrometry per chip?
  ASTROM.MOSAIC   BOOL    FALSE           # Astrometry for mosaic?
END

# Overscan, bias, dark, shutter, flat-field, fringe
PPIMAGE_OBDSFR    METADATA
  BASE.FITS        BOOL    TRUE            # Save base detrended image?
  BASE.MASK.FITS   BOOL    FALSE           # Save base detrended image?
  BASE.WEIGHT.FITS BOOL    FALSE           # Save base detrended image?
  CHIP.FITS        BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.MASK.FITS   BOOL    FALSE           # Save chip-mosaic-ed image? 
  CHIP.WEIGHT.FITS BOOL    FALSE           # Save chip-mosaic-ed image? 
  OVERSCAN        BOOL    TRUE            # Overscan subtraction
  BIAS            BOOL    TRUE            # Bias subtraction
  DARK            BOOL    TRUE            # Dark subtraction
  SHUTTER         BOOL    TRUE            # Shutter correction
  FLAT            BOOL    TRUE            # Flat-field normalisation
  MASK            BOOL    FALSE           # Mask bad pixels
  FRINGE          BOOL    FALSE           # Fringe subtraction
  PHOTOM          BOOL    FALSE           # Source identification and photometry
  ASTROM.CHIP     BOOL    FALSE           # Astrometry per chip?
  ASTROM.MOSAIC   BOOL    FALSE           # Astrometry for mosaic?
END

# Overscan, bias, dark, shutter, flat-field, fringe, photom
PPIMAGE_OBDSFRP   METADATA
  BASE.FITS        BOOL    FALSE           # Save base detrended image?
  BASE.MASK.FITS   BOOL    FALSE           # Save base detrended image?
  BASE.WEIGHT.FITS BOOL    FALSE           # Save base detrended image?
  CHIP.FITS        BOOL    TRUE            # Save chip-mosaic-ed image? 
  CHIP.MASK.FITS   BOOL    TRUE           # Save chip-mosaic-ed image? 
  CHIP.WEIGHT.FITS BOOL    TRUE           # Save chip-mosaic-ed image? 
  OVERSCAN        BOOL    TRUE            # Overscan subtraction
  BIAS            BOOL    TRUE            # Bias subtraction
  DARK            BOOL    TRUE            # Dark subtraction
  SHUTTER         BOOL    TRUE            # Shutter correction
  FLAT            BOOL    TRUE            # Flat-field normalisation
  MASK            BOOL    FALSE           # Mask bad pixels
  FRINGE          BOOL    FALSE           # Fringe subtraction
  PHOTOM          BOOL    TRUE            # Source identification and photometry
  ASTROM.CHIP     BOOL    FALSE           # Astrometry per chip?
  ASTROM.MOSAIC   BOOL    FALSE           # Astrometry for mosaic?
END

# Overscan, bias, dark, shutter, flat-field, fringe, photom, astrom
PPIMAGE_OBDSFRA   METADATA
  BASE.FITS        BOOL    FALSE           # Save base detrended image?
  BASE.MASK.FITS   BOOL    FALSE           # Save base detrended image?
  BASE.WEIGHT.FITS BOOL    FALSE           # Save base detrended image?
  CHIP.FITS        BOOL    TRUE            # Save chip-mosaic-ed image? 
  CHIP.MASK.FITS   BOOL    TRUE           # Save chip-mosaic-ed image? 
  CHIP.WEIGHT.FITS BOOL    TRUE           # Save chip-mosaic-ed image? 
  OVERSCAN        BOOL    TRUE            # Overscan subtraction
  BIAS            BOOL    TRUE            # Bias subtraction
  DARK            BOOL    TRUE            # Dark subtraction
  SHUTTER         BOOL    TRUE            # Shutter correction
  FLAT            BOOL    TRUE            # Flat-field normalisation
  MASK            BOOL    FALSE           # Mask bad pixels
  FRINGE          BOOL    FALSE           # Fringe subtraction
  PHOTOM          BOOL    TRUE            # Source identification and photometry
  ASTROM.CHIP     BOOL    TRUE            # Astrometry per chip?
  ASTROM.MOSAIC   BOOL    FALSE           # Astrometry for mosaic?
END
