# These reduction classes define recipes that go together as a group

# XXX rename the jpeg recipes to the form BIAS_JPEG_BIN1_IMAGE
# need to also modify detrend_norm_exp.pl, detrend_process_exp.pl, detrend_reject_imfile.pl
DETREND		METADATA

	BIAS_PROCESS	STR	PPIMAGE_O
	BIAS_RESID	STR	PPIMAGE_B
	BIAS_VERIFY	STR	PPIMAGE_OB
        BIAS_STACK      STR     PPMERGE_BIAS
	JPEG_BIN1_IMAGE_BIAS     STR  PPIMAGE_J1_IMAGE_B
	JPEG_BIN2_IMAGE_BIAS     STR  PPIMAGE_J2_IMAGE_B
	JPEG_BIN1_RESID_BIAS     STR  PPIMAGE_J1_RESID_B
	JPEG_BIN2_RESID_BIAS     STR  PPIMAGE_J2_RESID_B

	DARK_PREMASK_PROCESS	     STR  PPIMAGE_OB
	DARK_PREMASK_RESID	     STR  PPIMAGE_D
	DARK_PREMASK_VERIFY	     STR  PPIMAGE_OBD
        DARK_PREMASK_STACK           STR  PPMERGE_DARK
	JPEG_BIN1_IMAGE_DARK_PREMASK STR  PPIMAGE_J1_IMAGE_B
	JPEG_BIN2_IMAGE_DARK_PREMASK STR  PPIMAGE_J2_IMAGE_B
	JPEG_BIN1_RESID_DARK_PREMASK STR  PPIMAGE_J1_RESID_B
	JPEG_BIN2_RESID_DARK_PREMASK STR  PPIMAGE_J2_RESID_B

	DARK_PROCESS	STR	PPIMAGE_OB
	DARK_RESID	STR	PPIMAGE_D
	DARK_VERIFY	STR	PPIMAGE_OBD
        DARK_STACK      STR     PPMERGE_DARK
	JPEG_BIN1_IMAGE_DARK     STR  PPIMAGE_J1_IMAGE_B
	JPEG_BIN2_IMAGE_DARK     STR  PPIMAGE_J2_IMAGE_B
	JPEG_BIN1_RESID_DARK     STR  PPIMAGE_J1_RESID_B
	JPEG_BIN2_RESID_DARK     STR  PPIMAGE_J2_RESID_B

	SHUTTER_PROCESS	STR	PPIMAGE_OBD
	SHUTTER_RESID	STR	PPIMAGE_S
	SHUTTER_VERIFY	STR	PPIMAGE_OBDS
        SHUTTER_STACK   STR     PPMERGE_SHUTTER
	JPEG_BIN1_IMAGE_SHUTTER  STR  PPIMAGE_J1_IMAGE_F
	JPEG_BIN2_IMAGE_SHUTTER  STR  PPIMAGE_J2_IMAGE_F
	JPEG_BIN1_RESID_SHUTTER  STR  PPIMAGE_J1_RESID_F
	JPEG_BIN2_RESID_SHUTTER  STR  PPIMAGE_J2_RESID_F

	FLAT_PROCESS	STR	PPIMAGE_OBDS
	FLAT_RESID	STR	PPIMAGE_F
	FLAT_VERIFY	STR	PPIMAGE_OBDSF
        FLAT_STACK      STR     PPMERGE_FLAT
	JPEG_BIN1_IMAGE_FLAT     STR  PPIMAGE_J1_IMAGE_F
	JPEG_BIN2_IMAGE_FLAT     STR  PPIMAGE_J2_IMAGE_F
	JPEG_BIN1_RESID_FLAT     STR  PPIMAGE_J1_RESID_F
	JPEG_BIN2_RESID_FLAT     STR  PPIMAGE_J2_RESID_F

	# DOMEFLAT does not have specific processing recipes?
	JPEG_BIN1_IMAGE_DOMEFLAT STR  PPIMAGE_J1_IMAGE_F
	JPEG_BIN2_IMAGE_DOMEFLAT STR  PPIMAGE_J2_IMAGE_F
	JPEG_BIN1_RESID_DOMEFLAT STR  PPIMAGE_J1_RESID_F
	JPEG_BIN2_RESID_DOMEFLAT STR  PPIMAGE_J2_RESID_F

	# SKYFLAT does not have specific processing recipes?
	JPEG_BIN1_IMAGE_SKYFLAT  STR  PPIMAGE_J1_IMAGE_F
	JPEG_BIN2_IMAGE_SKYFLAT  STR  PPIMAGE_J2_IMAGE_F
	JPEG_BIN1_RESID_SKYFLAT  STR  PPIMAGE_J1_RESID_F
	JPEG_BIN2_RESID_SKYFLAT  STR  PPIMAGE_J2_RESID_F

	FLAT_PREMASK_PROCESS	STR	PPIMAGE_OBDS
	FLAT_PREMASK_RESID	STR	PPIMAGE_F
	FLAT_PREMASK_VERIFY	STR	PPIMAGE_OBDSF
        FLAT_PREMASK_STACK      STR     PPMERGE_FLAT
	JPEG_BIN1_IMAGE_FLAT_PREMASK STR  PPIMAGE_J1_IMAGE_B
	JPEG_BIN2_IMAGE_FLAT_PREMASK STR  PPIMAGE_J2_IMAGE_B
	JPEG_BIN1_RESID_FLAT_PREMASK STR  PPIMAGE_J1_RESID_B
	JPEG_BIN2_RESID_FLAT_PREMASK STR  PPIMAGE_J2_RESID_B

	# Generation of pixel masks from darks and flats
	DARKMASK_PROCESS	STR	PPIMAGE_OBD
	DARKMASK_RESID		STR	PPIMAGE_M
	DARKMASK_VERIFY		STR	PPIMAGE_OBD
	DARKMASK_STACK		STR	PPMERGE_DARKMASK
	JPEG_BIN1_IMAGE_DARKMASK STR	PPIMAGE_J1_RESID_B
	JPEG_BIN2_IMAGE_DARKMASK STR	PPIMAGE_J2_RESID_B
	JPEG_BIN1_RESID_DARKMASK STR	PPIMAGE_J1_RESID_B
	JPEG_BIN2_RESID_DARKMASK STR	PPIMAGE_J2_RESID_B

	FLATMASK_PROCESS	STR	PPIMAGE_OBDSF
	FLATMASK_RESID		STR	PPIMAGE_M
	FLATMASK_VERIFY		STR	PPIMAGE_OBDSF
	FLATMASK_STACK		STR	PPMERGE_FLATMASK
	JPEG_BIN1_IMAGE_FLATMASK STR	PPIMAGE_J1_RESID_F
	JPEG_BIN2_IMAGE_FLATMASK STR	PPIMAGE_J2_RESID_F
	JPEG_BIN1_RESID_FLATMASK STR	PPIMAGE_J1_RESID_F
	JPEG_BIN2_RESID_FLATMASK STR	PPIMAGE_J2_RESID_F

	FRINGE_PROCESS	STR	PPIMAGE_OBDSF
	FRINGE_RESID	STR	PPIMAGE_R
	FRINGE_VERIFY	STR	PPIMAGE_OBDSFR
        FRINGE_STACK    STR     PPMERGE_FRINGE
	JPEG_BIN1_IMAGE_FRINGE   STR  PPIMAGE_J1_IMAGE_R
	JPEG_BIN2_IMAGE_FRINGE   STR  PPIMAGE_J2_IMAGE_R
	JPEG_BIN1_RESID_FRINGE   STR  PPIMAGE_J1_RESID_R
	JPEG_BIN2_RESID_FRINGE   STR  PPIMAGE_J2_RESID_R

END

# basic science analysis
DEFAULT		METADATA
	CHIP		STR	PPIMAGE_OBDSFRP
	JPEG_BIN1       STR     PPIMAGE_J1
	JPEG_BIN2       STR     PPIMAGE_J2
	FAKEPHOT	STR	FAKEPHOT
END

# photometry for pre-detrended images
PROCESSED	METADATA
	CHIP		STR	PPIMAGE_P
	JPEG_BIN1       STR     PPIMAGE_J1
	JPEG_BIN2       STR     PPIMAGE_J2
END

# Detrend Processing only for raw data
DETREND_ONLY		METADATA
	CHIP		STR	PPIMAGE_DET_ONLY
	JPEG_BIN1       STR     PPIMAGE_J1
	JPEG_BIN2       STR     PPIMAGE_J2
END

NO_PHOTOM	METADATA
	CHIP		STR	PPIMAGE_OBDSF
END

# Detrend Processing only for raw data
MASKPHOT		METADATA
	CHIP		STR	PPIMAGE_MASKPHOT
	JPEG_BIN1       STR     PPIMAGE_J1
	JPEG_BIN2       STR     PPIMAGE_J2
END
