input raw frames:SCI_IFU_OFF_<arm> (arm = UVB/VIS/NIR)
Purpose: Processes the data up to 3D cube
Description: The spectra are bias- or dark-corrected. The raw frames are composed of a series of couples with object(+sky, on) and sky only (off). Each couple (on, off) is reduced separately. The frame difference on-off is computed to subtract the sky contribution. The order table is used to locate the inter-order regions where the residual background (after the off subtraction) is fit, which is then subtracted from the difference data. In order to detect both the positive cosmic ray hits (from on) and negative ones (from off) in on-off, the frames |on-off| and sign(on-off) are computed so that on-off = sign(on-off) x |on-off|. The cosmic ray hits are corrected using the Van Dokkum algorithm (van Dokkum 2001, PASP 113, 1420) on |on-off|, and the resulting frame is multiplied by the sign(on-off) frame. The frame on-off is flat-fielded. The on-off and the off (= sky) data are the transformed into a 3D cube (see manhual for details) and the object is traced along the three slices.