### ppImage recipe configuration file

# Inherit everything from the top-level recipe file, except for what's below.

PHOTCODE.RULE		STR	{DETECTOR}.{FILTER.ID}

FRINGE.FILTERS  MULTI
FRINGE.FILTERS	STR z
FRINGE.FILTERS	STR y

# apply the following constraints when selecting a detrend image
DETREND.CONSTRAINTS  METADATA
  BIAS METADATA
  END
  DARK METADATA
  END
  SHUTTER METADATA
  END	
  FLAT METADATA
    FILTER  STR FPA.FILTERID
#   VERSION STR RAW
  END
  FRINGE METADATA
    FILTER   STR FPA.FILTERID
#   AIRMASS  STR FPA.AIRMASS
#   TWILIGHT STR TWILIGHT:FPA.TIME
  END
END

## these science-image analysis recipes are placed here set MASK = FALSE

# Overscan, bias, dark, shutter, flat-field, fringe, photom, astrom
PPIMAGE_DET_ONLY  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    TRUE            # Fringe subtraction
  BIN1.FITS       BOOL    TRUE            # Save 1st binned chip image?
  BIN2.FITS       BOOL    TRUE            # Save 2nd binned chip image?
  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    TRUE            # Fringe subtraction
  BIN1.FITS       BOOL    TRUE            # Save 1st binned chip image?
  BIN2.FITS       BOOL    TRUE            # Save 2nd binned chip image?
  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    TRUE            # Fringe subtraction
  BIN1.FITS       BOOL    TRUE            # Save 1st binned chip image?
  BIN2.FITS       BOOL    TRUE            # Save 2nd binned chip image?
  PHOTOM          BOOL    TRUE		  # Source identification and photometry
  ASTROM.CHIP     BOOL    FALSE           # Astrometry per chip?
  ASTROM.MOSAIC   BOOL    FALSE		  # Astrometry for mosaic?
END

# Overscan, bias, photometry, astrometry
PPIMAGE_OA   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   FALSE           # Save base detrended image?
  CHIP.WEIGHT.FITS BOOL   FALSE           # Save base detrended 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
  BIN1.FITS       BOOL    FALSE           # Save 1st binned chip image?
  BIN2.FITS       BOOL    FALSE           # Save 2nd binned chip image?
  BIN1.JPEG       BOOL	  TRUE 		# Save 1st binned jpeg?
  BIN2.JPEG       BOOL	  TRUE 		# Save 2nd binned jpeg?
  PHOTOM          BOOL    TRUE		  # Source identification and photometry
  ASTROM.CHIP     BOOL    FALSE           # Astrometry per chip?
  ASTROM.MOSAIC   BOOL    FALSE		  # Astrometry for mosaic?
END
