Peter Weilbacher Processing handles each raw input image separately: it trims the raw
data and records the overscan statistics, subtracts the bias (taking
account of the overscan, if --overscan is not "none"), optionally
detects cosmic rays (note that by default cosmic ray rejection is
handled in the post processing recipes while the data is reformatted
into a datacube, so that the default setting is cr="none" here),
converts the images from adu to count, subtracts the dark, divides by
the flat-field, and (optionally) propagates the integrated flux value
from the twilight-sky cube.
The reduced image is then saved (if --saveimage=true).
The input calibrations geometry table, trace table, and wavelength
calibration table are used to assign 3D coordinates to each CCD-based
pixel, thereby creating a pixel table for each exposure.
If --skylines contains one or more wavelengths for (bright and isolated)
sky emission lines, these lines are used to correct the wavelength
calibration using an offset.
The data is then cut to a useful wavelength range (if --crop=true).
If an ILLUM exposure was given as input, it is then used to correct the
relative illumination between all slices of one IFU. For this, the data
of each slice is multiplied by the normalized median flux of that slice
in the ILLUM exposure.
As last step, the data is divided by the normalized twilight cube (if
given), using the 3D coordinate of each pixel in the pixel table to
interpolate the twilight correction onto the data.
This pre-reduced pixel table for each exposure is then saved to disk.