### ppImage recipe configuration file for cfh12k

# 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	MEDIAN		# MEAN | MEDIAN

# for a test, turn off selected detrend types
OVERSCAN	BOOL	FALSE		# Overscan subtraction
BIAS		BOOL	FALSE		# Bias subtraction
DARK		BOOL	TRUE		# Dark subtraction
FLAT		BOOL	TRUE		# Flat-field normalisation

# binned output image options
BIN1.XBIN		S32	12
BIN1.YBIN		S32	12
BIN2.XBIN		S32	96
BIN2.YBIN		S32	96

# cfh12k needs fringe subtraction
FRINGE		BOOL	TRUE		# Fringe subtraction

# this table lists extra constraints which should be applied when
# selecting the detrend images.
# note: camera and time are always applied

DETREND.CONSTRAINTS  METADATA
  BIAS METADATA
  END
  DARK METADATA
#   EXPTIME STR FPA.EXPOSURE
  END
  FLAT METADATA
    FILTER  STR FPA.FILTERID
#   DETTYPE STR DOMEFLAT.RAW
#   VERSION STR SKYFLAT.RAW
#   VERSION STR DOMEFLAT.CORR.XX
#   VERSION STR SKYFLAT.CORR
  END
  FLAT_CORRECTION METADATA
    FILTER   STR FPA.FILTER
  END
  FRINGE METADATA
    FILTER   STR FPA.FILTER
#   AIRMASS  STR FPA.AIRMASS
#   TWILIGHT STR FPA.TWILIGHT
  END
  SHUTTER METADATA
  END	
END

# only apply the fringe for these filters
FRINGE.FILTERS  MULTI
FRINGE.FILTERS	STR r
FRINGE.FILTERS	STR i
FRINGE.FILTERS	STR z

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