Source-linked AI summary

DAOSPEC: an automatic code for measuring equivalent widths in high-resolution stellar spectra

P. B. Stetson, E. Pancino

arXiv:0811.2932v1astro-ph

TL;DR

Stellar EW analysis must scale to large, high-quality spectral datasets while reducing the labor and subjectivity of interactive measurements. DAOSPEC provides an automatic, publicly available Fortran workflow that fits continua and lines, refines radial velocities and FWHM, and reports EWs. Comparisons indicate close agreement with EWDET in FWHM and radial velocity, while the method remains constrained by continuum-placement uncertainty and spectrum-dependent assumptions.

  • Problem

    Interactive EW measurement is laborious and subjective, especially in continuum placement, limiting efficient and reproducible analysis of growing high-resolution spectral datasets.

  • Method

    DAOSPEC uses an automatic, publicly available Fortran workflow that iteratively fits the continuum and lines while refining radial velocities, FWHM, and EW measurements.

  • Results

    ΔFWHM=0.001±0.076 Å and Δv_r=0.1±0.6 km s−1 were found between EWDET and DAOSPEC measurements.

  • Takeaways & Limitations

    Public automation makes DAOSPEC results reproducible and testable across users and conditions while supporting analysis of many spectra.

  • Takeaways & Limitations

    EW uncertainty is constrained by imperfect continuum knowledge, whose effect is difficult to incorporate completely; continuum placement also remains spectrum- and user-dependent in related workflows.

Abstract

from arXiv · show

DAOSPEC is a Fortran code for measuring equivalent widths of absorption lines in stellar spectra with minimal human involvement. It works with standard FITS format files and it is designed for use with high resolution (R>15000) and high signal-to-noise-ratio (S/N>30) spectra that have been binned on a linear wavelength scale. First, we review the analysis procedures that are usually employed in the literature. Next, we discuss the principles underlying DAOSPEC and point out similarities and differences with respect to conventional measurement techniques. Then experiments with artificial and real spectra are discussed to illustrate the capabilities and limitations of DAOSPEC, with special attention given to the issues of continuum placement; radial velocities; and the effects of strong lines and line crowding. Finally, quantitative comparisons with other codes and with results from the literature are also presented.

1. Introduction

High-resolution stellar spectroscopy increasingly requires efficient, reproducible equivalent-width measurements, but interactive workflows remain laborious and subjective. DAOSPEC addresses this need as a public, automatic Fortran code designed for broad, repeatable use.

  • Equivalent widths help disentangle stellar chemical abundances from temperature and gravity effects in absorption features.
  • Hundreds of high-resolution spectra can now be acquired simultaneously, increasing the need for scalable analysis.
  • Interactive EW measurement is slow because users identify lines and measure each feature manually.
  • User-dependent continuum placement makes interactive measurements subjective, so different users can obtain different results from identical data.
  • DAOSPEC is a Fortran code for measuring equivalent widths of atmospheric absorption lines in high-resolution spectra.
  • DAOSPEC supports automatic, unsupervised processing of many stars, standard FITS formats, and reproducible testing by different users.

2. EW Measurements in General

Equivalent width measures absorption strength through an area-equivalent wavelength width, but real spectra require profile fitting and uncertainty treatment. Continuum placement remains a difficult and consequential source of error across measurement procedures.

  • Equivalent width is the wavelength width of an opaque rectangular feature having the same absorbed area as the observed line.
  • For discretely sampled spectra, EW can be computed from pixel size, continuum level, and observed flux.
  • Noise, defects, and neighboring lines often motivate fitting a Gaussian-shaped profile instead of directly summing pixel fluxes.
  • The Gaussian model is appropriate for many lines, while alternative profiles can be used when lines significantly deviate from Gaussian form.
  • EW uncertainties depend on spectral quality and continuum placement, with continuum uncertainty difficult to incorporate completely.
  • Interactive tools require user decisions about line finding, fitting, and continuum placement, limiting objectivity and repeatability.

3. DAOSPEC

DAOSPEC processes spectra through input preparation, iterative fitting, and evaluation/output stages. It refines the continuum, line properties, FWHM, radial velocity, and line identifications before reporting measured equivalent widths and diagnostics.

  • DAOSPEC is standard Fortran 77 software using cfitsio for standard FITS-format spectra, with optional IRAF-format and graphical-display support.
  • The reduction path has three stages: input and preparation, a main iteration loop, and evaluation and output.
  • Inputs include configuration parameters, a laboratory-wavelength line list, and one or more spectra for sequential analysis.
  • Initial continuum fitting and line finding provide a preliminary correlation with laboratory wavelengths for an initial radial-velocity estimate.
  • The main loop subtracts provisional lines, refines continuum normalization, and jointly refines line centroids, strengths, and FWHM.
  • After refinement, outlier clipping determines radial velocity and legitimate line identifications, while fitted line parameters yield equivalent widths.
  • Outputs include FWHM, radial velocity and its standard error, the number of velocity lines, residual RMS, and detected-line information.

3.1. Line finding, line identification and radial velocity

DAOSPEC identifies spectral lines with a tuned second-derivative filter and refines their parameters, including FWHM, through robust nonlinear least squares. It estimates radial velocity by cross-correlating detected lines with laboratory wavelengths, while warning that instrumental systematics can exceed line-by-line variance.

  • Line finding: A tuned second-derivative filter identifies local minima, while an initial FWHM estimate helps distinguish valid lines from noise and continuum features.During iteration, DAOSPEC jointly refines FWHM, centroids, and strengths by robust nonlinear least squares.
  • Line identification and radial velocity: Preliminary radial velocity comes from the wavelength shift producing the greatest number of matches between detected lines and the input laboratory list.The reliability of this step depends partly on supplying a complete, appropriate line list for the star and spectral setup.
  • Line identification and radial velocity: The final radial-velocity result includes line-by-line variance and the number of lines used, which can in principle yield an error estimate of σ/√(n−1).This estimate does not capture all systematic velocity errors.
  • Line identification and radial velocity: Thermal changes and stellar-image mis-centering in a finite slit can produce systematic velocity errors that are not reflected in line-by-line variance.Telluric absorption lines may help correct some effects, but sky emission lines cannot correct stellar mis-centering.
  • Line identification and radial velocity: Telluric absorption lines can provide a separate measurement for correcting instrumental effects, with reported shifts of up to 1–3 km s−1 and uncertainties of about 0.5 km s−1.These values come from red-giant observations in ω Centauri and open clusters.

3.2. Continuum Normalization

DAOSPEC measures equivalent widths relative to an effective continuum that statistically incorporates unresolved neighboring absorption and other local flux deficits. Artificial-spectrum experiments show that this approach remains closer to input EWs than true-continuum measurements as line crowding increases.

  • Continuum definition: The true continuum is appropriate for isolated, uncrowded lines, but neighboring or unresolved absorbers make it unsuitable for measuring the target transition alone.Flux from contaminating atomic or molecular lines, noise, and defects can contribute to the measured area.
  • Effective continuum: DAOSPEC estimates a depressed effective continuum by balancing residuals after identified lines are subtracted, assuming nearby unidentified opacity is statistically representative.The resulting EW is intended to isolate the target transition more reliably in crowded spectra.
  • Artificial spectra: The artificial spectra compare a clean case containing 20–100 mÅ lines with a full case containing hundreds of additional lines below 20 mÅ, most below 1 mÅ.The simulations used R≃40,000, S/N=35, and 0.03 Å per pixel.
  • Continuum comparison: DAOSPEC’s effective continuum is lower than other continuum estimates by 1% in the clean spectrum and 2.5% in the full spectrum.The corresponding RMS residuals were 2.4% and 2.9% per pixel, respectively.
  • Artificial spectra: On the clean spectrum, DAOSPEC underestimated EWs by ΔEW=−1.60±0.95 mÅ, while IRAF/splot overestimated them by ΔEW=1.45±0.95 mÅ.Both differences were probably negligible relative to the uncertainties, at approximately 1.5σ.
  • Artificial spectra: In the full spectrum, DAOSPEC had a net shift of ⟨ΔEW⟩=−2.3±5 mÅ, compared with +6.0±5.7 mÅ for splot.DAOSPEC measurements remained closer to input values and more consistent with the clean-spectrum measurements as crowding increased.
  • Crowding and practical implications: As crowding increases, measuring against the true continuum becomes unreliable because unrelated unrecognized lines can add opacity to the target-line EW.Interactive local continuum placement can therefore introduce systematic bias when weak absorptions are ignored.

3.3. EW Gaussian Fit

DAOSPEC fits crowded absorption features simultaneously with a saturated Gaussian profile and a shared or wavelength-scaled FWHM. Tests show the approximation is useful for moderately saturated lines but fails at resolution- and signal-dependent equivalent widths, especially for strong lines.

  • Crowded spectra: DAOSPEC fits small groups of overlapping absorption features simultaneously, assigning each feature its own contribution to missing pixel flux.This enables automated deblending across overlapping line profiles.
  • Saturated Gaussian: The saturated Gaussian approaches a Gaussian for weak lines, prevents negative central flux for increasing line strength, and empirically extends fitting to moderately saturated lines.The formulation is not physically first-principles and cannot adequately reproduce strongly saturated lines.
  • Validation: The validity threshold depends on spectral resolution and S/N because better-defined lines make deviations from the model profile more statistically significant.Different transitions can also depart from the adopted profile at different EWs because their physical line wings differ.
  • Validation: At high resolution, DAOSPEC measurements begin deviating from Rutten & van der Zalm EWs around 80 mÅ, while at R∼20000 agreement remains within noise to ∼200 mÅ.The deviation marks where DAOSPEC’s Gaussian approximation becomes unreliable.
  • FWHM constraint: A shared FWHM, optionally scaled with wavelength, helps deblend crowded spectra by avoiding independent width parameters for each line.The initial FWHM guess is refined during robust least-squares fits.

3.4. Uncertainties

DAOSPEC reports line-level and spectrum-level diagnostics for EW reliability, including formal errors, the quality parameter Q, and residual scatter. These diagnostics expose weak lines, profile mismatches, wavelength-dependent data quality, and continuum-placement uncertainty, but overly strict Q filtering can introduce systematic effects.

  • Uncertainty diagnostics: DAOSPEC provides formal EW errors, a line-level quality parameter Q, and spectrum-wide residual standard deviation to characterize measurement uncertainty.The three diagnostics describe individual fits and the quality of the overall solution.
  • Formal errors: The relative formal error σ(EW)/EW increases for weaker lines because noise and random blending increasingly affect their measurements.Lines with EW smaller than three times σ(EW) should be rejected as a rule of thumb.
  • Quality parameter: Most lines above 200 mÅ in star 2129 have Q > 1, indicating larger local residuals than average and possible stronger deviations from the Gaussian profile.Q compares the line-region residual RMS with the spectrum-wide residual RMS.
  • Quality parameter: Q can also be elevated by nonuniform spectral quality, including lower S/N at the blue end and telluric O2 absorption near 7600 Å.A wavelength-dependent Q trend can therefore identify problematic spectral regions.
  • Quality parameter: Overly strict Q selection can introduce difficult-to-foresee systematic effects, so moderately high-Q lines may instead be assigned larger σ(EW) values.For the illustrated spectrum, a threshold somewhere between 1 and approximately 2 could be adopted depending on analysis goals.
  • Residual scatter: The spectrum-wide residual standard deviation reflects photon noise as well as unrecognized weak lines, molecular bands, instrumental imperfections, and preprocessing defects.Positive and negative EW errors should occur with similar frequency, so abundance errors can decline as more lines spanning a broad wavelength range are measured.
  • Continuum uncertainty: Continuum placement imposes a global systematic uncertainty, and its ultraconservative estimate accounts for fitted polynomial parameters and pixels covered by detected lines.For a 40,000-pixel spectrum with 1,000 lines and a 20th-order polynomial, a 1% per-pixel residual level cannot yield continuum placement uncertainty as low as 1%.

3.5. Dependency on Input Parameters

DAOSPEC’s EW results depend most strongly on continuum placement, the initial FWHM estimate and its wavelength scaling, and the residual core flux used for strong lines. Wrong choices can alter line detection, introduce EW trends, or bias strong-line measurements.

  • Continuum placement: The Legendre-polynomial order controls global continuum placement, and an unsuitable order increases scatter in the resulting EWs.Too low an order can alternately overestimate and underestimate the continuum across the spectrum.
  • First-guess FWHM and scaling: A wrong input FWHM changes the total number of detected lines, especially weak anonymous features, while listed-line detections change little.Lines missed during initial detection because the FWHM is too large are not recovered during later iterations.
  • First-guess FWHM and scaling: The output FWHM remains stable for an input error of about 10%, but larger errors cause perceptible over- or underestimation.The authors recommend repeating the measurement when converged and input FWHM values differ by more than approximately 10%.
  • First-guess FWHM and scaling: On echelle spectra, a constant FWHM overestimates widths in the blue and underestimates them in the red, so wavelength scaling is needed for accurate EWs.Figure 12 shows the resulting EW overestimation in the blue and underestimation in the red.
  • Residual core flux: The residual core flux parameter makes strong-line profiles saturate at a user-specified fraction of the continuum instead of zero.Typical values are 5–25%, and the saturation model also broadens stronger lines at fixed FWHM.

3.6. Dependency on Spectral Quality

DAOSPEC’s EW measurements remain close to the input values across a range of signal-to-noise ratios, resolutions and adequate samplings. Resolution and sampling impose clearer practical boundaries than signal-to-noise ratio alone.

  • S/N ratio: At R≃35000, the average EW difference remains close to zero from S/N=300 down to S/N=10, while variance increases by approximately 2 mÅ.The experiments used artificial spectra sampled at approximately five pixels per resolution element.
  • S/N ratio: DAOSPEC therefore gives good EW results even at S/N as low as 10 when spectra are properly sampled.The authors attribute this partly to using the same FWHM for all lines and distinguishing lines from noise features in adequately sampled spectra.
  • Resolution: Resolution is more critical than S/N: at R=5000, the total number of identified lines is very low, whereas R=10000 is suggested as a lower validity limit.At higher resolution, the EW spread improves; it reaches approximately 3 mÅ at R=60000.
  • Pixel sampling: For fixed R=35000 and S/N=100, samplings of FWHM≥2 pixels yield near-zero average EW differences and σ≈8–9 mÅ.At FWHM=1 pixel, the average remains near zero but the spread is substantially higher.
  • Pixel sampling: DAOSPEC is reliable for adequately sampled spectra, while undersampled spectra remain promising but have higher uncertainty, especially for weak lines.Near the two-pixel limit, noise can be confused with spectral features and increase measurement variance.

3.7. Performance considerations

DAOSPEC is fast enough for batch processing but prioritizes accurate continuum placement, FWHM estimation and convergence over minimum execution time. Runtime depends mainly on spectrum size, line count, memory allocation and the quality of the initial FWHM estimate.

  • Runtime: DAOSPEC is faster than interactive or semi-automatic programs, especially in unsupervised batch mode, but its loops may run longer to improve measurement reliability.The code was designed for accurate results rather than the fastest possible execution.
  • Runtime: One 190,000-pixel FEROS spectrum containing 2,429 lines took a few minutes to measure on a Mac Pro workstation.Typical runtime across machines ranges from a few seconds to a few minutes, depending on spectral quality and other factors.
  • Runtime drivers: An incorrect input FWHM can slow execution by a factor of 10 or even 100, so a robust FWHM estimate should precede computation.Severely wrong values trigger many inner-loop executions while the code attempts to handle the anomaly.
  • Runtime drivers: Runtime increases with spectrum length and the number of detected lines, while raising the minimum interesting EW can reduce loops in complicated spectra.The MXSPEC and FWHM settings have stronger effects on speed than this EW threshold.
  • Runtime drivers: Fixed-FWHM processing is slightly faster, but on echelle spectra it can reduce EW accuracy when wavelength-dependent FWHM is needed.Using a fixed FWHM can provide only small speed improvements over short wavelength intervals, at the expense of EW accuracy.

4. Comparisons

DAOSPEC generally agrees satisfactorily with IRAF, EWDET, and ARES, although continuum placement, spectral quality, crowding, and parameter choices affect the comparisons. Adjusting continuum polynomial order and FWHM substantially improved one problematic FEROS analysis.

  • DAOSPEC comparisons: DAOSPEC and IRAF showed essentially perfect agreement in a red solar window, with ΔEW=0.8±1.1 mÅ, but weaker agreement in a bluer, more crowded window, with ΔEW=4.0±4.9 mÅ.The comparison used 34 red-window lines and 25 blue-window lines.
  • DAOSPEC comparisons: Changing the continuum polynomial order from 8 to 30 and the FWHM input from 5 to 14 improved FEROS measurements and reduced execution time by roughly a factor of 50.Automated processing of spectrum pieces took 10 minutes and produced ΔEW=–4.1±4.3 mÅ for the full spectrum and ΔEW=–6.5±4.4 mÅ for 100 Å pieces.
  • DAOSPEC vs. EWDET: DAOSPEC and EWDET showed satisfactory agreement, with ΔFWHM=0.001±0.076 Å and Δv_r=0.1±0.6 km s−1, although EW scatter increased for stronger lines.DAOSPEC’s continuum was on average 1.3% lower, and both programs’ error estimates appeared somewhat small given the observed spread.
  • DAOSPEC vs. ARES: For 98 common lines, DAOSPEC and ARES agreed closely: ΔEW=–1.1±3.7 mÅ, ΔFWHM=0.01±0.05 Å, and Δv_r=–0.002±0.126 km s−1.The high-quality test spectrum had R≃45000 and S/N≃350; possible problems remained in its bluest, most crowded region.
  • DAOSPEC vs. ARES: The DAOSPEC and ARES comparison also yielded solar abundances compatible with one another and with solar values, requiring only negligible log g and very small microturbulence changes.The conclusion is based on the abundance analysis summarized in Table 1.

5. Conclusions

DAOSPEC is fast, minimally interactive, reproducible, and suitable for automatic processing, but several user-selected reduction parameters still require judgment. Its flexibility makes rapid parameter testing practical despite this limitation.

  • 5. Conclusions: DAOSPEC’s minimal interactivity supports fast and reproducible equivalent-width measurements.The authors identify polynomial order, initial FWHM, radial-velocity range, and minimum EW as user-specified choices whose best values are not always obvious.
  • 5. Conclusions: The remaining uncertainty over several input parameters is also a practical strength because DAOSPEC runs fast enough to test alternative settings easily.The authors frame parameter flexibility as both a weakness and a strength.
Loading 0811.2932v1…