Instituto de Astrofísica e Ciências do Espaço, Universidade do
Porto, CAUP, Rua das
2 Departamento de Física e Astronomia, Fac. de Ciências, Universidade do Porto, Rua do Campo Alegre, 4169-007 Porto, Portugal
3 Instituto de Astrofísica de Canarias, 38200, La Laguna, Tenerife, Spain
4 Departamento de Astrofisica, Universidade de La Laguna, 38205, La Laguna, Tenerife, Spain
Received: 4 December 2014
Accepted: 19 March 2015
Aims. We present a new upgraded version of ARES. The new version includes a series of interesting new features such as automatic radial velocity correction, a fully automatic continuum determination, and an estimation of the errors for the equivalent widths.
Methods. The automatic correction of the radial velocity is achieved with a simple cross-correlation function, and the automatic continuum determination, as well as the estimation of the errors, relies on a new approach to evaluating the spectral noise at the continuum level.
Results. ARES v2 is totally compatible with its predecessor. We show that the fully automatic continuum determination is consistent with the previous methods applied for this task. It also presents a significant improvement on its performance thanks to the implementation of a parallel computation using the OpenMP library.
Key words: techniques: spectroscopic / methods: data analysis / stars: solar-type / stars: abundances
Automatic Routine for line Equivalent widths in stellar Spectra – ARES webpage: http://www.astro.up.pt/~sousasag/ares/
© ESO, 2015
One of the most commonly used spectral analysis methods is the line-by-line analysis, which in most of the cases requires a precise measurement of the strength of the spectral lines. This is normally done by measuring the equivalent width (EW). EW methods have been used for decades in spectroscopy.
In the past decade several automatic codes have emerged that aimed at releasing the astronomer from this tedious task (when using interactive routines), and, more importantly, to allow the precise and systematic measurement of equivalent widths. ARES (Sousa et al. 2007) was one of the first codes to appear freely available to the community. ARES measures the EWs of lines in an automatic way, trying to follow as closely as possible the same steps as those that would be taken by an astronomer when using interactive routines. Several other codes exist and appeared more recently to perform the same task using different approaches: DAOSPEC (Stetson & Pancino 2008); DOOp, which is an automatic wrapper for DAOSPEC (Cantat-Gaudin et al. 2014); TAME (Kang & Lee 2012), which follows the basic ideas from ARES very closely, is written in IDL, and presents some interactive facilities for the spectral analysis. Rencently, a more complete spectral analysis code was presented that also computes EWs (iSPEC – Blanco-Cuaresma et al. 2014).
Because it is so simple to use, ARES has been one of the most widely adopted codes for automatic EW measurements (e.g., Hekker & Meléndez 2007; Neves et al. 2009; Sozzetti et al. 2009; Ghezzi et al. 2010; Ruchti et al. 2011; Sousa et al. 2011; Adibekyan et al. 2012a; Tabernero et al. 2012; Mortier et al. 2013; Santos et al. 2013; Monroe et al. 2013; Maldonado et al. 2013; Jofré et al. 2014). ARES has also been used for asteroseismology studies that require stellar characterization (e.g. Creevey et al. 2012; Silva Aguirre et al. 2013; Metcalfe et al. 2010) and is used in large spectroscopic surveys such as the Gaia-ESO Survey (Gilmore et al. 2012) to analyze the high-resolution spectral data in several working groups of the consortium (e.g., Sousa 2014; Smiljanic et al. 2014; Lanzafame et al. 2015). The algorithms in ARES are also being implemented in recipes for the very first data analysis software that will be available for a VLT instrument, ESPRESSO (Mégevand et al. 2012; Di Marcantonio et al. 2012; Pepe et al. 2014).
We present the new improved version of the ARES code with special focus on the description of the new features that were introduced. A more detailed description of new features is available on the ARES webpage.
Correction for radial velocity: in the previous version, the input spectra needed to be fully corrected for radial velocity. Otherwise, ARES would not be able to correctly identify the spectral lines that were to be measured. In the new version, the user has two options that can be chosen to correct for the radial velocity in ARES: the first is to provide the value for the radial velocity of the star in km s-1. The second is to provide a mask with a list of lines at rest frame that will then be used by ARES to estimate the radial velocity. To provide this new input to ARES, the new parameter rvmask needs to be included at the very end of the input file mine.opt. An example and a full description of the method used for this new feature is provided on the ARES support webpage1.
Automatic rejt estimation: the parameter rejt is the most important input parameter for the proper normalization and is crucial for the correct EW measurement. rejt strongly depends on the signal-to-noise ratio (S/N). Originally, this was a free parameter set by the user because the visualization of the continuum position is highly subjective. This parameter continues to be free in ARES v2, and we still recommend this as the best option for the user who desires to derive precise and accurate EWs. In some of our previous works we have presented some suggestions for the best value for this parameter. First, in Sousa et al. (2008) we provided a discrete relation between the spectrum S/N and the recommended rejt value. This table gives only values for S/N> 100. Sousa et al. (2011) later provided an empirical relation for the cases where the S/N is low (S/N< 100). These relations were derived for HARPS spectra, but according to our experience, they can be safely applied to other spectra whose S/N was computed in a similar way. If the S/N is not available, we recommend either adjusting this parameter individually for each spectra or finding a way to first estimate the S/N for the spectra and then derive the proper relation with the rejt parameter (for an example of such an exercise see Mortier et al. 2013).
The new version of ARES has an additional option where the user can specify spectral regions in the spectra, which should ideally be clear of spectral lines. ARES will internally estimate the S/N and relate it with a proper rejt value. For a detailed description of this new option, see Sect. 3.
rejt dependence on wavelength: the S/N can change significantly over the wavelength range for some spectra. With this in mind, we have implemented a way to change the rejt parameter for different wavelengths. To use this option, the rejt parameter has to be defined with the value −2. ARES will then read a file with the name “lambda_rejt.opt”, which should be an ASCII file with two columns (wavelength and rejt separated by spaces). ARES will read the values in the file and then interpolate the rejt value for each wavelength and will adjust the continuum accordingly for each spectral region.
EW error estimation: one of the caveats in the original code was that it lacked an error estimation or the flagging to identify problematic measurements. This new feature will certainly be helpful, especially in spectral analyses where only very few lines are available. We have implemented an efficient estimation of the error for the EWs. For more details on this new task see Sect. 4.
Read ASCII spectral data: until now, ARES was only able to read specific FITS spectral data. Since there are several spectra available in public archives that follow different formats (e.g., the ESPADONS or NARVAL archives), the new ARES code can now read ASCII data. If a FITS file is not provided, ARES will try to read the file as ASCII data. For this to work, the data should be available in two distinct columns (wavelength and flux separated by spaces).
Cleaning any zero spectral flux: one of the first tasks in ARES is to determine whether the input spectra have zero values in the flux. This usually appears in spectral data from spectrographs that have a gap in the spectral coverage. In many cases, the standard procedure for these cases is to assign zero values for these spectral regions. Unfortunately, zero values in the flux can be problematic for the spectral normalization, and these regions should be avoided to prevent the code from crashing. To overcome this problem, ARES scans the spectral data and replaces them for any zero value by unity, which avoids unexpected crashes.
Parallelization of the code with OpenMp: ARES is now implemented to use OpenMp. This is a code parallelization library2 that simplifies the interface with multicore machines. On the ARES webpage we provide some benchmark examples that were used to compare and test the performance of the new version with the older one. To summarize, these tests improve the performance from ~60% for K stars up to ~250% for the F and G stars.
All these features are now implemented in ARES in a way that the code remains fully compatible with the previous version. The user is free to choose or discard any of the new features except for the errors, which will always appear in the new ARES output without any significant loss of performance; quite to the contrary, performance will improve if the code is used in a multicore machine.
The identification of the continuum position is a very difficult and subjective task in these spectral analyses. The rejt parameter plays a fundamental role in ARES for this purpose (see Fig. 2 and Sect. 3.1 of Sousa et al. (2007) for a complete description of this parameter). Because of that, this parameter still remains adjustable for the user. One of the advantages of automatic codes such as ARES is that when the parameter for the continuum is defined, the code will measure all lines in the spectra in a systematic way, in this way avoiding errors that are caused by the subjectivity that is common in the use of interactive routines.
Evaluation of the noise in the three spectral regions recommended to automatically estimate the rejt parameter (see text for the details).
|Open with DEXTER|
To keep the EW measurements between different spectra homogeneous, the best option is to use an empirical relation between the spectral S/N and the rejt parameter. This ensures the homogenization of the measurements for the analysis of several similar spectra that were observed in the same spectroscopic configurations.
This solution was unsatisfactory, therefore we added the possibility of computing an automatic rejt parameter. This is a difficult task, and some caution should be taken. This option can be accessed by defining the rejt parameter in a different way. For example, setting rejt=3;5764,5766,6047,6052,6068,6076 will tell ARES to evaluate the noise in three different spectral ranges, the first number (3) defines the number of ranges, and each next pair of numbers represents each wavelength region. These spectral regions should be selected carefully and avoid strong lines. The ideal case will be without any lines at all. The three spectral regions given in this example are regions that have no lines, or at most very week lines, for solar-type stars, and therefore we recommend them.
To obtain an automatically determined rejt parameter, we start with estimating the S/N. Figure 1 is used here to explain the steps of estimating the S/N:
The first step is extracting the spectral region. The original spectrum is represented in blue for all panels, and the region is marked by the gray area in the panels.
The second step is to smooth the original spectra. This is achieved through a boxing car average. This allows filtering the noise at higher frequencies (in wavelength) (for more details see Sect. 3.3 of Sousa et al. 2007). The value for the smoothing in this procedure was hard-coded in ARES with a value of eight pixels. The smooth spectra are represented in green shifted down by a constant for clarity. The idea is that these spectra do not represent any lower frequency signal, where the spectral lines are included.
Next we subtract from the original spectrum this smoothed spectrum that is free from high-frequency noise and place it at the spectrum level (using the average of the flux for each spectral region). This is represented with the red lines, again slightly shifted by a constant for clarity. These data in red represent the high-frequency noise that was used to estimate the S/N for each spectral region.
The S/N computed for each spectral region is simply its mean flux ⟨ F ⟩ divided by the standard deviation of the subtracted spectra σF (spectra in red):
The final adopted S/N value is derived by taking the median of the three values derived for this example. The choice of the median is more preferable than the average since it is not affected by the outlying points (e.g., a cosmic-ray hit).
Figure 1 shows the estimation of the S/N for the three spectral ranges given as example. Here we used a HARPS spectrum from the archive for the star Alpha Cen A. This spectrum was observed on 2005-04-23, 09:57:42 UT. A S/N of ~275 is indicated in the header of this spectrum. This value is compatible with the median of the values presented in the figure (256.29).
The simple relation between rejt, the S/N, and the standard deviation of the noise is , using ⟨ F ⟩ = 1 for the normalized flux at the continuum.
The auto-rejt option should be used with caution since the spectral ranges selected may be contaminated with unexpected spectral features, such as cosmic rays or telluric lines. The S/N can also be directly included in the rejt parameter. In this case, the S/N is not estimated and directly uses this relation. This is an excellent option if the user has a prior knowledge on the S/N of the spectra.
Comparison of the equivalent widths measured using the recommendation from Sousa et al. (2008) for the rejt parameter and using an automatic value.
|Open with DEXTER|
To test the new feature, we present in Fig. 2 a comparison of EWs determined in two different ways. Here we used seven spectra with different S/N, ranging from ~70 to ~2000, measuring ~380 lines for each of them. The goal is to show the differences betwen using the new auto-rejt option with the option of using the recommended values from Sousa et al. (2008). This comparison shows that there is a small mean offset of ~0.7 mÅ with a still significant dispersion of ~4.4 mÅ. Most of the large spread is due to the spectra with lower S/N. The panel inside the figure shows a zoomed part of the comparison where it is clear that the high percentage (~96%) of the lines are indeed close to the identity line.
We would like to recall that the importance of these automatic codes is their systematic performance. Regardless of the option selected in ARES or the value adopted for the rejt parameter, the code will always behave systematically. This is very important for instance for a differential analysis, for which it is crucial that exactly the same method is used in the calibration and the spectral analysis. Another good example where the systematic measurements are very important is the use of line ratios to derive spectral indexes or even parameters such as the temperature (Kovtyukh et al. 2003; Sousa et al. 2010, 2012).
There are many sources contributing to the EW error. These include the determination of the continuum position, the S/N of the data, blended lines, or any unexpected spectral feature, such as cosmic-ray hits.
An easy and fast solution was implemented in ARES to estimate the error on the EW for each line. The error estimation is directly based on the fit that ARES performs on the spectral lines. Recalling this process, ARES fits the spectral lines with Gaussian profiles, using a non-linear square fit algorithm (gsl_multifit_fdfsolver_lmder - defined in the Gnu Scientific library, GSL, as a robust and efficient version of the Levenberg-Marquardt algorithm3). To use this algorithm, the Gaussian profile and the respective parameter derivatives (the so-called Jacobian matrix) was implemented in the code. The Gaussian profile implemented in ARES is written as (1)where di is the depth of the ith line, ci its center, and Λi is related with the Gaussian width such as Λi = 1/(2σ2), where σ is the Gaussian width (also known as the standard deviation). This specific representation of the Gaussian profile was chosen to closely follow the GSL example for the fitting of a single Gaussian with the non-linear square fit algorithm. The difference to the previous ARES version is that the fit now considers an error for the spectral data. This is then used to estimate the errors on each parameter for the Gaussian fit. Note that although some reduced spectra in archives do have the error on the flux for each pixel, many do not. Because of this, and also to ensure consistency with the previous version of ARES, we still only require the input of the wavelength and the respective flux for each pixel. The error adopted for each pixel is taken as the same (every pixel will have the same weight), and its value strongly depends on the S/N, which is derived using exactly the same procedure as described in the previous section (σF). If the rejt parameter is defined by the user, σF will be derived from its relation with the S/N.
With the uncertainty given for each of the fitted parameters, we can use it to estimate the error of a measurement. First, the EW in ARES is computed directly from the area of the fitted Gaussian profile: (2)where i represents the Gaussian that fits the line to be measure. Now we can use the uncertainties derived from the fit on the line depth (Δdi) and on the line width (ΔΛi), and from the error propagation equation we derive (3)This error estimation includes the error on the continuum position (through the use of σF) and also part of the error introduced by blended lines that are responsible for the larger errors of the Gaussian profile parameters.
The main advantage of this new feature is that it is possible to immediately identify problematic EW measurements. This is very useful for spectral analysis, which relies on very few lines. For example, the analysis of elements such as Na, Mg, Al, Sc, and Mn are typically based only on two to four lines (per element) (Adibekyan et al. 2012b). The studies based on EW measurements for these elements using a limited line list will certainly benefit from evaluating the uncertaities for each line.
We presented a new version of the ARES code. This version includes new features. The most important are the automatic correction for radial velocity, the new option for automatically defining the continuum position, and the error estimation for the EW measurements. All these features will certainly be useful for the users of ARES, especially for the analyses performed on large sets of spectral data.
The errors derived in ARES are good enough for a preliminary detection of poor measurements. This is a new capability, which can be used to pre-select the best-fit lines. We still recommend the user to determine whether there are any outliers before using them for further analysis.
A more detailed description of the new features can be found on the ARES webpage. A proper understanding of these new features is fundamental for a proper judgment of the best option for each spectral analysis project.
Finally, we would like to emphasize again that ARES v2 remains fully compatible with the previous version and will also work faster, thanks to the use of parallel processing for multicore processors.
This work is supported by the European Research Council/European Community under the FP7 through Starting Grant agreement number 239953. N.C.S. was supported by FCT through the Investigador FCT contract reference IF/00169/2012 and POPH/FSE (EC) by FEDER funding through the program Programa Operacional de Factores de Competitividade – COMPETE. S.G.S, E.D.M, and V.A. acknowledge the support from the Fundação para a Ciência e Tecnologia, FCT (Portugal) and POPH/FSE (EC), in the form of the fellowships SFRH/BPD/47611/2008, SFRH/BPD/76606/2011, and SFRH/BPD/70574/2010. G.I. acknowledges financial support from the Spanish Ministry project MINECO AYA2011-29060.
- Adibekyan, V. Z., Delgado Mena, E., Sousa, S. G., et al. 2012a, A&A, 547, A36 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Adibekyan, V. Z., Sousa, S. G., Santos, N. C., et al. 2012b, A&A, 545, A32 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Blanco-Cuaresma, S., Soubiran, C., Heiter, U., & Jofré, P. 2014, A&A, 569, A111 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Cantat-Gaudin, T., Donati, P., Pancino, E., et al. 2014, A&A, 562, A10 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Creevey, O. L., Doǧan, G., Frasca, A., et al. 2012, A&A, 537, A111 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Di Marcantonio, P., Sosnowska, D., Lovis, C., et al. 2012, in SPIE Conf. Ser., 8448 (In the text)
- Ghezzi, L., Cunha, K., Smith, V. V., et al. 2010, ApJ, 720, 1290 [NASA ADS] [CrossRef] (In the text)
- Gilmore, G., Randich, S., Asplund, M., et al. 2012, The Messenger, 147, 25 [NASA ADS] (In the text)
- Hekker, S., & Meléndez, J. 2007, A&A, 475, 1003 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Jofré, P., Heiter, U., Soubiran, C., et al. 2014, A&A, 564, A133 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Kang, W., & Lee, S.-G. 2012, MNRAS, 425, 3162 [NASA ADS] [CrossRef] (In the text)
- Kovtyukh, V. V., Soubiran, C., Belik, S. I., & Gorlova, N. I. 2003, A&A, 411, 559 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Lanzafame, A. C., Frasca, A., Damiani, F., et al. 2015, A&A, 576, A80 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Maldonado, J., Villaver, E., & Eiroa, C. 2013, A&A, 554, A84 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Mégevand, D., Zerbi, F. M., Cabral, A., et al. 2012, in SPIE Conf. Ser., 8446 (In the text)
- Metcalfe, T. S., Monteiro, M. J. P. F. G., Thompson, M. J., et al. 2010, ApJ, 723, 1583 [NASA ADS] [CrossRef] (In the text)
- Monroe, T. R., Meléndez, J., Ramírez, I., et al. 2013, ApJ, 774, L32 [NASA ADS] [CrossRef] (In the text)
- Mortier, A., Santos, N. C., Sousa, S. G., et al. 2013, A&A, 557, A70 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Neves, V., Santos, N. C., Sousa, S. G., Correia, A. C. M., & Israelian, G. 2009, A&A, 497, 563 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Pepe, F., Molaro, P., Cristiani, S., et al. 2014, Astron. Nachr., 335, 8 [NASA ADS] [CrossRef] (In the text)
- Ruchti, G. R., Fulbright, J. P., Wyse, R. F. G., et al. 2011, ApJ, 737, 9 [NASA ADS] [CrossRef] (In the text)
- Santos, N. C., Sousa, S. G., Mortier, A., et al. 2013, A&A, 556, A150 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Silva Aguirre, V., Basu, S., Brandão, I. M., et al. 2013, ApJ, 769, 141 [NASA ADS] [CrossRef] (In the text)
- Smiljanic, R., Korn, A. J., Bergemann, M., et al. 2014, A&A, 570, A122 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Sousa, S. G. 2014, ArXiv e-prints [arXiv:1407.5817] (In the text)
- Sousa, S. G., Santos, N. C., Israelian, G., Mayor, M., & Monteiro, M. J. P. F. G. 2007, A&A, 469, 783 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Sousa, S. G., Santos, N. C., Mayor, M., et al. 2008, A&A, 487, 373 [NASA ADS] [CrossRef] [EDP Sciences] [MathSciNet] (In the text)
- Sousa, S. G., Alapini, A., Israelian, G., & Santos, N. C. 2010, A&A, 512, A13 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Sousa, S. G., Santos, N. C., Israelian, G., et al. 2011, A&A, 526, A99 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Sousa, S. G., Santos, N. C., & Israelian, G. 2012, A&A, 544, A122 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
- Sozzetti, A., Torres, G., Charbonneau, D., et al. 2009, ApJ, 691, 1145 [NASA ADS] [CrossRef] (In the text)
- Stetson, P. B., & Pancino, E. 2008, PASP, 120, 1332 [NASA ADS] [CrossRef] (In the text)
- Tabernero, H. M., Montes, D., & González Hernández, J. I. 2012, A&A, 547, A13 [NASA ADS] [CrossRef] [EDP Sciences] (In the text)
Evaluation of the noise in the three spectral regions recommended to automatically estimate the rejt parameter (see text for the details).
|Open with DEXTER|
|In the text|