1 Introduction

Quantitative spectroscopy is one of the most rewarding fields of stellar astrophysics. It allows the courageous researcher who has decided to devote time to this fascinating enterprise, to have first hand access to an important set of empirical information about the investigated stars which, in most cases, cannot be obtained by any other means. This mainly comprises several key stellar parameters (including, e.g., spin rates, effective temperatures, and gravities), as well as surface abundances of those elements which have left their imprint in the observed piece of the stellar spectrum that will be analysed. In addition, the analysis process can help to highlight (and better characterize) the presence of stellar winds, circumstellar material, spots and surface magnetic fields, faint companions in binary systems, and/or some sources of stellar variability/activity, specially when multi-epoch spectroscopy is considered.

I write courageous researcher because becoming a reliable expert on quantitative stellar spectroscopy requires mastering several skills comprising observational, theoretical, modeling and programming aspects, as well as having medium to high knowledge of radiative transfer and atomic physics. Also, from a practical point of view, my own expertise gives me confidence to remark that having a detail oriented profile certainly helps to avoid providing erroneous and/or spurious information from the analysed spectra.

But, what does quantitative spectroscopy means? Paraphrasing my good friend M. A. Urbaneja from the University of Innsbruck, quantitative spectroscopy can be defined in a simple way as the inference of the physical parameters that (uniquely and completely?) characterize an astronomical object based on three tools: an observed spectrum, a set of theoretical spectra, and a given comparison metric.

Obviously, as the reader can imagine, this topic is so broad that it could lead to several books. In this chapter, I take the opportunity that the kind invitationFootnote 1 to participate in this book offers me to provide a broad overview of the main quantitative spectroscopic techniques which are presently applied to the study of the so-called massive OB stars.

The chapter is intended to serve to young students as a first approach to a field which has attracted my attention during the last 20 years. I should note that, despite its importance, at present, the number of real experts in the field around the world is limited to less than 50 people, and about one third of them are close to retirement. Hence, I consider that this is a good moment to write a summary text on the subject to serve as guideline for the next generations of students interested in joining the massive star crew.

If you are one of them, please, use this chapter as a first working notebook. Do not stop here. Dig also, for further details, into the literature I quote along the text. And, once there, dig even deeper to find all the original sources explaining in more detail the physical and technical concepts that are presently incorporated into our modern (almost) automatized tools.

Someone posed me the following question long time ago: why a student needs to learn how to compute the square root of a 10-digit number if a calculator can easily do it? If you know the answer to this question, I’m sure you can become one of the next experts in quantitative spectroscopy of massive OB stars. Go ahead and do a good job! You are really lucky to start in a fascinating time in which you will have easy access to thousands of observed and theoretical spectra, as well as to powerful computers allowing to run—in a fast and efficient way—analysis tools incorporating various types of comparison metrics. But, please, never forget the most important rule to enjoy what you are doing and make real progress: don’t use any of these nice tools as black boxes.

This chapter is structured in two main sections as follows. First, I put massive OB stars in context. Then, I describe the main tools and techniques presently used for quantitative spectroscopy of this important, but complex, group of stars.

2 Setting the Scene: Massive OB Stars, from Observations to Empirical Quantities

Quantitative stellar spectroscopy is an intricate tool which allow us to jump from observations to a set of empirical quantities defining a given star. Despite this is a general statement that can be applied to any type of star, the first thing one must realize is that the details of the intermediate steps defining a specific quantitative spectroscopic analysis—as well as the outcome of such analysis—depends on the domain of stellar parameters characterizing the star under study and the available piece of stellar spectrum. In this section, I describe the main ingredients and ideas that must be taken into account to understand the strengths and limitations of the main state-of-the-art tools and techniques used for the quantitative analysis of optical spectra of massive OB stars.

2.1 Massive OB Stars in Context

The term OB stars is commonly used in the literature with several different (but related) meanings. Generally speaking, all of them refer to any given sample of stars with O and B spectral types which define a specific group of interest to investigate a particular astrophysical question involving stars of this type.

However, the considered range in spectral type, as well as the inclusion of luminosity classes other than dwarfs, varies from one study to another. For example, this term is used in some studies of stellar abundances in late-O and early-B dwarfs stars (e.g., [1, 2]), but also in other works investigating the O and B star population of the Milky Way (e.g. [3,4,5]) or other galaxies in the Local Group (e.g., [6,7,8]), or performing any quantitative empirical study of the physical properties of different subsamples including stars of this type (e.g., [9,10,11,12,13,14,15]). As a consequence, the range of mass and evolutionary status covered by the investigated sample of stars may differ. This fact can create some confusion between different communities and, hence, it is important to be highlighted from the very beginning.

Along this chapter, I will follow the original definition by Morgan [16], which identifies OB stars as a spectroscopic “natural group” which, at intermediate and high spectral resolution may be defined by the detection of helium lines in absorption. As indicated by N. R. Walborn in Chapter 3 of the book Stellar spectral classification by Gray and Corbally [17], the low temperature boundary of this group is a diagonal in the Hertzsprung-Russell diagram (HRD) running from B2 V, through somewhat later types at intermediate luminosity classes, to the latest B Ia supergiants.

To put this group of stars in a broader context, I will use the schematic representation of the realm of massive stars in the so-called spectroscopic Hertzsprung-Rusell diagramFootnote 2 (sHRD) created by my former PhD student, G. Holgado, for his thesis [19]. Figure 1 is an adaptation of a figure included in [20], where they presented for the first time the observational distribution of Galactic massive stars in the sHRD. In its original form, [20] presented a density map of stars in the uppermost part of the sHRD using a compilation of spectroscopically derived effective temperatures and gravities for almost 600 stars. Figure 1 also includes, for reference purposes, the evolutionary tracks resulting from the non-rotating stellar evolution models for stars with masses in the range 9–120 M computed by Ekström et al. [21]; and, overplotted as colored regions, the approximate location of various types of stellar objects associated with different evolutionary stages of massive stars.Footnote 3

Fig. 1
figure 1

Schematic representation of the realm of massive stars in the so-called spectroscopic Hertzsprung-Russell diagram (sHRD, [18]). Colored regions depicts the approximate location of the various types of stellar objects (resulting from a phenomenological classification of their optical spectra) found to be associated with different evolutionary stages of stars born with masses above ∼9 M. Figure is based on the plot from [20] adapted by G. Holgado [19]. See [20] for a detail description of the various lines and symbols depicted in the figure

This figure illustrates how the original definition of OB stars by Morgan [16] does not only define a “natural group” from a spectral classification point of view, but also nicely covers the first part of the evolution of massive stars, fully including the main sequence (MS) as well as some early phases of the post-MS evolution.Footnote 4 The first thing to note is the broad range in mass (M≈ 9–90 M), effective temperature (T eff ≈ 10,000–55,000 K), and gravity (log g = 4.4 – 1.2 dex) covered by OB stars. Although not represented in this diagram, these stars also cover a broad range in luminositiesFootnote 5 (L≈ 103.5 – 106 L) and projected rotation velocities (values of v sin i can reach up to 450 km s−1). They also develop radiatively driven winds [24], which become directly observable in their spectral energy distributions and spectral lines above ≈104 L (or, equivalently, the 15 M track), and are mainly characterized by two global parameters: the terminal velocity (v ) and the rate of mass loss (\({\dot {M}}\)). All these extreme conditions must be taken into account when modelling the atmospheres of OB stars, a necessary step to perform any quantitative analysis of their spectra (see Sect. 3.2).

From an evolutionary point of view, as mentioned above (see also Fig. 1), OB stars represent the early evolutionary stages of massive star evolution, where early-B dwarfs/giants and O stars (including all luminosity classes) cover a different range in mass in the Main Sequence, while B Sgs are the evolved descendants of the O-type stars. Other stellar objects associated with later phases of massive star evolution (depending on the initial mass) are the A Sgs, the yellow hypergiants (YHG) and the luminous blue variables (LBV), and, last, the Wolf-Rayet stars (WR), the Red Supergiants (RSG) and the Cepheids.

Although any deeper mention to massive star evolution is out of the scope of this chapter, I refer the interested reader to a recent review by N. Langer [23] about pre-supernova evolution of massive single and binary stars as starting point. Most of the important references to learn further about this subject can be also found there.

2.2 Why to Care About Massive OB Stars?

In addition to the interest per se within the field of stellar astrophysics, any in-depth study of massive OB stars is motivated by the huge impact that our knowledge of the basic physical properties and the evolution of these stars have on many and diverse aspects of the study of the Cosmos (e.g. star formation, chemodynamical evolution of galaxies, re-ionization of the Universe; see [25,26,27,28,29,30]). They are also the progenitors of the most extreme stellar objects known in the Universe, some of them already quoted in previous section (e.g., hyper-energetic supernovae, Wolf-Rayet stars, luminous blue variables, massive black holes, neutron stars, magnetars, massive X and γ-ray binaries), and the origin of new studied phenomena such as long duration γ-ray bursters [31] or the recently detected gravitational waves produced by a merger of two massive black holes or neutron stars ([32, 33]; incl. LIGO and Virgo collaborations).

From a practical perspective, massive OB stars have become valuable indicators of present-day abundances in the Milky Way and other external galaxies, even beyond the Local Group (e.g., [34,35,36]). In particular, they cannot only be considered as a reliable alternative to H ii regions as abundance indicators, but also these stars are superior to nebulae in that they are not affected neither by depletion into dust grains, nor the long-standing problem of the discrepancy resulting from the computation of nebular abundances using collisional emission lines or recombination lines (see, e.g. [37,38,39]).

In addition, in recent years, blue supergiants have been promoted to the hall of fame of the “standard candles”, traditionally including cepheid and RR Lyrae variables, novae, Type Ia and Type II supernovae, as well as globular clusters and planetary nebulae [40, 41]. Indeed, as highlighted by Kudritzki [42], these stars are ideal stellar objects for the determination of extragalactic distances, in particular, because they are the brightest stars in the Universe and the perennial uncertainties troubling most of the other stellar distance indicators—namely, interstellar extinction and metallicity—do not affect them.

Last, the interpretation of the light emitted by close-by and distant H ii regions and starburts galaxies relies on our knowledge of the effect that the strong ionizing radiation emitted by the O-type stars produce in the surrounding interstellar medium [43,44,45]. Also, any empirical information extracted from the spectra of OB stars about spin rates, mass loss rates and wind terminal velocities, photospheric abundances, binarity, and/or stellar variability associated with any type of pulsational-type phenomena is of ultimate importance to step forward in our understanding of the evolution and final fate of massive stars (e.g. [14, 20, 46,47,48,49,50,51,52,53,54]), as well as of the chemodynamical impact that these extreme stellar objects have on the surrounding interstellar medium at different scales.

2.3 Spectroscopy of Massive OB Stars

There are three main spectral windows which are commonly considered to extract spectroscopic information about massive OB stars:

  • (far-)UV: as provided by spectrographs on board the IUE, FUSE and HST space missions, covering some pieces of the 900–2200 Å spectral range;

  • optical: covering either the full range between 3800 and 9000 Å, or several key windows including the main set of diagnostic lines; and

  • (near-)IR: mainly covering the H-, K- and L- bands at ≈1.62–1.77, 2.07–2.2, and 3.7–4.1 μm, respectively.

Figure 2 depicts three pieces of a typical optical spectrum of a mid-O dwarf (HD 199579, black line) and an early-B supergiant (HD 2905, grey line). These stars have been selected to illustrate how the different characteristics of stars in the OB star domain affect their spectra. For example, while in both cases the hydrogen Balmer lines (including Hγ, Hβ, and Hα at λλ4341, 4860, and 6561 Å, respectively) are among the most prominent spectroscopic features, some particular characteristics of these diagnostic lines depend on the specific combination of surface gravity and effective temperature of the stars, as well as the existence of a more or less prominent stellar wind. For example, the larger the surface gravity for a given effective temperature, the more extended the wings of the Balmer lines; or, the stronger the wind density, the more remarkable the filling (in emission) of the Hα line. Also, while the presence of the He lines in absorption (including He iλλ4387, 4471, 4713 Å, and He iiλλ4541, 4686 Å) is the main identifier of an OB star, most of the He ii lines disappear in the B-type stars.

Fig. 2
figure 2

High quality spectra of two Galactic OB stars obtained with the HERMES spectrograph attached to the Mercator 1.2-m telescope in the Roque de los Muchachos observatory (La Palma, Spain). Black and grey lines correspond to the mid-O dwarf HD 199579 and the early-B supergiant HD 2905, respectively. The differences between both spectra rely on the different physical properties and chemical composition of the outermost layers of each of the two stars. Quantitative spectroscopy is a powerful tool which allows to extract this information by comparing an observed spectrum with a grid of synthetic spectra obtained by means of a stellar atmosphere code

The later has important consequences for the spectroscopic determination of effective temperatures, for which having access to lines from two consecutive ions is compulsory. In this sense, as will be further described in Sect. 3.4, while the ratio of line strengths (or equivalent widths) of He ii and He i lines has traditionally been considered as the main diagnostic to constrain the effective temperature of O4–O9.7 stars, other combination of diagnostic lines must be used in the B and early-O star domains,Footnote 6 where either the He ii or the He i lines, respectively, disappear (Fig. 3). This fact creates a natural separation between early-O, mid/late-O, early-B, and mid/late-B stars in terms of the specificities of the quantitative spectroscopic analysis techniques to be applied.

Fig. 3
figure 3

From top to bottom, illustrative examples of optical spectra of an early-O, a mid-O, an early-B and a late-B star. Some representative lines of H i, He i–ii, O ii, Si ii–iii–iv, Mg ii, N v and C ii are indicated in the corresponding spectrum where they are stronger

A similar situation occurs when dealing with lines of other elements beyond hydrogen and helium. Again, given the broad range in effective temperatures covered by OB stars, the number and strength of metal lines populating the optical spectra of, e.g. a mid-O dwarf, an early-B dwarf/supergiant, and a late-B supergiant varies a lot (see, again, Fig. 3). As a consequence, the potential estimation of surface abundances of the typical set of key elements that are normally considered in the study of OB stars (mainly He, C, N, O, Si, and Mg, but also Ne, S and Fe) must be based on lines from different ions depending on the effective temperature of the star under analysis.Footnote 7 Indeed, in O-type stars and mid/late B Supergiants, the number of metals with available diagnostic lines in the optical spectrum is much more limited than in the early-B star domain, hence hampering the determination of the corresponding abundances.

What about the other two spectral ranges? Despite the number of studies found in the literature performing quantitative spectroscopic analyses of OB stars in the optical range is much larger than those based on UV and/or IR spectra, the later contain important empirical information about the winds of these stars which is not directly accessible from the analysis of the optical spectrum (see below). In addition, they provide complementary information about effective temperatures, surface gravities, and abundances. Last, the quantitative spectroscopy in the (near)-IR range has been proposed as an important alternative to investigate the physical properties and chemical abundances in massive stars in highly obscured star forming regions (e.g. in the galactic center of the Milky Way), where the stars are much fainter in optical and UV wavelengths; hence, making more difficult to have access to high quality (mostly in terms of signal-to-noise ratio) spectra.

Next sections will be mainly devoted to the description of some of the tools and techniques presently used to perform quantitative spectroscopic analysis of OB stars based on their optical spectra. However, before entering into details, a few notes on these two other spectral ranges are worthwhile. The reader is also referred to the works performed by F. Najarro, M. Garcia, and T. Repolust (including a battery of papers and their PhD thesis), as well as [55,56,57,58], and [59], among others, for further details on quantitative spectroscopic analysis performed in the UV and IR.

Figure 4 provides a panchromatic view of the O9 Ia star HD 30614 (α Cam). The spectral windows depicted in Figs. 2 and 3 are now complemented with other portions of the spectrum of this star, including the UV range covered by the SWP spectrograph on board on the IUE satellite (top panel), the H, K and L bands in the IR (bottom panels), as well as two intermediate regions of the spectrum which have been elusively utilized for quantitative spectroscopy until recently.

Fig. 4
figure 4

Panchromatic view of the O9 Ia star HD 30614 (α Cam). The figure has been created combining observations obtained with different spectrographs attached to several ground based telescope facilities (optical and IR) and the IUE space mission (UV). Spectra kindly provided by F. Najarro and M. Garcia (Centro de Astrobiolgía, Madrid)

The Gaia RVS range (optical IV) has been included for completeness, and to illustrate how “boring” (and mostly useless) is this spectral range for the case of O- and early B-type stars.Footnote 8 This is not the case for the spectral window between 5400 and 5900 Å (optical II), in which it can be find very useful diagnostic lines for the study of O-type stars such as, e.g., He iiλ5411 Å, O iiiλ5591 Å, C iiiλ5696 Å, C ivλλ5801, 5811 Å, as well as one line that can be used as a powerful diagnostic to detect double line spectroscopic binaries: He iλ5875 Å line.

Regarding the UV and IR parts of the spectrum, I want to specially highlight the three P-Cygni profilesFootnote 9 found in the range ∼1200–1600 Å, as well as some of the hydrogen and helium lines located in the IR (e.g., Brγ, Pfγ, and Brα at 2.17, 3.74, and 4.05 μm, respectively; He iλλ1.70, 2.11, 3.70 μm; He iiλλ1,69, 2.19 μm). Most of these lines, as well as other few spectroscopic features present in other regions of the UV serve as key diagnostics to obtain information about the main physical properties of the stellar wind developed by some OB stars, such as the terminal velocity, the mass loss rate, the clumping factor and the presence of shocks in the wind (see, e.g., references quoted above). Indeed, these lines are much more sensitive to all these factors than the three main wind diagnostic lines found in the optical (i.e., Hα, He iλ5875 Å, and He iiλ4686 Å). As a consequence, any quantitative spectroscopic analysis of an OB star with an important stellar wind contribution should ideally consider the full UV+ optical-IR range.

3 Tools and Techniques Used for Quantitative Spectroscopy of Massive OB Stars

This section is aimed at providing the reader a basic guide to the various steps that are commonly followed to perform the quantitative spectroscopic analysis of different types of OB stars based on their optical spectra,Footnote 10 as well as to the main presently available tools and techniques. Some further reading on the subject can be found below, separated by different type of analysis:

I also recommend the reader to have a look to:

  • Chapter 1 in the book Oxygen in the Universe by Stasiǹska et al. [95],

as well as to the interesting reviews on:

  • Winds from hot stars by R.-P. Kudritzki and J. Puls [24],

  • Modeling the atmospheres of massive stars by J. Puls [96],

  • Parameters and winds of hot massive stars by R.-P. Kudritzki and M. A. Urbaneja [97]

  • Non-LTE Model Atom Construction by N. Przybilla [98],

  • UV, optical and near-IR diagnostics on massive stars by F. Martins [55], and

  • Highly accurate quantitative spectroscopy of massive stars in the Galaxy by M. F. Nieva and N. Przybilla [84].

3.1 Quantitative Spectroscopy of Massive OB Stars in a Nutshell

I have always considered that an efficient strategy to acquire new knowledge and skills about a given topic starts by having access to a quick, rough overview of the all the main points of the subject one wants to learn about. Then, once you have a more or less clear idea of where you want to go, you can come back—in sequential order and in more detail—to all those steps needed to fulfil your final objectives.

Let’s then apply this strategy to learn about quantitative spectroscopy of massive OB stars! I enumerate below the complete list of intermediate milestones one has to pursue to perform a complete quantitative spectroscopic analysis of an OB star:

  1. 1.

    Acquisition of the observed spectrum.

  2. 2.

    Pre-processing of the spectrum, including a first qualitative visual assessment, the continuum normalization and the radial velocity correction.

  3. 3.

    Determination of the line-broadening parameters. This is the basic step to have access to projected rotational velocities.

  4. 4.

    Identification of the stellar atmosphere code and atomic models best suited for the analysis of the star under study.

  5. 5.

    Creation of a grid of stellar atmosphere models, also including the corresponding synthetic spectra and equivalent widths for the main set of diagnostic lines needed for the specific analysis one wants to perform.

  6. 6.

    Identification of the analysis strategy best suited to extract information from the observed spectrum of the star under study (e.g., spectral synthesis, use of equivalent widths).

  7. 7.

    Determination of the main set of spectroscopic parameters accessible through the analysis of the observed piece of spectrum (e.g., basically the effective temperature and surface gravity, but also the microturbulence, the abundance of the diagnostic lines used to estimate the effective temperature, and the wind strength parameter). In this case we refer to stellar parameters determination.

  8. 8.

    Determination of surface abundances of interest (among those elements with available diagnostic lines in the observed spectrum). This task is also called chemical abundance analysis.

In addition to these eight points, a complete characterization of the main physical properties of the star requires another two steps which must incorporate some extra empirical information not directly accessible from the analysis of the optical spectrum, namely:

  1. 1.

    the absolute magnitude of the star, in order to obtain estimates for the stellar luminosity, radius and mass.

  2. 2.

    the terminal velocity of the stellar wind, in order to obtain the mass loss rate.

And now, let’s go back to the beginning and enter into more details.

3.2 Getting Ready!

We are entering in an era in which many of the new students (and a large fraction of the stellar community) will not have the necessity of preparing and undertaking any observing campaign to have access to all the spectroscopic observations required for their PhD studies. However, this does not mean that they should forget about learning (at least) some basic concepts of observational stellar spectroscopy.

Figures 2, 3, and 4 show illustrative examples of superb quality spectra (in terms of resolving power, S/N and wavelength coverage) of several types of OB stars. These are ideal spectra for a comprehensive and highly accurate quantitative spectroscopic analysis. However, in many situations it will not be possible to gather spectra with such a high quality and, hence, one will have to find a compromise between quality and number of stars with spectra good enough for the purposes of the study to be developed. For example, in some cases it can be more important to have access to high S/N spectra even sacrificing spectral resolution (e.g., when performing a chemical abundance analysis of extragalactic B Sgs; [89]), but in other situations is more critical to gather high-resolution data even if the S/N is somewhat poorer (e.g., when dealing with measurements of projected rotational velocities in O stars and B-Sgs, or when obtaining stellar parameters in O stars with spectra contaminated by nebular emission from the associated H ii region; [61, 62, 70]).

It is also important for the beginner to realize that, in many cases, the optical spectrum of an OB star may be contaminated with some other spectroscopic features which are not directly associated with the star itself (from narrow interstellar lines and diffuse interstellar bands to telluric lines from the Earth atmosphere and/or nebular emission lines). In addition, since in most cases the starting point of a quantitative analysis is a normalized spectrum, the normalization process may have introduced spurious effects on some of the diagnostic lines (e.g., in the global shape of the wings of the Balmer lines which, as indicated in Sect. 3.6, are the main diagnostics to constraint the surface gravity in OB stars). Last, specially if one wants to extract information about the radial velocity of the star—either from a single snap shot spectrum or a time series—it is important to check whether the spectrum has been corrected from heliocentric/barycentric velocity; and, if not, learn how to do it.

All these questions will definitely affect the scope, accuracy, and reliability of any type of quantitative spectroscopic analysis, as well as its outcome. So, my first two advises before going ahead are (1) do not forget to incorporate to your list of learnt skills the main technical concepts about observational spectroscopy, and (2) do not start the quantitative spectroscopic analysis before performing a qualitative (visual) assessment of the observed spectrum to understand what you have in your hands. These two initial steps certainly help to establish the best strategy to follow, as well as to avoid over-interpretations of the outcome of the analysis. For example, a double line spectroscopic binary cannot be analysed in the same way as an isolated star, or the results for a chemical abundance analysis of an early-B star may be erroneous if one does not realize that is dealing with a Be star with a circumstellar emitting disc.

3.3 Radial Velocity Correction

Even if the radial velocity of the star is not a piece of information required by the study one wants to develop, the observed spectrum must be corrected by Doppler shift to ensure that all diagnostic lines are located in the laboratory position. While this correction is not very critical in those parts of the analysis based on equivalent widths, it may have non-negligible consequences in the determination of spectroscopic parameters by means of any type of line-profile fitting technique. The later is specially critical when establishing the surface gravity in the case of O- and B-type stars, since this is based in the fitting of the wings of the hydrogen Balmer lines.

There are several standard techniques that can be applied to perform the radial velocity correction, including, e.g., identification of the core of one or several diagnostic lines, either visually or using a gaussian fit to the line profile, and/or cross-correlation with a template. The most important warning to take into account when dealing with OB stars, however, is that one must remember that some lines may be affected by stellar winds (e.g. He iλ5875 Å and He iiλ4686 Å; or even some metal lines in cases of stars with very strong winds), and hence the use of these lines may led to erroneous results. In addition, the usual techniques based in the identification of the core of the line may fail in those stars with a high projected rotational velocity or important asymmetries due to stellar oscillations.

3.4 Line-Broadening Parameters

One of the most straightforward and cheapest ways (from an observational point of view) to obtain information about stellar spins is based on the effect that rotation produces on the spectral lines: stellar rotation broadens the spectral lines. However, this is not the only line-broadening mechanism acting in O- and B-type stars. As reviewed by A. Herrero (2019) in Sect. 2.13 of the book Radiative transfer in stellar and planetary atmospheres, there are, at least, another five mechanisms to be taken into account in these hot, massive stars: the natural, thermal, collisional (mainly Stark, both linearFootnote 11 and quadraticFootnote 12), microturbulent, and macroturbulent (pulsational?) broadenings, respectively. Therefore, the first step of the quantitative spectroscopic analysis consists in inferring the projectedFootnote 13 component of the equatorial rotational velocity (v sin i) by disentangling the effect that rotation produces on the line-profile from any other comparable effect produced by the remaining broadening mechanism. And, as the reader can imagine, an important part of the process will be the selection of the best suited lines for the line broadening analysis, taking into account that the less affected the diagnostic line by the other (non-rotational) broadenings or by blends with other lines, the better. For example, it is always better to use a well isolated photospheric metal line than a hydrogen or helium line.

From a technical point of view, as in those other steps of the quantitative analysis process in which we are extracting information from the shape of the line-profile (vs. use of equivalent widths), the resolving power of the observed spectrum (as well as the number of points defining the line) is one important limiting factor of the accuracy we can reach in the determination of v sin i. For example, as a general rule of thumb, a spectral resolution R implies a rough minimum limit in a reliable determination of v sin i of c/R, where c is the speed of light in the same units as v sin i. On the other hand, when the Fourier transform method is used to estimate the projected rotational velocity, due to the Nyquist theorem, the spectral dispersion (Δλ, in Å/pix) of the stellar spectrum imposes a limit in the lowest v sin i that can be derived, roughly given by 1.320 c Δλ/λ (see [61]).

I refer the reader to [61, 62] and references therein for a thorough description of the various methods that have been routinely applied in the last 60 years for the determination of projected rotational velocities in OB stars, also including a discussion of the pros, cons and limitations of each method.

At present, the combined use of the Fourier transform (FT) and a goodness-of-fit (GOF) methods (Fig. 5) has become a standard strategy to disentangle the effect of rotation from the other main sources of broadening shaping the line-profiles of OB stars. In brief, and following Gray ([99]; see also the latest edition of the book, published in 2005), the Fourier transform method for the determination of v sin i is based on the intrinsic property of the rotational broadening function which develops zeroes in its Fourier transform. As firstly described by Carroll [100], the position of these zeroes in frequency space depends on the v sin i of the star, so that the frequency of the first zero (σ 1) is related to the rotational velocity through:

$$\displaystyle \begin{aligned} \frac{\lambda_0}{c}~v\,{\mathrm{sin}}i~\sigma_1\,=\,A \end{aligned} $$
(1)

where λ 0 is position in wavelength of the core of the line-profile, and A is a constant that depends on the limb-darkening coefficient.Footnote 14

Fig. 5
figure 5

Combined FT+GOF line-broadening analysis of the Si iiiλ4552 Å line in the early-B dwarf HD 37042 (bottom) and the early-B supergiant HD 91316 (top). [Left panels] The best fitting synthetic profile (solid gray) and the profile corresponding to v sin i(FT) and v mac = 0 (dashed gray) are over plotted to the observed profile (solid black). [Middle panels] Fourier transform of the observed profile. [Right panels] χ 2-2D-map resulting from the GOF analysis

Since the FT method only provides an estimate of v sin i, but its clear that this is not the only line-broadening agent even in the case of photospheric metal lines (see, e.g. the case of the early B-Sg HD 91316 in Fig. 5), it needs to be complemented with a goodness-of-fit method, in which a χ 2 fitting strategy if followed. In the later, an intrinsic profileFootnote 15—which can be a δ-function or a synthetic line resulting from a stellar atmosphere code—is convolved with a rotational and a macroturbulent profile, and both line-broadening parameters (v sin i and v mac) are obtained from the minimum value of the χ 2-2D-map resulting from this GOF analysis.

The combined FT+GOF method provides a powerful and straightforward strategy to have access to the projected rotational velocity of a given star. In an ideal case, both determinations of v sin i, as resulting from the FT and the GOF methods should be in agreement. However, this is not always the case, implying that the situation for this specific star is more complex than initially expected due to the presence on the line profile of effects originated by, e.g., some types of stellar oscillations or spots and/or chemical inhomogeneities in the stellar surface [101].

Overall, the FT method has been recently proven [61] to be a better suited strategy to obtain actual estimates of projected rotational velocities in the whole OB star domain than other previously considered methods [60, 102,103,104,105]. However, some limitations and caveats to be further investigated still remain (e.g., [62, 101, 106, 107]). This open new interesting lines of research for the new generation of massive star spectroscopists.

3.5 Stellar Atmosphere Codes

Stellar atmosphere codes are unavoidable tools when dealing with quantitative stellar spectroscopy. They are one of the major outcomes from an important, but complex research field which has led to a large number of texts in the literature.

Although I assume that the reader of this chapter has acquired basic knowledge on radiative transfer in stellar atmospheres as part of her/his university studies, I encourage any young student willing to devote his/her career to quantitative spectroscopy of massive OB stars to deepen further into the specificities of stellar atmosphere modeling of hot stars already in the early stages of her/his career. The most recent version of the book Theory of Stellar Atmospheres by D. Mihalas is a perfect starting point. I also recommend Chapter 4 of the book Radiative transfer in stellar and planetary atmopsheres, written by J. Puls, for a more in-depth description of the methods developed for the modeling of expanding atmospheres of early-type stars.

Before providing a brief overview of the main available stellar atmosphere codes for quantitative spectroscopy of OB stars, I quote below a few basic ideas allowing the non-expert in the field to easily understand the importance of model atmospheres for quantitative spectroscopy (see the sketch presented Fig. 6):

  • A stellar atmosphere is a thin layer in the surface of a star which does not have its own energy sources. Only redistribution of radiative energy takes place.

    Fig. 6
    figure 6

    Schematic representation of the main actors of quantitative stellar spectroscopy

  • A (one-dimensional, 1D) model atmosphere is a large table which describes the temperatures, pressures and many other properties of the gas as they vary with depth below the stellar surface.

  • A stellar atmosphere is the part of the star where the emergent spectral energy distribution (including the continuum and the line spectrum) is formed.

  • A spectrum synthesis code is a computational tool that allows the calculation of the stellar emergent (synthetic) spectrum from a given model atmosphere.

  • Quantitative stellar spectroscopy allows to extract information about the physical properties and chemical composition of a stellar atmosphere from the comparison of an observed spectrum and a grid of spectra computed with a spectrum synthesis code coupled to a stellar atmosphere code.Footnote 16

3.5.1 State-of-the-Art Stellar Atmosphere Codes for OB Stars

The last decades of the twentieth century witnessed an enormous progress in the development of adequate stellar atmosphere codes for hot massive stars. The great efforts devoted by a small group of experts in the field, based on the firm theoretical foundations on radiative transfer laid by e.g. V. V. Sobolev, D. Mihalas, L. H. Auer, L. B. Lucy, P. M. Solomon, J. I. Castor, D. G. Hummer, H. J. Lamers, J. P. Cassinelli (among others), have made it possible the massive star community to have access to a modern generation of stellar atmosphere codes which are allowing to perform reliable quantitative spectroscopic analyses of medium to large samples of O- and B-type stars in a reasonable amount of time.

This ambitious enterprise implied the inclusion of a realistic description of physical processes occurring in the outer layers of these extreme stellar objects such as, e.g., departure from the local thermodynamic equilibrium (non-LTE), line-blanketing and, in some cases, line-driven stellar winds. In particular, the later required the consideration of geometries departing from the simple plane-parallel approach, as well as the development of intricate computational techniques to deal with radiative transfer in (rapidly) expanding atmospheres (i.e. stellar winds).

At present, the stellar atmosphere codes most commonly used for the quantitative spectroscopic analysis of OB stars are:

While all of them are 1-D, non-LTE, line-blanketed codes, they differ in how they treat geometry (plane parallel/spherical), hydrostatic equilibrium/mass outflows, line blanketing/blocking, micro- and macro-clumping (vs. unclumped winds), as well as the considered strategy to solve the complex, interwined set of equations of radiative transfer, and how they deal with information about atomic data.Footnote 17 As a consequence, not all these codes are equally optimized to analyse different types of OB stars or specific windows of the stellar spectrum. For example, both tlusty and detail/surface calculate occupation numbers/spectra on top of hydrostatic, plane parallel atmospheres; hence, they are “only” suited for the analysis of stars with negligible winds. Also, despite cmfgen, fastwind, powr and wm-basic can, all of them, deal with spherically extended atmosphered with winds, the later (wm-basic) is mainly applicable to the analysis of the UV range. Last, due to the different approximation considered by these codes for the treatment o line blanketing/blocking, the amount of computational time required varies from one code to other, ranging from less than 1 h in the case of fastwind and detail/surface to several hours for cmfgen, powr, tlusty and wm- basic models.

Further notes on state-of-the-art approaches to model the atmospheres of hot, massive stars, as well as improvements occurred in this field in the last years can be found in [96] and [120], respectively. In particular, Table 1 in [96] provides a nice overview of the main characteristics and range of applicability of all the stellar atmosphere codes quoted above.

3.5.2 Grids of Models for Quantitative Spectroscopy of OB Stars

At this point, we are almost ready to proceed with the determination of those stellar parameters that can be directly obtained through the spectroscopic analysis (see Sect. 3.6). But, before, we need to spend a few time on the design and computation of a grid of stellar atmosphere models. Or, in same cases, we will be able to use directly any of the pre-computed grids which the developers (or their direct collaborators) have made publicly available. Some examples of the later can be found in the webpages of tlusty,Footnote 18cmfgen,Footnote 19 or powr.Footnote 20 However, these are not the only available grid of models; many others have not been done public, but could be available with permission of the owners. This is, e.g. the case of the vast grid of fastwind models covering the O star domain (for solar and half solar metallicity) computed at the Instituto de Astrofísica de Canarias and which is presently incorporated to the iacob grid based automatized tool (iacob-gbat, see [69, 70, 73]).

Regardless of using a pre-computed grid, or creating a new one, there are a few key points that must be carefully checked before performing the quantitative spectroscopic analysis:

  • The stellar atmosphere code used to compute the grid must consider all important physical processes occurring in the star under study (see Sect. 3.5.1). The same consideration must be taken into account for the other geometrical and dynamical aspects of the modeling.

  • All the key diagnostic lines must be properly included and treated in the computation of the associated synthetic spectra. Obviously, the wavelength coverage of the grid of synthetic spectra include the observed spectrum.

  • Those spectroscopic parameters that we want to determine must be considered as free parameters in the computed grid of models. If some of them are kept fixed in the modeling process or the creation of the grid, one must evaluate in detail the consequences it has for the specific quantitative spectroscopic analysis to be performed.

  • Always check carefully the various model atoms considered as input for the computations (specially in the case of those elements that will be included in the chemical abundance analysis, but also when for those elements/lines which are used to constrain the effective temperature).

  • The step size for the various free parameters considered in the grid of models must be appropriately suited for the accuracy we want to reach in the analysis process.

The best way to acquire the necessary skills and confidence to go through all these points is to learn from someone with previous expertise or from those papers explaining the adapted strategy depending on the stars under study. Some examples of the later are provided along the next sections.

3.6 Spectroscopic Parameters

From here onwards, things apparently become a bit more straightforward from a practical point of view. However, only expertise and a detailed and careful management of the techniques described below will allow to extract reliable information from the quantitative spectroscopic analysis to be performed.

Once the observed spectrum is ready to be analysed (Sects. 3.2 and 3.3), and the line-broadening parameters have been determined (Sect. 3.4), the next step is the determination of the so-called spectroscopic parameters using a suitable grid of stellar atmosphere models (Sect. 3.5.2). In the case of the analysis of optical spectra of OB stars, these basically include the effective temperature (T eff), the surface gravity (log g), and the wind-strength Q-parameter.Footnote 21 In addition, there are other secondary parameters—such as the helium abundance (Y He), the microturbulence (ξ t), the exponent of the wind velocity law (β), and the abundance of the element whose ionizing equilibrium is used to determine the effective temperature (e.g., silicon in the early-B type stars)—which need to be also determined at the same time during the analysis process.

While in the whole OB star domain the wings of the Balmer lines are the main diagnostic to estimate the surface gravity, the set of diagnostic lines that is used to constrain the effective temperature of the star depends on its spectral type. As indicated in Sect. 2.3 the He i and He ii lines have traditionally been considered for the analysis of mid and late O-type stars (e.g. [64, 66, 73]). The basics of this type of analysis is summarized in Fig. 7, where an illustrative set of H and He i–ii lines for the O9 V star HD 214680 (10 Lac) is depicted. In addition to the observed spectrum, two synthetic spectra computed with fastwind are overplotted. One of them is the best fitting model resulting from the iacob-gbat analysisFootnote 22 (see [73]); the second one represent a model in which the associated values for T eff, log g, and log Q have been shifted from the best fitting values to illustrate the effect on the various diagnostic lines. On the one hand, this figure serves to realize the quality of the fits our state-of-the-art models are reaching; on the other hand, it shows how the second model does not fit any of the lines since it has a too low gravity (wings of Hβ less extended than in the observed spectrum), a too high effective temperature (the He ii 4541 line in the model is too strong), and a too high value of the wind-strength Q-parameter (Hα is in emission in the model while it is not in the observed spectrum).

Fig. 7
figure 7

Solid blue line: Four representative H and He i–ii lines of the observed spectrum of the O9 V star HD 214680. Dashed and dashed-dotted lines: Two synthetic spectra computed with the fastwind stellar atmosphere code, corresponding to the best fitting model resulting from the iacob-gbat analysis (T eff =  35,000 K, log g=  3.9 dex, log Q=  −14.0) of the observed spectrum, and a model with T eff =  37,000 K, log g=  3.7, and log Q=  −12.5, respectively

The basics of the strategy followed for the determination of the spectroscopic parameters in O-type stars can be easily understood with the simple example above. However, it is important to note that the situation is a bit more complex since, actually, there is not an unique, separated dependence of the various diagnostic lines with the different parameters. For example, an increase in log g for a given T eff produces—in addition to a more pronounce Stark broadening of the Balmer lines due to the larger electron density in the photosphere—weaker He ii lines and stronger He i lines. The larger electron density favours the recombination of higher ions into lower ionization stages, hence increasing the relative population of lower ions with respect to the higher ones. Since the intensity of He i lines depend on the number He+ ions (these are recombination lines), a larger surface gravity produces stronger He i lines (and opposite for He ii lines). Eventually, this implies that a model with a larger T eff is required to recover the same ratios of He ii to He i lines when compared to a model with a lower surface gravity. In a similar way, a model with a larger value of log Q (needed, e.g., to fit a Hα line in emission) will require a larger value of log g (w.r.t. a model with a weaker wind) to fit the wings of the other Balmer lines. Therefore, in the final interpretation of the outcome of any type of quantitative spectroscopic analysis (not only in O-type stars, but also in the B star domain), it is important to remember that there exist important covariances between some of the spectroscopic parameters.

In early O-type stars (O2 and O3), the He i lines become too weak and the determination of the effective temperature is hence based on N iv–v lines (e.g. [74, 75]). Similarly, the He ii lines are absent in B-type stars, where Si iv–iii and/or Si ii–iii are utilized instead (e.g. [35, 46, 82, 122]). Figure 8 shows the behavior of the equivalent widths of several diagnostic lines of N and Si (in addition to He) which are commonly used to determine temperatures in OB stars. From inspection of this figure one can easily understand why different line ratios are needed depending on the specific range in T eff. Note, however, that I only represent the dependence of the equivalent width of the various lines with T eff, while some of these line may also present some dependences with other parameters. Note that, whenever possible (as is always the case in the spectral type range O2–B3), the ratio of equivalent widths of two ions from the same element should be the preferred diagnostic. In this way, we eliminate the dependence of the line ratio with the abundance of the considered element.

Fig. 8
figure 8

Top panels: Behaviour of the equivalent width of the He iλ4471 Å and He iiλ4541 Å lines with T eff in the early-B and O dwarf domain. As illustrated by the figures, the He i–ii ionization balance cannot be used below T eff ∼ 30 kK and above 47 kK. Bottom panels: Alternative diagnostic lines used to constraint T eff in early-B (Si ii–iv) and O stars (N iv–v), respectively. In this specific case, the figures depicts the behaviour with T eff of the following lines: Si iiλ4128 Å Si iiiλ4552 Å Si ivλ4116 Å N ivλ4058 Å and N vλ4603 Å. Note: the equivalent width of all considered lines have been obtained from a grid of fastwind models at solar metallicity computed by the author

I stop here due to space limitations of the chapter, but some further reading to deepen in this part of the quantitative spectroscopic analysis can be found in any of the references quoted along this subsection (see also Sect. 3). I also refer to [123] for an interesting discussion about why the spectroscopic approach to determine effective temperatures and surface gravities in early-B stars should be always preferred to the use of photometric indices, a common practice in the past, when we did not have the adequate tools to perform a proper quantitative spectroscopic analysis available.

3.7 Photospheric Abundances

There are two different approaches for the abundance analysis in stellar objects: the curve of growth method and the spectral synthesis method. The curve of growth method is based on the behaviour of the line strength with an increase in the chemical abundance, also incorporating the effect of microturbulence.Footnote 23 This method uses line equivalent widths, and hence does not require any knowledge of the exact rotational and macroturbulent broadening mechanisms affecting the line profiles.

Figure 9 provides a quick overview of the various steps followed in the oxygen abundance analysis of a narrow line early-B type star by means of the curve of growth method. I always recommend to any novice in the business to start by inspecting in detail what is summarized in the figure or, even better, perform the analysis of a similar star from scratch. The main reason is that the optical spectra of narrow line, early-B type stars include a lot of isolated O ii and Si iv–iii (or Si iii–ii lines). Hence, performing such an exercise allows the new spectroscopist to understand all the critical points which can affect the outcome of any abundance analysis using a well behave case, before jumping to less optimal cases in which, e.g., there is one or two available lines, or those critical cases cannot be easily identified given the adopted strategy.Footnote 24

Fig. 9
figure 9

Visual summary of the various steps comprising the oxygen abundance determination—via the curve of growth method—of the B1 V star HD 36591. Up to 40 O ii lines are available in the optical spectrum (mainly between 4000 and 5100 Å), but only 27 of them have been finally considered as reliable. See text for explanation, and more details about the observed spectrum considered and the analysis process in [82]

In the curve of growth method, once the stellar parameters have been established, a grid of stellar atmosphere models whereby the abundance for the studied element and the microturbulence are varied (the remaining parameters are kept fixed) is computed. In this way, the curves of growth for each line can be constructed by plotting the theoretical equivalent width for each value of ξ t as a function of abundance (see Fig. 9a). From the observed equivalent width and its error, an abundance (and its uncertainty) can be derived for each line and each value of ξ t. The individual line abundances are dependent on the microturbulence which affects more the strong lines than weak lines. Figure 9b shows the A(O) – logEW diagrams for two different values of ξ t. The value of ξ t that minimises the dependence of the line abundances on he line strength in the A(O) – logEW diagrams (i.e. produces a zero slope will be the adopted microturbulence). Figure 9c.1 and c.2 show the dependence of the slope of the A(O) vs. logEW relation and of A(O) on ξ t. In the last step, abundance values for each line as well as their uncertainties are calculated for the adopted microturbulence (Fig. 9d). The final abundance value is estimated through a weighted mean of the linear individual line abundance.

The curve of growth method, as described above, also allows a straightforward computation of the final uncertainty taking into account three different sources of errors: those associated with the line-to-line abundance dispersion, those derived from the error in the determined microturbulence and, finally, those referred to the uncertainties in the stellar parameters. In addition, diagrams as the one depicted in Fig. 9d can be used as a powerful diagnostic tool to check the reliability of the various lines available for the abundance determination.

The applicability of the curve of growth method is limited to those cases when the equivalent widths of individual lines can be measured. When the projected rotational velocity of the star is high (i.e. fast rotators), or when the spectral resolution is not good enough for resolving individual lines (e.g. in extragalactic studies beyond the Local Group), a different approach must be considered: the spectral synthesis method, one of the few techniques that can be applied when blending is severe. This method is based on the computation of a grid of synthetic spectra including all the observed lines, which is then directly compared to the observed spectrum to find the best fitting model. Basically, this method follows a very similar strategy as the one illustrated in Fig. 7, but including many other diagnostic lines for those elements under study. In contrast to the curve of growth method, this method requires a correct broadening of the line profiles and making sure that all the elements whose lines are present in the blending are included in the line formation calculation. In addition, the final results are more sensitive to other subtleties such as, e.g., a correct radial velocity correction of the observed spectrum.

As I said, my recommendation is to always start the learning process with a benchmark case as the one presented in Fig. 9. That way, the new spectroscopists will consolidate a strong critical sense to avoid misinterpretations of results in those cases in which the number of diagnostic lines is more limited or the quality of the observed spectrum is worse. For example, when there is only 1 or 2 lines available—as is, e.g., the case of nitrogen in O-type stars, or magnesium in B-type stars—the determination of the microturbulence is more critical and one will have to make a decision on the value to use.

Some illustrative examples of studies following different types of strategies for the chemical abundance analysis of OB stars can be found in the references quoted in Sect. 3 or in, e.g., [1, 35, 91, 124,125,126,127,128,129,130,131,132,133,134].

3.8 The Comparison Metric: From Visual Fitting to PCA and MCMC

We have seen in Sects. 3.6 and 3.7 that the process of determination of spectroscopic parameters and abundances via quantitative stellar spectroscopy basically consist of finding the synthetic spectrum computed with a stellar atmosphere code which result in the best possible fit to an observed spectrum.Footnote 25 The basic idea is simple, but two important questions quickly pop up as soon as one wants to provide results from the analysis:

  1. 1.

    What defines the best possible fit to the observed spectrum?

  2. 2.

    Is the solution unique, or we can reach a similarly acceptable solution with different combinations of stellar parameters and/or abundances?

I am sure that the reader is presently in a good position to assert with confidence that, given the multidimensionality of the parameter space considered during the modeling process, the existence of significant covariances between parametersFootnote 26 and taking into account some technical limitations related to the quality of the observed spectrum (in terms, e.g., of signal-to-noise ratio), the answer to the second question is “no, the solution is not unique”. Indeed, a proper identification of the range of acceptable parameters/abundances (i.e. definition of the associated uncertainties) is as important as the determination of the best fitting or central values.

Regarding the first question, the considered strategy to define the central values and the associated uncertainties has gained in complexity and robustness in the last decades. Not so long ago, given the computational limitations, most of the spectroscopic analyses were made based on small grids of stellar atmosphere models, and the determination of the final solution was a subjective by eye decision, sometimes supported by some more quantitative (but still simple) arguments (e.g., [64, 135]). However, the continuously increasing amount of high-quality spectroscopic observations of massive OB stars provided by different surveys during the first decade of the twenty-first century (e.g., [136,137,138,139,140,141]) made it clear the necessity to develop more objective, semi-automatized techniques which allow for the extraction of information about stellar parameters and abundances (and the associated uncertainties) from large spectroscopic datasets in a reasonable computational time.

Some notes on various of the techniques proposed to date can be found in [36, 46, 68, 69, 89], and [85]. Most of them are based on specific grids of pre-computed models and a χ 2 algorithm which allow to find the best fitting solution (or central values for each of the considered free parameters) and the associated uncertainties. However, the use of other strategies based on, e.g., projection and/or pattern recognition methods (in contrast to the minimum distance methods, as the χ 2 algorithms) are slowly but surely started to be explored. In addition, some works are already exploiting strategies based on the application of Genetic Algorithms (GA), principal component analysis (PCA), Gaussian process regression and Monte Carlo Markov Chains (MCMC) techniques. In particular, the later three are certainly envisaged as a promising way to minimize the computational time needed to create optimal grids of models, and to speed up the process of exploration of the multidimensional parameter space.