aa r X i v : . [ a s t r o - ph . I M ] N ov Alessio Mucciarelli
Dipartimento di Fisica & Astronomia, Universit`a degli Studi di Bologna,Viale Berti Pichat, 6/2 - 40127 Bologna, ITALY [email protected]
1. Introduction is a FORTRAN code designed to launch automatically
DAOSPEC (Stetson & Pancino 2008)for a large sample of spectra. The main aims of are: (1) to allow an analysis cascade of a listof spectra provided in input, by automatically writing the input
DAOSPEC files and managing itsoutput files; (2) to optimize automatically some spectral parameters used by
DAOSPEC in the processof equivalent width (EW) measurement, above all the Full Width Half Maximum (FWHM); (3) tomask some spectral regions (telluric lines, interstellar features, photospheric lines with prominentLorenztian wings) that can bias the correct EWs measurement; (4) to provide suitable graphicaltools in order to evaluate the quality of the solution, especially of the Gaussian fit to each individualspectral line; (5) to provide the final normalized, zero radial velocity spectra.
2. About
DAOSPEC
Here the basic use of
DAOSPEC is drawn but we refer the user to the official documentation of thiscode (Stetson & Pancino 2008, and the
DAOSPEC
Cookbook ). DAOSPEC is a code that automaticallyidentifies absorption spectral lines, estimates the continuum with a Legendre polynomial, measuresthe EWs and the radial velocities (RVs) for all the detected lines, and identifies among them thelines provided in an input line list. The measurement of the EWs is performed adopting a saturatedGaussian function and using the same FWHM for all the lines. One of the most interesting featuresof
DAOSPEC is the computation of a global continuum that takes into account the effects of weaklines.Among the different input parameters, the most important are the value of the FWHM ( FW ),the order of Legendre polynomial used to fit the continuum ( ORD ), the residual core flux ( RE , usefulto refine the EW measurement for strong lines) and the possible scaling of the FWHM with the ∼ pancino/docs/daospec.pdf SC ). DAOSPEC can run by using a fixed value of the FWHM, chosen by the user, oralternatively the FWHM is refined according to the residuals of the spectrum.
3. Basic layout of
At the first run, the analysis starts by adopting as FWHM the input value specified by the userand investigating a range of RVs specified in input.
DAOSPEC runs, finding new values of FWHMand RV. If the difference between the input and output FWHM is larger than a threshold value(chosen by the user, see Section 5), a new run of
DAOSPEC is called, starting with the output FWHMof the previous run as new input value, and moving in a range between RV-5 σ RV and RV+5 σ RV ,where σ RV is the dispersion of the mean RV as computed by DAOSPEC by using the matched lines.During the process of RV determination, the
DAOSPEC parameter VE (that is the number of standarddeviations from the mean radial velocity used to discard the discrepant lines) is set to 3 by default.During the first iteration, the RE parameter can be tuned according to different recipes, chosenby the user (see Section 5). Basically, RE can be: (i) chosen by the user as fixed parameter, (ii) determined by using the central depth of the strongest line available along the spectrum.In this case will read the .daospec file, looking for the line with the highest EW, amongall the measured spectral lines (and not only the matched ones). Also, in the identification ofthe strongest line available among those measured by DAOSPEC , does exclude automaticallylines lying in spectral regions affected by non-photospheric transitions (like telluric and interstellarfeatures). These regions are stored in the code and listed in Table 1; (iii) determined by using the central depth of a precise spectral line provided by the user.The optimization of the FWHM can be affected by the presence in the observed spectrum ofnon-photospheric lines (like telluric or interstellar features, whose FWHM will be different withrespect to that of the photospheric lines), ruined spectral regions or zones dominated by widedamped wings (as the Balmer lines or the Calcium II triplet lines). allows to mask spectralregions that the user wish to exclude by the analysis. When this option is enabled, performs afirst run of DAOSPEC on the entire spectrum; then the regions to be masked are substituted with thecontinuum spectrum estimated by
DAOSPEC . Because the presence of flat spectral regions can createproblems with
DAOSPEC , Gaussian noise (estimated according to the estimated average residuals) isadded in these regions, following the prescriptions by Press et al. (1992). Fig. 1 shows an exampleof this process, where the regions corresponding to the Na D interstellar lines have been maskedin a UVES-FLAMES spectrum of a giant star in the globular cluster NGC 5694 (Mucciarelli et al.2013a). This temporary file (called masked.fits ) is used in the following runs of and whenthe FWHM converges, the last run is performed on the original spectrum.When the difference between the input and output FWHM reaches the threshold value, a final 3 –run of
DAOSPEC is performed, but keeping the FWHM fixed at the value optimized in the previousiteration. The output on the terminal summarises for each iteration the input FWHM (expressedin pixels), the RE value, the used range of radial velocities (RV1 and RV2) with the average RVderived in the previous iteration. Additionally, if the spectral mask is enabled, a label advises ofthe use of this option.During the execution, the basic input files of DAOSPEC , namely laboratory.dat and daospec.opt ,are written and managed by , while the output messages that usually
DAOSPEC writes on theterminal, are written in a temporary file named log.daospec . Also, the graphical output on themonitor usually provided by
DAOSPEC is automatically disabled.
4. Installation
Once you have downloaded the archive file from the website ,type the commands gunzip 4DAO v*.*.tar.gztar -xvf 4dao.tar
These commands unpack the archive file creating a directory named , including the sourcefiles and the Makefile needed to compile the code. Additionally, a sub-directory named tutorial includes some examples of the configuration files to check quickly if the code is well installed. Tocompile the code you need to have installed in your machine the same libraries that you have usedto install
DAOSPEC : (1) the SuperMongo (SM) libraries (namely libplotsub.a , libdevices.a and libutils.a , compiled in single precision), (2) the X11 libraries, and (3) the libcfitsio.a library ∼ rhl/sm/ . can be compiled with the Intel Fortran Compiler, that you can download from the Intelwebsite , after the registration. The Makefile can be easily updated, by properly setting the pathsof the requested libraries. Before to start the installation, check that the installation of all therequested libraries is correct (basically, if you have already installed
DAOSPEC you should be alreadysolved all the problems about the installation of these libraries). However, we refer the reader toSection 4 of the
DAOSPEC
Cookbook and to Section 3 of the GALA
Cookbook for the descriptionof some common installation problems and their possible solution. Also, makes use of the GPLGhostscript software (executable gs ), freely available at ; please,check if gs is installed on your machine.The installation procedure assumes that you have already installed DAOSPEC on your machine (ifyou have not yet done, do it!) and that the executable file is named daospec (in lower-case letters)and its path already stored in your login file. If your executable is named with a different name,before to install you need to properly set the variable nexe in the source file.Now you can install , typing the command make all and the executable will be saved in the current directory. Finally, put the path of thisdirectory in your login file according to the shell environment of your machine (for instance in theconfiguration file .bashrc or .tcshrc)In order to check the installation, go to the tutorial subdirectory, hold your breath, crossthe fingers and type .
5. Input files
Only two specific input files (besides the input spectra and the line lists) are necessary to run , a configuration file named and a file with the list of the spectra to be analysed,named .(1)
The input file includes the main configuration parameters, adopted in the analysis ofall the star listed in . The layout of the file is as follows: • tol is the minimum difference (expressed in pixels) between the values of the FWHM derivedby DAOSPEC in two consecutive iterations. When this difference is smaller than this parameter, http://heasarc.gsfc.nasa.gov/fitsio/fitsio.html http://software.intel.com/en-us/non-commercial-software-development assumes that the convergence is reached and the FWHM obtained in the last iteration istaken as the final value. If the FWHM is fixed to the input value (see below for the file), this parameter is ignored. • nimax is the maximum number of allowed iterations. Typically, needs of less than 5iterations to converge to a stable FWHM value, but this parameter is useful to avoid infiniteloops due to unforeseen problems with your spectra. • fmax is the maximum value allowed for the FWHM (expressed in pixels). If the FWHMexceeds the value of this parameter, the convergence process is stopped to the last iterationand the star flagged to easily identify the occurrence of this problem. • plot specifies the kind of output plot created for each spectrum. The allowed values are 0 (theline plots will be sorted according to their wavelengths) and 1 (the line plots will be sortedaccording to corresponding element). If different values are provided, sets automaticallythis parameter to 0. • verbose specifies the verbosity level on the terminal. Accepted values are 0 (no message atall), 1 (only the sequence of the analysed spectra is shown), 2 (all the information about theprocedure is shown). • restart is the initial value of the residual core flux RE parameter. includes different waysto estimate this parameter, but if the code fails to derive a reliable parameter (we assumedthat RE ranges from 0 to 30), RE will be set to the value specified by restart . • output specifies the format for the output (normalized and radial velocity-corrected) spectra:with F (or f ) the output spectra will be created in standard FITS format, since with A (or a )will be written in ASCII format (the wavelength in the first column and the normalized fluxin the second column). If different values are provided, the output will be created in ASCIIformat. • clean deletes some files used by DAOSPEC , like laboratory.dat , daospec.opt , log.daospec andall the files related to the mask of some spectral regions. The allowed options are Y (or y )and N (or n ). Because in the execution of a sequence of spectra these files are over-written, will save only the files related to the last spectrum. The option clean = n can be usefulto check individually all the temporary files for some problematic spectra. 6 – • gala specifies if the output format is that needed for the input files of GALA (Mucciarelli et al.2013b) or not. If the parameter is Y / y (the default value) the output file will be writtenfor GALA , for all the other character values, the output file will include all the informationincluded in the input line list, reading it as a string. • conter enables the measurement of the EWs by varying the continuum level. This is acrude way to provide a conservative estimate of the impact of the continuum location on themeasured EWs. During this procedure, the normalized spectrum is lowered and raised bythe relative flux dispersion in the residual spectrum (as listed in the .daospec output file).Then, repeats the same procedure used for the original spectrum, but assuming ORD =–1,thus fixing the continuum level at 1. The allowed values are -1 (to disable this option), 0 (tore-calculate the EWs after a new optimization of the FWHM starting from the best valueobtained in the main procedure) and 1 (to re-calculate the EWs by fixing the FWHM at thebest value finding in the main procedure).(2)
This file lists the sequence of spectra that you plan to analysis with
DAOSPEC . The layout of thisfile will be as follows: • The first column indicates the name of the spectrum in FITS format (you can also not specifythe extension .fits ). • The second and third columns are the initial FWHM (in pixels) and the order of the Legendrepolynomial, respectively. • The forth and fifth columns are the initial range of RV used by
DAOSPEC . • The sixth value is the
DAOSPEC parameter SC , allowing to enable the line fitting procedureassuming that the FWHM is proportional to wavelength (see Section 2.3.12 in the DAOSPEC
Cookbook). Thus, the allowed values are 0 (for the use of a single FWHM for all the lines)and 1 (for scaling the FWHM according to the wavelength of the lines). • The seventh value enables the optimization of the FWHM (0) or launch
DAOSPEC keeping theFWHM fixed to the value specifies in the second column of the file (1). • The eighth column specifies the line list used for that spectrum. No specific format is re-quested, but only that the first column is the wavelength in ˚ A and the second the code ofthe element. For the latter, accepts both the GALA format (i.e. 26.00 for Fe I and 26.01for Fe II) and the
MOOG format (i.e. 26.0 for Fe I and for 26.1 for Fe II). Note that if the 7 –keyword gala in is Y , the input file needs to include all the information requestedby GALA (wavelength, element code, log gf, excitation potential, damping constants and α velocity parameter, see Mucciarelli et al. 2013b): • The ninth and tenth values are the wavelengths that identify the spectral range where
DAOSPEC performs the spectral line measurements. You can specify the spectral range that you prefer;if one (or both) of the value is set to 0, tries to readjust the corresponding spectral edgein order to avoid regions with negative flux, too noisy or with dramatic variations of the fluxwith respect to the spectrum. • The eleventh column specifies the way to set the RE parameter. If a value between 0 and30 is provided, RE will be fixed at this value. For negative values, RE is fixed to the valuespecified in by the keyword restart for the first iteration, then it is refined byusing the central depth of the strongest line measured by DAOSPEC . Alternatively, you canprovide the wavelength of a given strong line (for instance a Balmer line, if available) and will try to match its position with the closest transition measured by
DAOSPEC . In bothcases, if the derived RE values is negative or larger than 30, the value specified by restart will be assumed. • The last column is the name of the ASCII file including the wavelengths of spectral regionsthat you want to mask during the analysis. The file does not need any specific format, but itincludes only two columns (each raw corresponding to a given spectral region to be masked,considering the observed spectrum, thus the wavelengths do not include the RV shift.). If youdo not need to use this option, you can only specify a name or a symbol (like * in the someraws of the shown example) not corresponding to an existing file.
6. Output files
Together with the standard output files produced by
DAOSPEC (the FITS files including thefitted continuum and the residual spectrum, and the .daospec file with all the measured lines), rootname (as specified in the first column of ), the followingfiles are created: • rootname DAOSPEC , thefit of each individual line and information about RVs and EWs uncertainties.The first panel shows the entire spectrum with superimposed (as a red line) the continuumlevel computed by
DAOSPEC . If you have masked some spectral zones, these regions will beshown in this plot as yellow-shaded regions (see Fig. 2). The RV shift of the star is not appliedin this plot.The following panels display all the lines listed in the input file, sorted in the wavelengthor in the element code (according to the keyword plot in ), with superimposedthe best-fit (red line) calculated by DAOSPEC . Lines in the input file that are rejected or notrecognized by
DAOSPEC are plotted in blue color, in order to allow an easy identification of thelost features. In each panel the main information are labelled, as wavelength, ion code, EW,radial velocity, uncertainty in EW (expressed in percentage) and Q parameter. An exampleof these plots is shown in Fig. 3.The panel shown in Fig. 4 is created only if the keyword conter is 0 or 1. It shows the variationof the measured EWs with respect to the original values when an increase or a decrease ofthe continuum level is assumed (black and red points, respectively). The variation of EWs isshown as a function of the wavelength (upper panel) and of the EW (lower panel).The second to last panel (see Fig. 5) shows the RV of all the lines as a function of thewavelength (upper panel) and the EW (lower panel), and with the ± σ , ± σ and ± σ levelsmarked as dotted lines.The last panel (Fig. 6) shows the behavior of the EW error (upper panels) and of the Qparameter (lower panels) as a function of EW and wavelength. • the file named rootname.in includes the main information about the EW measurements.If the GALA output is enabled, this file will have the same format described in the
GALA
Cookbook, with the addition of the Q-parameter (not requested by
GALA ) in the eleventhcolumn. Alternatively, it will contain wavelength, EW, error in EW, Q-parameter and thenall the other information provided in the input line list. Note that if conter is 0 or 1, twoadditional columns will be added (at the end of the file), including the EWs measured byraising and lowering the normalized spectrum, respectively. • rootname ZVN (.fits or .dat according to your choice in the keyword output in )is the original input spectrum, normalized using the continuum calculated by DAOSPEC andcorrected for radial velocity using the average RV derived by
DAOSPEC . This file is especiallyuseful to create scientific plots or to use to perform additional chemical analysis based on thespectral synthesis. 9 –Additionally, the file daospec.log summarises the main parameters derived by for allthe spectra listed in . For each spectrum the final FWHM (in pixels), the averageradial velocities (in km/s) with its dispersion, the number of matched lines, the flux residuals (inpercentage), a convergence flag related to the FWHM, the used starting and ending wavelengths,the RE value and the wavelength of the line used to derived RE (only in case this parameter is tunedby using the strongest available line) are provided. The file header explains the meaning of theconvergence flag. Briefly:CONV=1 the FWHM does converge (or the FWHM has been fixed to the initial value withoutoptimization);CONV=0 the number of iterations exceeds the maximum number of allowed iterations (specifiedby nimax in ). In this case the results are referred to the last iteration;CONV=–1 if the code calculates the same value of FWHM in two different iterations, to avoid therisk of an infinite loop, the code exits, writing the results of the last iteration, and passing to thenext spectrum;CONV=–2 the FWHM exceeds its maximum allowed value specified by fmax in Alsoin this case, the written values in the output are referred to the last iteration. This flag identifiesalso the cases where a negative FWHM is provided or found;CONV=–3 the median value of the entire spectrum is negative, pointing out some problems in thespectral reduction (or the spectrum is missing).
DAOSPEC would crash with similar spectra, thusthe analysis is stopped, all the output values are 0.0 and moves to the next spectrum of thelistCONV=–4 format problems in the daospec.opt or .daospec files are found;CONV=–5 no line is found in the wavelength range of the observed spectrum. REFERENCES
Mucciarelli, A., Bellazzini, M., Catelan, M., Dalessandro, E., Amigo, P., Correnti, M., Cortes, C.,& D’Orazi, V. 2013, MNRAS, 435, 3667Mucciarelli, A., Pancino, E., Lovisi, L., Ferraro, F. R., & Lapenna, E., 2013, ApJ, 766, 78Press, W. H., Teukolsky, S. A., Vetterling, W. T., & Flannery, B. P., 1992, ’Numerical recipes inFORTRAN. The art of scientific computing’.Stetson, P. B., & Pancino, E., 2008, PASP, 120, 1332
This preprint was prepared with the AAS L A TEX macros v5.2.
10 –Table 1.Feature λ start λ end ( ˚ A ) ( ˚ A )Na D first component 5889.0 5890.5Na D second component 5895.0 5896.5 O X0-b2 Band 6275.0 6320.0B Band 6860.0 6930.0 H O Band 7160.0 7330.0A Band 7590.0 7700.0 H O Band 8125.0 8340.0 H O Band 9100.0 9800.0Note. — Spectral regions masked by during the determination of the RE parame-ter. 11 –Fig. 1.— Spectral region of the UVES spectrum of the star NGC 5694-37 around the Na Dinterstellar lines before (upper panel) and after (lower panel) the application of the mask. 12 –Fig. 2.— The UVES Red Arm 580 spectrum of the star NGC 5694-37 (Mucciarelli et al. 2013a)with superimposed the continuum computed by DAOSPEC (red curve). The yellow-shaded areas markthe spectral regions masked by , namely the Na D photospheric lines, the region contaminatedby telluric lines between 6280 and 6320 ˚ A and the region around the H α Balmer line. 13 –Fig. 3.— Example of the plots showing the fit (red lines) of each individual line; blue linesmark the lines not matched by
DAOSPEC . In each sub-panel the main information about the line(wavelength, ion code, EW and its error, radial velocity and Q parameter) are listed. 14 –Fig. 4.— Variations of the measured EWs calculated increasing (black points) or decreasing (redpoints) the continuum level according to the flux residuals. These variations are shown as a functionof the wavelength (upper panel) and of the EW (lower panel). 15 –Fig. 5.— Behavior of the radial velocity of each individual spectral line as a function of the EW(upper panel) and of the wavelength (lower panel). In both the panels the dashed horizontal linesare ± σ , ± σ and ± σσ