The COMPUTE/IMAGE command can be used to perform the operation of dark subtraction and flat fielding. The COMPUTE/IMAGE command is a very general purpose command and is described in great detail in Vol. A, Appendix A. The functionality of COMPUTE/IMAGE for the current purpose is explained below.
To do a dark subtraction enter the following:
COMPUTE/IMAGE DENOM = FLAT_AVG-DARK_AVGwhere DENOM is the result frame, FLAT_AVG is the average of flat fields, and DARK_AVG is the average of dark frames.
To flat-field a data frame, enter the following:
COMPUTE/IMAGE SCIE_FLAT = (SCIE_IN-DARK_AVG)/DENOMwhere SCIE_FLAT is the flat fielded science frame, SCIE_IN is the input data frame, DARK_AVG is the average of dark frames, and DENOM is the dark subtracted flat field from above.