Peter Weilbacher Processing first works separately on each IFU of the raw input data (in
parallel): it trims the raw data and records the overscan statistics,
subtracts the bias and converts them from adu to count. Optionally, the
dark can be subtracted and the data can be divided by the flat-field.
The data of all input mask exposures is then averaged. The averaged
image together with the trace table and wavelength calibration as well as
the line catalog are used to detect spots. The detection windows are
used to measure the spots on all images of the sequence, the result is
saved, with information on the measured PSF, in the spots tables.
Then properties of all slices are computed, first separately on each IFU
to determine the peak position of the mask for each slice and its angle,
subsequently the width and horizontal position. Then, the result of all
IFUs is analyzed together to produce a refined horizontal position,
applying global shifts to each IFU as needed. The vertical position is
then determined using the known slice ordering on the sky; the relative
peak positions are put into sequence, taking into account the vertical
offsets of the pinholes in the mask. The table is then cleaned up from
intermediate debug data. If the --smooth parameter is set to a positive
value, it is used to do a sigma-clipped smoothing within each slicer
stack, for a more regular appearance of the output table. The table is
then saved.
As a last optional step, additional raw input data is reduced using the
newly geometry to produce an image of the field of view. If these
exposures contain smooth features, they can be used as a visual check of
the quality of the geometrical calibration.