We made use of the SALT product data generated by the in-house pipeline called PySALT (Crawford et al. 2010), which mosaics the individual CCD data to a single FITS file, corrects for cross-talk effects, and performs bias and gain corrections. We then carried out further reduction steps using our own custom tools, written in Python/PyRAF, which consist of several modules designed to handle specific steps of processing. First, we trim the regions of the CCD not containing any usable data and then fill the CCD gaps using a gradient fill. To do this, we calculate the gradient across the gap by measuring the flux values of the pixels to the right and the left of the gap, computing the difference and normalizing it to the number of pixels belonging to the CCD gap (the gradient). We then use the gradient to determine the flux values for pixels in each row of the image and replace the zero-value pixels by these flux values. This step is important to prevent discontinuities in the brightness distribution which affect the flat-fielding process which relies on the modelling of the large-scale illumination structure. Another advantage of this gradient fill is seen in the subsequent step of background subtraction. A CCD gap which appears straight in the original images becomes curved as a result of the coordinate transformation step. This causes background subtraction to result in discontinuous patches. By filling the CCD gap, these patches can be avoided. We then remove the cosmic rays using the LACosmic algorithm (van Dokkum 2001). Calibration in wavelength is achieved using arc lamps and has typical error of ±0.35 Å. We use the arc lamp to determine a coordinate transformation to ‘straighten’ frames so that every column corresponds to a unique wavelength making the background sky shape fitting and subtraction possible. Using the spectrophotometric standard data, we determine the relative flux calibration. We then check individual frames for alignment and co-add them. During this step, a standard deviation frame is constructed from which an error frame is obtained. Before the co-addition, to have consistent noise characteristics, we equalize the effective exposures of the frames – this is needed because the pupil of SALT changes by design during the observation. If Oi(x, y) are the individual observed frames, the final spectrum F(x, y) and error spectrum E(x, y) can be written as, 
(1)
\begin{equation*}
F(x,y) = \left\langle O(x,y) \right\rangle = \frac{\sum _i^N O_i(x, y)}{N}, 
\end{equation*}
(2)
\begin{equation*}
E(x,y) = \sqrt{\frac{\sum _i^N (O_i(x,y) - \left\langle O(x,y)\right\rangle)^2}{N-1}}. 
\end{equation*}
An alternate way of obtaining the error frames is to start from the raw CCD images whose noise properties are relatively well understood to try to model the effects of every single reduction step on the errors. This is, however, very complicated and so we adopt the above technique of determining our final error frame. Since we are combining only six to eight frames, we might overestimate our errors, but this overestimation does not affect the findings presented in the paper. Our final step is to correct for foreground extinction and this is done using the deredden task in IRAF.
Citation: van Dokkum 2001
Citation function: Uses