### ppImage recipe configuration file for drop-dead simple camera

# List of tasks to perform
SHUTTER         BOOL    FALSE           # Shutter correction
DARK		BOOL	TRUE		# Dark correction

BASE.FITS       BOOL    TRUE            # Save base detrended 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	3		# 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
  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
END

# Dark subtraction only
PPIMAGE_D         METADATA
  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
END

# Shutter correction only
PPIMAGE_S         METADATA
  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
END

# Overscan, bias, dark
PPIMAGE_OBD      METADATA
  OVERSCAN        BOOL    FALSE           # 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
END

# Overscan, bias, dark, shutter
PPIMAGE_OBDS      METADATA
  OVERSCAN        BOOL    FALSE            # 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
END

# Overscan, bias, dark, shutter, flat-field
PPIMAGE_OBDSF     METADATA
  OVERSCAN        BOOL    FALSE            # Overscan subtraction
  BIAS            BOOL    TRUE            # Bias subtraction
  DARK            BOOL    TRUE            # Dark subtraction
  SHUTTER         BOOL    FALSE            # Shutter correction
  FLAT            BOOL    TRUE            # Flat-field normalisation
  MASK            BOOL    FALSE            # Mask bad pixels
  FRINGE          BOOL    FALSE           # Fringe subtraction
END

# Overscan, bias, dark, shutter, flat-field, fringe
PPIMAGE_OBDSFR    METADATA
  OVERSCAN        BOOL    FALSE            # Overscan subtraction
  BIAS            BOOL    TRUE            # Bias subtraction
  DARK            BOOL    TRUE            # Dark subtraction
  SHUTTER         BOOL    FALSE            # Shutter correction
  FLAT            BOOL    TRUE            # Flat-field normalisation
  MASK            BOOL    FALSE           # Mask bad pixels
  FRINGE          BOOL    TRUE            # Fringe subtraction
END
