3.2 Observations and reduction
3.2.2 Data reduction
The SALT pipeline (Crawford et al. 2010) corrected all our science and calibra- tion exposures for CCD bias, gain and crosstalk between the CCD amplifiers. We then performed flat fielding, cosmic ray cleaning and wavelength calibra- tion in IRAF, using arc-lamp exposures taken immediately after each target. This minimises variability in the wavelength scale, caused by spectrograph flexures, and is the default calibration strategy for the RSS2. The Copper-Argon
(CuAr) arc-lamp was selected to provide sufficient calibration lines at the criti- cal blue wavelength end near Ca ii H & K. Spectra were extracted with partic- ular attention to reliable background subtraction, since over- or undersubtrac- tion biases log(R0HK) measurements (Fossati et al. 2017). I describe individual reduction steps in more detail below.
Flat-fielding and cosmic ray cleaning
We median-combined the set of flat-fields taken closest in time to each of the science observations. Nightly flats were not consistently provided by the SALT team, as their experience showed the flatfield is sufficiently stable on timescales of weeks. Note that a column of “lazy pixels” on the detector at ∼ 3994 Å falls into the R continuum passband needed for log(R0HK) measurements (Sect.3.3). Flatfielding was crucial to correct for this artefact and ensure reliable activity measurements. For the longer exposures in the dataset, a significant number of artefacts from cosmic rays hits (CR) are present. CRs within the stellar spectrum and the regions used for background fitting are accounted for during the final spectral extraction step. However, we found that a smoother overall reduction process was achieved by adding an initial CR cleaning step (after flat-fielding). We used the L.A.Cosmic algorithm (van Dokkum, 2001, PASP, 113, 1420) for this.
Wavelength calibration
Exposures taken for longslit spectroscopy generally suffer from geometric dis- tortions. This is illustrated by the arc-lamp exposure shown in Fig. 3.2: the CuAr emission lines have substantial curvature relative to the CCD columns. A two-dimensional wavelength solution is therefore needed to calibrate an entire science frame. We used the IRAF package twodspec.longslit for this process:
1. A one-dimensional wavelength solution was fitted at a single position along the spatial axis, using the IRAF identify task and the CuAr line-list provided by the SALT team3. We found that 3rd order cubic splines pro-
vided solutions with both low RMS (typically . 0.03 Å) and no systematic structure in the residuals.
2. The IRAF task reidentify then re-fitted this wavelength solution at 10 pix increments along the spatial axis of the CuAr frame, tracing out the curvature of each emission line.
3. The output from the previous steps was used by fitcoords to compute the surface defining wavelength as a function of x & y position on the CCD frames.
4. Finally, the transform task and the fitcoords output was used to geomet- rically correct exposures, so that wavelength is a linear function of the x-axis, and position along the slit is linear along the new y-axis. This is best visualised by a transformed arc-lamp exposure, shown in Fig. 3.2. The transformation of science frames becomes important for reliable back- ground subtraction during extraction. It ensures that the background fit, applied at significant spatial separation from the stellar spectrum, is sub- tracted from the matching wavelength range on the stellar trace. This
2D wavelength solution is also vital for observations with several targets along the slit, namely HD 26913+ HD 26923 exposures.
Figure 3.2: Section of an arc-lamp exposure, highlighting geometric distor- tions (top). These are removed after wavelength calibration and transfor- mation of the arc-lamp exposure (bottom). The gaps between the 3 CCDs are visible.
Extraction and background subtraction
We extracted spectra using IRAF’s apall task, using the option of “optimal”, i.e. variance-weighted extraction (Horne 1986). This includes tracing of the spectra across the CCD frames and rejection of CR affected pixels in the stellar extraction and background fit windows. apall provided the uncertainties on the final spectrum, propagating both photon and detector readout noise per pixel. The sky background levels varied over the programme, as observations were taken in both dark and bright time and under variable cloud cover. Scattered moonlight, i.e. essentially the solar spectrum, dominated the background. Exposures of HD 182101 and a subset of WASP-103 observations contained particularly high levels of scattered light. We ensured that the background subtraction was also implemented correctly in these cases. As the background intensity distribution across the science frames also varied, quadratic and linear fits to the background were required for different exposures.
Issues of note encountered during reduction
1. Initial trimming of the frames was necessary because the arc-lamp ex- posures were too faint for reliable wavelength solutions at the top and bottom edges of each frame (i.e. in the spatial direction). Since these re- gions contained no useful areas on the science frames, all exposures could be trimmed accordingly, allowing more reliable 2D wavelength solutions for the remaining areas.
2. Interpolation across the two CCD gaps (see Fig. 3.2) was done at the start of the reduction process, as this reduced glitches in later steps, e.g. mis-identification of cosmic rays along the sharp gap boundaries.
3. Due to user-error by a local SALT astronomer the Argon arc-lamp was selected for the WASP-72 observation. This lamp has fewer emission lines than CuAr, particularly bluewards of ∼ 4000 Å. Fitting the wavelength solution with the Argon line-list provided by the SALT team4 gave a
wavelength solution with satisfactory RMS of 0.016Å. I verified that the resulting WASP-72 spectrum did not suffer serious calibration problems in the wavelength region of interest for log(R0HK), by comparing it with the RSS spectrum of HIP110785 (Fig. 3.3). This is the Mount Wilson calibrator with the most similar basic stellar properties to WASP-72, and its wavelength solution was derived via the CuAr lamp.
Figure 3.3: Comparison of HIP 110785 (green) and WASP-72 (blue) RSS spectra, along with their ratio (red). No obvious distortions in the WASP-72 wavelength solution are present. Note the Ca ii H & K core flux depressions for WASP-72.