To check the quality of resulting spectra using different reduction packages, we have selected a single exposure of hot star Her secured by HEROS red channel with 2 flat fields and 2 comparison arcs bracketing the stellar exposure. The data had to be individually modified into the format required by particullar package, but the principial reduction tasks were the same. The outputs were converted into IRAF echelle format and compared in spectool task.
This is a set of MIDAS procedures and C and Fortran functions written by A. Kaufer and O. Stahl as a customized version of standard MIDAS echelle context. It is described by koda and lechta (2002). Before processing the bad columns and pixels are interpolated on 2D frame using the defect list.
It tries to be robust for orders with low flux by fitting the 2-dimensional polynomials of low degree through the Gaussian fitted cross-order profile maxima, but the tracing of orders is sensitive on the tiny twiddling of parameters (mainly threshold, order width and order slope). Sometimes the algorithm is confused and such parts of low-flux data have to be removed before tracing.
The dispersion fitting is quite clever and robust using several manually marked lines at 2D image to fit a 2D low-order polynomial, than switches to order by order line identification automatically adding more lines from the list and again switching to 2D polynomials.
The specific feature of the HEROS extension to the basic MIDAS echelle context is the application of global 7-parameter (only) rational-polynomial fit described by De Cuyper and Hensberge (1998) on the final dispersion calibration.
This is a custom package developed by H. Hensberge for reducing data from FEROS spectrograph. It uses the basic FEROS package but corrects a number of errors and strongly modifies the behaviour of several procedures . It was partly modified for accepting data from HEROS. Due to various reasons, however, the wavelength calibration was not successfully adapted to HEROS frames and so the dispersion relation from preceding HEROS pipeline was taken for this test. The order tracing is done using the cross-correlation with Gaussian-shaped template of a averaged cross-order profile beginning in the centre of frame and going to both ends or until the trace is lost. The fit is then done order by order.
The background subtraction is done very carefully, using the digital filter and noise statistics to fit 2D surface in inter-order space. The extraction is done twice - once with optimal variance weighting rejecting pixels deviating from normalized cross-order profile (COP) and once using the plain aperture summing. By comparison of both results the cosmics and bad pixels are flagged and removed from optimal extracted data by interpolation. The procedure runs well on individual bad pixels or columns but fails on adjacent two or more of them.
This package has well-controlled behaviour and its precision had been well tested on the number of FEROS spectra.
The dofoe task was used separately on averaged flat field and stellar exposure and the extracted data were divided by imarith. The dispersion was then applied using dispcorr on flat-fielded extracted stellar orders taken from lambda calibrated extracted star. The main reason for this is the behaviour of standard dofoe that divides not by extracted flat-field but by Flatnorm.ec that is normalized to intensity about one. That preserves the amount of ADU but scales the data in comparison to MIDAS approach and makes the direct comparison difficult.
The tracing here is done using the automatic aperture finding in center of frame following the position of COP fits using the fit1d algorithm similar to cross-correlation. The extraction is optimal with cosmics cleaning and variable aperture with taking the certain level (in our case 0.001) of the COP peak as the background level. The background subtraction is using smoothed 2D surface obtained from inter-order space minima (method scattered).
The real challenge is the wavelength calibration with ecidentify task called from dofoe. Only the 1D separate orders are seen and the number of lines required to get initial fit is quite high. After number of test we had to mark about 100 lines to get reliable result. One has to be careful mainly at the edges of orders and in IR orders (where is a lack of good Th lines and a number of overexposed Ar lines). This may be tested by over-plotting adjacent orders.
As was said, the modified FEROS pipeline has to take the dispersion solution from HEROS pipeline, so we can compare only the different approaches of MIDAS and IRAF respectively. In both cases we used the line list of 145 carefully selected lines of Th and Ar over the HEROS red channel range (5800 - 8400 Å). Then a number of lines was identified manually. For MIDAS package only 20 lines spread over the entire frame were enough to be able to run the automatic finding procedure echiden and achive the RMS about 0.01 Å.
In IRAF case of procedure ecidentify we had to mark manually about 100 lines to run the fitting procedure reliably. Optimizing the rejection and matching parameters and increasing the degree of 2D polynomials until the degree 6 (in x) and 5 in order coordinate we achieved about the same RMS. It requires, however, 56 coefficients in comparison to 7 of MIDAS and it is less reliable at the edges of frame or in orders contaminated by strong Ar lines (in near IR). The extracted data were in both cases linearly rebinned to get equidistant intervals in wavelength.
The resulting extracted echelle orders unblazed by division of extracted flats are compared on following pictures. The slight detected differences indicates how the particular algorithm behaves.
The incomplete background subtraction and variable aperture ( resize=yes) of IRAF is probably responsible for change in flux level (see left panel of Fig. 1).
Despite the small changes of line positions caused by different rebinning the dispersion calibration in IRAF case is not perfect, and the problems of anchoring the polynomials at edges may cause the incorrect dispersion fit in orders with small number of usable lines, as is shown at the edge of the frame in IR region (see right panel of Fig. 1).
The tests have shown the good match of output from all three packages. The wavelength calibration procedure in MIDAS is much more comfortable and more robust. The IRAF approach requires many lines to be manually identified and the 2-dimensional polynomials have problems at the edges, so one should carefully check the match of order overlaps.
Despite the tiny differences, all packages may be used to produce reliable echelle spectra from fiber-fed instruments. The small differences seen in the flux level depend mainly on correct background subtraction. From our experience follows the idea that a simple robust package would be IRAF dofoe task calling completely different ecidentify procedure working like MIDAS echiden task and using the 2D manual line identification and global 7-parametric fit of De Cuyper and Hensberge.
de Cuyper, J.-P. & Hensberge, H. 1998, A&AS, 128, 409
koda, P. & lechta, M. 2002, in Publ. Astron. Inst. ASCR, 90, 40