1 Introduction

Stellar spectra encode information of the composition and of the physical conditions present in the hosting star where radiation originates. Compared to other research fields in physics, astronomy is mostly a remote sensing science. Solar and stellar physics have developed through the study of radiation and polarization, attempting to infer the underlying physical state of the atmospheric plasma. While most stellar observations are spatially unresolved,Footnote 1 our proximity to the Sun provides a high-resolution insight into the outer layers of its atmosphere. The solar atmosphere poses a wonderful laboratory to study stellar atmospheres and the processes that are responsible for energy transport, and forward modeling and inversion have been particularly successful for understanding line formation and in the interpretation of spectropolarimetric and spectroscopic observations.

Forward modeling techniques usually involve magnetohydrodynamical simulations of a stellar atmosphere that may include waves, magnetic fields, flows and a number of dynamic events. Synthetic spectra from those model atmospheres can be qualitatively compared with observations to study plasmas or to understand how spectral lines react/form under different physical conditions. Recent developments in 3D MHD simulations have made calculations that simultaneously include a photosphere, a chromosphere and a corona possible, and these have been extensively used to study the elusive solar interface region.

Inversion techniques rely upon algorithms that systematically modify the parameters of a guessed atmospheric model, to minimize the difference between the emerging spectra from that model and the observations. Therefore, inversions can infer quantitative information from an observation, assuming that the proposed model and radiative transfer can realistically describe the conditions in the atmosphere. Inversions have been extensively used to analyze photospheric observations and, more recently, to study the chromosphere.

In this chapter we review the state-of-the-art of radiative diagnostics in solar physics. In Sect. 2 we introduce radiative transfer and response functions. In Sects. 3 and 4 we describe inversion techniques and the main spectral lines used in chromospheric studies. In Sect. 5, some recent inversion results are presented. Finally, future perspectives of radiative diagnostics are discussed in Sect. 6.

2 Radiative Transfer and Response Functions

In the field of stellar and solar physics, almost all knowledge that has been accumulated has been acquired through the analysis and interpretation of radiation, combined with the known laws of physics. The field is thus crucially dependent on the correct understanding of the information contained in the light that we receive.

The field of radiative transfer has a rich history, dating back to the 19th century, when the study of stellar and solar light led to the discovery of many new elements, some of which, such as Helium, were even discovered first on the Sun, before they were found also on Earth. Particularly the first half of the 20th century saw a revolution in our understanding of the structure of atoms and molecules, and the interaction of light with them, which layed the foundations for the inference of the composition and conditions of stellar atmospheres.

2.1 Radiative Transfer in Stellar Atmospheres

In stellar atmospheres, the structure of the atmosphere is dominated by the transport of the energy, generated in the core of the star, to the outside. In the part of the atmosphere that is visible to an observer, the conversion of thermal energy to radiation is thus of crucial importance for the vertical structure, and more importantly is, at least in part, determined by the radiation field itself. The radiation thus carries the only information we receive from any stellar atmosphere, and at the same time is an essential constituent of that same atmosphere.

For the correct interpretation of the light that we receive, it is thus necessary to self-consistently model the radiation field and the atmospheric structure, by solving the radiative transfer equation and the equations of statistical equilibrium, along with hydrostatic equilibrium.

The monochromatic radiative transfer equation (RTE) for a single ray of polarized light can be expressed as

$$ \mu \frac{d\boldsymbol{I}}{ds} = -\mathbf{K}\boldsymbol{I}+ \boldsymbol{j}, $$
(1)

where \(\boldsymbol{I}=(I,Q,U,V)^{T}\) is the Stokes parameter vector, \(\boldsymbol{j}=(j_{I},j_{Q},j_{U},j_{V})^{T}\) is the total emission vector, \(\mathbf{K}\) is the total absorption matrix, and \(\mu \) is the angle of the ray relative to the surface. There are seven independent terms in the absorption matrix: \(k_{I}\) is related to the line opacity; \(k_{Q}\), \(k_{U}\) and \(k_{V}\) describe the coupling of the intensity \(I\) with \(Q\), \(U\) and \(V\); and \(f_{Q}\), \(f_{U}\) and \(f_{V}\) are conversion terms between \(Q\), \(U\) and \(V\) due to magneto-optical effects (Landi Degl’Innocenti and Landolfi 2004):

$$ \mathbf{K} = k_{c} \begin{pmatrix} 1 \ & 0 \ & 0\ & 0 \ \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{pmatrix} + k_{l} \begin{pmatrix} k_{I} & k_{Q} & k_{U} & k_{V} \\ k_{Q} & k_{I} & f_{V} & -f_{U} \\ k_{U} & -f_{V} & k_{I} & f_{Q} \\ k_{V} & f_{U} & -f_{Q} & k_{I} \\ \end{pmatrix} , $$
(2)

where \(k_{c}\) is the background opacity and \(k_{l}\) is the line opacity. In general, the line opacity depends on the populations of the lower and upper level of the transition (\(n_{l}\) and \(n_{u}\)), the oscillator strength of the transition (\(f\)), the statistical weight of the atomic levels (\(g_{l}\) and \(g_{u}\)) and the Doppler width of the line (\(\Delta \nu_{D}\)),

$$ k_{l} = \frac{\pi e_{0}^{2}}{mc} \frac{n_{l} f}{\Delta \nu_{D}} \biggl(1 - \frac{n_{u} g_{l}}{n_{l} g_{u}} \biggr), $$

where the Doppler width of the line is given by

$$ \Delta \nu_{D} = \frac{\nu_{0}}{c}\sqrt{\frac{2TK_{B} }{M} + \mathrm{v}_{turb}^{2}}, $$
(3)

where \(K_{B}\) is the Boltzmann constant, \(T\) is the temperature, \(M\) is the atomic mass and \(\mathrm{v}_{turb}\) is the microturbulent Doppler broadening.

The terms involved in the RTE are normally derived from the physical parameters of the model atmosphere: temperature, macroscopic line-of-sight velocity, turbulent motions and the magnetic field vector. In practice, the parameters of the model atmosphere are usually known on a discrete grid of depth points along the ray. In most cases, the depth-stratification of \(\mathbf{K}\) and \(\boldsymbol{j}\) are not known analytically and the RTE must be integrated numerically assuming some boundary condition. Over the years, many methods have been developed to integrate the RTE to obtain the emerging full-Stokes intensity. In the early 70s, it was common to use a Runge-Kutta solver (Landi Degl’Innocenti 1976), but this type of solver is very inefficient and shows poor accuracy on coarse depth grids. The diagonal element lambda operator method (DELO, Rees et al. 1989) reformulates the RTE in terms of the source vector \((\boldsymbol{S} = \mathbf{j}/k_{I})^{T}\) by dividing all terms in Eq. (1) by the absorption coefficient \(k_{I}\). This change leaves all diagonal terms in \(\mathbf{K}\) equal to unity, which allows for the substitution

K ¯ = K η I 1,

where 1 is the \(4\times 4\) identity matrix. The RTE becomes:

$$ \mu \frac{d\boldsymbol{I}}{d \tau } = \boldsymbol{I} - \mathscr{S}, $$
(4)

with the monochromatic optical depth defined as \(d\tau = k_{I} ds\) and \(\mathscr{S} = \boldsymbol{S} - \bar{\mathbf{K}}\boldsymbol{I}\). On a discrete grid of depth points the solution is normally expressed as an integration starting at the upwind point, towards the next point in the direction of propagation (usually referred as the central point), which we denote with the sub-indexes \(u\) and 0 respectively:

$$ \boldsymbol{I}(\tau_{0}) = \boldsymbol{I}(\tau_{u}) \mathbf{O}(\delta \tau _{0})+ \int_{\tau_{u}}^{\tau_{0}} \mathbf{O}(t)\mathscr{S}(t)dt. $$

\(\mathbf{O}\) is the evolution operator, a \(4\times 4\) real matrix that applied to the Stokes vector at point \(u\) yields the Stokes vector at point 0. The evolution operator can have a complicated analytical form, but assuming that the absorption matrix is constant between two consecutive grid points and equal to the value in the middle of the interval, the evolution operator can be expressed in terms of exponential terms.

$$ \boldsymbol{I}(\tau_{0}) = \boldsymbol{I}(\tau_{u}) e^{-\delta \tau_{0}} + \int_{\tau_{u}}^{\tau_{0}} e^{-(t-\tau_{u})}\mathscr{S}(t)dt. $$
(5)

An underlying assumption of the DELO method is that the diagonal terms of \(\mathbf{{K}}\) are much smaller than the non-diagonal terms that are included in the effective source vector \(\mathscr{S}\). This way of writing the transfer equation has allowed us to use the same evolution operator as in the unpolarized case, but we have conveniently hidden some dirt under the effective source vector. Strictly speaking the evolution operator is exact only when the non-diagonal terms of \(\mathbf{{K}}\) are zero, but this approximation seems to hold rather well when compared against other methods for solving the PRT equation.

Equation (5) can be integrated analytically if the equivalent source vector is assumed to have a given dependence with depth within the interval \((\tau_{u}, \tau_{0})\). The solution can be written as a function of the ensuing intensity and the upwind, center and (sometimes) downwind values of the modified source function. Rees et al. (1989) assumed a linear dependence giving rise to the DELO-Linear solution. Trujillo Bueno (2003) showed that the linear approximation used in the DELO-Linear yields a poor absolute error in the computation of the atomic populations and developed the DELO-Parabolic method by splitting the equivalent source vector in the integral term of Eq. (5) and assuming a parabolic dependence for \(\boldsymbol{S}\) and linear dependence for \(\bar{\mathbf{K}}\boldsymbol{I}\). A problem of the parabolic dependence is that parabolae can easily overshoot if the monochromatic depth scale is not equidistant. Therefore, de la Cruz Rodríguez and Piskunov (2013) introduced two integration strategies based on non-overshooting Bezier splines that solve the issues of DELO-parabolic while keeping quadratic and cubic accuracy, usually referred as DELO-Bezier. The DELO solvers can be computed with relatively low computational cost and usually provide good accuracy in most situations, making them especially valuable so compute non-LTE problems and inversions where the RTE must be solved accurately many times. An alternative Hermitian method proposed by Bellot Rubio et al. (1998) has also been extensively used in solar inversion codes.

A different approach to solve the PRT equation has been proposed by Steiner et al. (2016). Instead of searching for a smooth interpolant, they allow for a discontinuous solution at the boundary of each grid cell in the atmosphere. Within each cell, the source function is allowed to change linearly and the PRT equation is integrated using the Milne-Eddington solution. This approach shows very promising results, and is especially accurate when coarse grids are used to describe the model atmosphere, a property that is especially relevant for inversion methods. However, the convergence stability of this approach when used to solve the statistical equilibrium equations with approximate lambda operators remains to be explored.

2.2 Coupling Between Atmospheric and Radiative Quantities

We now consider the dependencies of the RTE on the parameters of the model atmosphere. Assuming a known set of physical quantities, such as temperature, line of sight velocity, turbulent velocities, the three components of the magnetic field vector, and a depth scale, it is possible to compute the radiative properties that appear in Eq. (4). For reasons of simplicity, we first consider here the case of non-polarized radiation, in which case the radiative transfer equation can be written as:

$$ \mu \frac{dI_{\mu \nu }}{ds} = \eta_{\mu \nu } - \chi_{\mu \nu } I _{\mu \nu }, $$
(6)

where \(\eta_{\mu \nu }\) and \(\chi_{\mu \nu }\) are the total emissivity and opacity, including continuum and line contributions. Eq. (6) can be re-written using the source function \(S_{\mu \nu } = \eta_{\mu \nu } / \chi_{\mu \nu }\) as

$$ \mu \frac{dI_{\mu \nu }}{-\chi_{\mu \nu } ds} = I_{\mu \nu } - S_{ \mu \nu } \Rightarrow \mu \frac{dI_{\mu \nu }}{d\tau_{\mu \nu }} = I _{\mu \nu } - S_{\mu \nu }, $$

where \(d\tau_{\mu \nu } = -\chi_{\mu \nu } ds\) is the optical depth along the ray.

The line emissivity (\(\eta_{\nu }\)) and opacity (\(\chi_{\nu }\)) characterize the line radiative properties as a function of the atomic level populations \(n\) and the Einstein coefficients (\(B_{ll'}\), \(B_{l'l}\) and \(A_{ll'}\)). In the unpolarized case and assuming complete redistribution (CRD) of scattered photons, the expressions are simplified to the following when the energy of level \(l'\) is smaller than that of level \(l\) (\(l\succ l'\), using the same notation as Rybicki and Hummer 1991):

$$\begin{gathered} \eta_{ll'}(\mu ,\nu ) = \frac{h\nu }{4\pi }n_{u} A_{ll'} \varphi ( \mu , \nu ), \end{gathered}$$
(7)
$$\begin{gathered} \chi_{ll'}(\mu ,\nu ) = \frac{h\nu }{4\pi } (n_{l} B_{l'l} - n_{u} B _{ll'}) \varphi (\mu , \nu ), \end{gathered}$$
(8)

where \(\varphi \) is the profile, which we have imposed to be the same when a photon is absorbed or emitted (CRD). The total emissivity and opacity can be expressed as the sum of all contributions:

$$\begin{gathered} \eta_{\mu \nu } = \sum_{l \succ l'} \eta_{ll'}(\mu ,\nu ) + \eta_{c}( \nu ), \\ \chi_{\mu \nu } = \sum_{l \succ l'} \chi_{ll'}(\mu ,\nu ) + \chi_{c}( \nu ), \end{gathered}$$

where \(\eta_{c}(\nu )\) and \(\chi_{c}(\nu )\) are the continuum contribution to the total emissivity and opacity. For time-independent equilibrium situations, the populations of the atomic levels \(n\) can be obtained by solving the statistical equilibrium equations:

$$ \sum_{l'\prec l} \bigl[ n_{l} A_{ll'} - (n_{l'} B_{l'l} - n_{l} B_{ll'}) \bar{J} \bigr] - \sum_{l' \succ l} \bigl[n_{l'} A_{l'l} - (n_{l} B _{ll'} - n_{l'} B_{l'l}) \bar{J} \bigr]= - \sum_{l'} (n_{l} C_{ll'} + n_{l'}C_{l'l}), $$
(9)

where \(C_{ll'}\) is the collisional rate between level \(l\) and \(l'\), which is generally a function of temperature and density only, and \(\hat{J}\) is the integrated mean intensity (CRD) given by

$$ \bar{J} = \frac{1}{4\pi } \int d\varOmega \int d\nu \varphi (\mu ,\nu ) I _{\mu ,\nu }, $$

which depends on temperature, density and LOS velocity, as well as any microturbulent velocity.

In the unpolarized case then, the dependence of all elements in Eq. (9) on the atmospheric quantities in most cases not especially complicated. However, calculating the radiative quantities \(\alpha \) and \(\eta \) for a given atmosphere is by no means a straightforward task. The principal difficulty in solving (9) is that we need to know the atomic level populations to calculate the intensities using Eq. (7) and (8), but the atomic populations depend on the intensity through \(\bar{J}\). Therefore, the problem is not only non-local, it also highly non-linear and must therefore be solved iteratively, using an appropriate approximation to describe the dependence of \(\bar{J}\) on the atomic level populations, as pioneered by Cannon (1973), Scharmer (1981), Olson and Kunasz (1987) and Rybicki and Hummer (1991) among others. For every set of temperature, density and velocity, however, a solution can be calculated.

In the general polarized case, Eq. (9) contains the population densities of all substates of every energy level, which increases both the size and the difficulty of calculating the coefficients of the linear system to solve significantly. More specifically, the energy of the various sub-states within each energy level is now dependent on the magnetic field strength and direction. Although this is what makes it possible to quantify the magnetic field strength and direction in the solar atmosphere, the associated computational cost is significant. Many synthesis codes therefore resort to the use of the polarization-free approximation, that first solves for the populations using the unpolarized approximation, and distributes the populations of the unpolarized levels across the sub-levels according to their statistical weight, thus allowing for a single full-Stokes solution to be computed (Trujillo Bueno and Landi Degl’Innocenti 1996).

Although the polarization-free approximation offers a great simplification, in many cases the density is sufficiently high that the collisional rates dominate Eq. (9), and the solution can be accurately described by the approximation of LTE. Under these conditions, the source function is directly given by the Planck function, and in practice we only need to compute explicitly the terms in the absorption matrix. Assuming that only the Zeeman effect is at work hereafter, the terms of the absorption matrix in Eq. (2) are given by the following expressions (Landi Degl’Innocenti and Landolfi 2004):

$$\begin{aligned} k_{I} =& \frac{1}{2} \biggl[ h_{p} \sin^{2} \theta + \frac{h_{b} + h _{r}}{2}\bigl(1+\cos^{2}\theta \bigr) \biggr], \\ k_{Q} =& \frac{1}{2} \biggl[h_{p} - \frac{h_{b} + h_{r}}{2} \biggr] \sin ^{2}\theta \cos 2\chi, \\ k_{U} =& \frac{1}{2} \biggl[h_{p} - \frac{h_{b} + h_{r}}{2} \biggr]\sin ^{2}\theta \sin 2\chi, \\ k_{V} =& \frac{1}{2} [h_{r} - h_{b} ]\cos \theta, \\ f_{Q} =& \frac{1}{2} \biggl[g_{p} - \frac{g_{b} + g_{r}}{2} \biggr] \sin ^{2}\theta \cos 2\chi, \\ f_{U} =& \frac{1}{2} \biggl[g_{p} - \frac{g_{b} + g_{r}}{2} \biggr] \sin ^{2}\theta \sin 2\chi, \\ f_{V} =& \frac{1}{2} [g_{r} - g_{b} ] \cos \theta, \end{aligned}$$

where \(\theta \) and \(\chi \) are the inclination and the azimuth of the magnetic field vector and the \(h\) and \(g\) components are computed from the Voigt-Faraday functions including the effect of Doppler motions and the Zeeman splitting. The latter is normally characterized by a wavelength shift of the polarized components and their relative strength.

The wavelength shift of the Zeeman components (\(\Delta \lambda_{B}\)) can be expressed in terms of the quantum state \(M\) according to the selection rules:

$$ \Delta M = M_{u} - M_{l} = \ \textstyle\begin{cases} +1 \equiv b ,\\ 0 \equiv p, \\ -1 \equiv r. \end{cases} $$

The computation of the profiles is directly given by the following expressions (for \(q=b,p,r\)):

$$\begin{aligned} h_{q} =& \sum_{M_{l} M_{u}} S_{q}^{J_{l}J_{u}} \frac{1}{\Delta \nu_{D} \sqrt{ \pi }} H\bigl(a, v-v_{a} + v_{B}(g_{u}M_{u} - g_{l}M_{l})\bigr), \\ f_{q} =& \sum_{M_{l} M_{u}} S_{q}^{J_{l}J_{u}} \frac{1}{\Delta \nu_{D} \sqrt{ \pi }} L\bigl(a, v-v_{a} + v_{B}(g_{u}M_{u} - g_{l}M_{l})\bigr), \end{aligned}$$

where \(S_{q}\) is the strength of the Zeeman component, \(H\) and \(L\) are the absorption and dispersion profiles respectively, \(a\) is the damping and \(v\), \(v_{a}\) and \(v_{B}\) are the frequency, Doppler velocity (\(V_{l.o.s.}\)) and Zeeman splitting respectively expressed in Doppler width units,

$$ v = \frac{\nu_{0} - \nu }{\Delta \nu_{D}}, \qquad v_{a} = \frac{\nu_{0} V_{l.o.s}}{c\Delta \nu_{D}}, \qquad v_{B} = \frac{e_{0}}{4\pi m_{e} c}\frac{B}{\Delta \nu_{D}}, \qquad a = \frac{\varGamma_{stark} + \varGamma_{vdW} + \varGamma_{rad}}{\Delta \nu _{D}}. $$
(10)

We have chosen to work with frequencies instead of wavelength, but \(v_{B}\) can also be expressed in terms of the central wavelength of the line \(\lambda_{0}\) (Eq. 11). This form of \(v_{B}\) explicitly shows that the Zeeman splitting scales quadratically with \(\lambda \) and linearly with \(B\) (with \(\Delta \lambda_{D}\) the Doppler width in units of wavelength),

$$ v_{B} = \frac{e_{0}}{4 \pi m_{e} c }\frac{ B \lambda_{0}^{2}}{\Delta \lambda_{D}}. $$
(11)

The damping parameters originate from collisions with charged particles (\(\varGamma_{stark}\)), collisions with neutral particles (\(\varGamma_{vdW}\)) and from the finite lifetime of atomic levels (\(\varGamma_{rad}\)). These parameters have traditionally been computed theoretically or measured and they are typically considered part of the input atomic data that can be retrieved from an atomic database like VALD (Piskunov et al. 1995; Barklem et al. 1998). The damping parameters are typically functions of the electron density, the hydrogen and helium densities and the temperature.

Finally, the strength of the Zeeman components can be computed in general using \(3-j\) symbols (\(S_{q}^{J_{l} J_{u}}\)), but in the case of the Zeeman effect they are given in Table 1 as a function of the \(J\) and \(M\) quantum numbers of the sub-levels of the transition.

Table 1 Strength of the Zeeman components as a function of the quantum numbers \(J\) and \(M\). For clarity, we note that \(\Delta M = M _{u} - M_{l}\). Source: Landi Degl’Innocenti and Landolfi (2004), Table 3.1

Although the above outline is far from complete, it is possible to conclude that there is a limited number of atmospheric quantities that control the radiative properties of the solar atmosphere. While some of the dependencies on these quantities can be approximated in a fairly simple way, others enter the expressions in many different places, some of them both directly and indirectly. Perhaps the most convoluted dependency is that on the temperature, which appears in the expressions for the Doppler width, the line opacity, the source function and usually the damping constants. The densities and the ionization balance mostly influence the damping and the line opacity. The line of sight velocities and the magnetic field influence the absorption matrix, which encodes the Doppler shifts and Zeeman splitting at each depth of the atmospheric model. In Sect. 2.3 we formalize and illustrate these dependencies using so-called response functions.

2.3 Response Functions

In order to change a given atmosphere in such a way that the emerging spectrum matches an observed spectrum, information on how the spectrum changes when the atmosphere is perturbed must be obtained. Unfortunately, since the radiation influences the state of the atmosphere in a non-local and non-linear way, the response of the spectrum to the atmospheric perturbation is also not linear, so that a perfect correction generally cannot be produced at once. In most cases the response, although not linear, will reduce the difference, so that an iterative approach can be used.

The response of the spectrum to an atmospheric perturbation can be calculated numerically using finite differences, by simply calculating the spectrum, perturbing the atmosphere and calculating the spectrum again. The difference is then divided by the perturbation, yielding the desired response function. Alternatively, a centered derivative (in the nominal value of the parameter) is likely to be more accurate but it will be twice as slow:

$$ R_{\lambda }(x,\tau_{k}) \approx \underbrace{\frac{S_{\lambda }(x+ \delta x, \tau_{k}) - S_{\lambda }(x-\delta x, \tau_{k}) }{2\delta x \Delta \tau_{k}}}_{\mathrm{centered}} \approx \underbrace{\frac{S_{ \lambda }(x+\delta x, \tau_{k}) - S_{\lambda }(x, \tau_{k}) }{\delta x \Delta \tau_{k}}}_{\mathrm{non-centered}}, $$
(12)

where \(R_{\lambda }\) is the monochromatic response function to perturbations to a parameter \(x\) and \(S_{\lambda }\) is the monochromatic emerging Stokes vector. Response functions for polarized light were proposed by Landi Degl’Innocenti and Landi Degl’Innocenti (1977), who derived an analytical expression by perturbing the RTE. However, those early studies did not couple directly the response of the spectra to changes in typical parameters of model atmospheres like, e.g., temperature or density but rather to perturbations of the parameters of the RTE. For depth-stratified atmospheres, analytical response functions have been derived in the LTE case (Ruiz Cobo and del Toro Iniesta 1992), but it is not trivial to write them as the response of all parameters must be also be propagated through all the calculations involved in the computation of the terms of the RTE and into the equation of state of the gas. Analytical response function in Milne-Eddington codes are also commonly used and somewhat less convoluted to derive (e.g., Orozco Suárez and Del Toro Iniesta 2007). The advantage of analytical response functions is that they are usually more precise and much more efficient to compute than the finite differences approach, as the overhead compared to synthesizing a single profile is small.

Figure 1 illustrates the numerical response functions of the Fe i \(\lambda 6301.5\) and \(\lambda 6302.5\) lines to temperature, line of sight velocity, turbulent broadening, magnetic field strength, inclination and azimuth along the optical depth scale of the FAL-C model atmosphere, including a constant magnetic field strength of 500 G inclined at \(45~\mbox{deg} \) with and azimuth of \(20~\mbox{deg} \). It is beyond the scope of this review to analyze in detail each of the panels, since response functions are model dependent, but we note some basic properties that can be illustrated using these panels:

  • Spectral lines sample a range of optical depths, in this case increasing in height from the continuum towards line center.

  • Of the 6 considered parameters, only the temperature influences the continuum.

  • The coupling effect of magneto-optical terms in the absorption matrix is clearly visible for example in the response of all Stokes parameters to changes in the azimuth ((Landi Degl’Innocenti 1979)).

  • In most parameters the shape of the response function in Stokes \(Q\), \(U\) and \(V\) can appear to be quite convoluted as an effect of the shape of the profiles.

Fig. 1
figure 1

Numerical response functions of Stokes \(I\), \(Q\), \(U\) and \(V\) (from left to right) to the temperature, line of sight velocity, turbulent motions, magnetic field strength, magnetic field inclination (\(\gamma \)) and magnetic field azimuth (\(\chi \)) from top to bottom. The calculations have been performed in LTE using the FAL-C atmosphere with an ad-hoc magnetic field vector of 500 G

3 Inversion Methods for Solar Observations

Unlike what is suggested by the name, most inversion codes do not provide an inverse mapping from the spectra to an atmosphere, but instead infer the atmosphere from the data in a semi-automated way. Since the mapping from atmosphere to spectrum is not reversible in general, simplifying assumptions generally need to be made to ensure the solution remains physically plausible. These assumptions have a significant impact on the reliability of the result, in a way that is not evident from either the precision with which the data are reproduced, nor from the physical plausibility of the inverted result.

The restrictions imposed are often ad-hoc, because the amount of constrainable information in the spectrum is generally difficult to estimate, but sometimes some a-priori restrictions can be applied, based on physical arguments, that can add stability, allowing for less restrictive assumptions to be made elsewhere.

The basic ingredients of any inversion code are the ability to generate a synthetic spectrum through a forward calculation on an atmospheric model, knowledge of the important instrumental effects involved in mapping the synthetic spectrum to the observed data, and an automated minimization engine, which can be based on a number of techniques.

3.1 Atmospheric Model

Most inversion codes are fundamentally based on a physical formation model of a varying degree of complexity. There are two main areas in which the model can vary in complexity: the atmospheric structure and the physics assumed to be involved in generating the emerging spectrum.

3.1.1 Model Atmospheres

The sophistication of the atmosphere that can be fitted to an observation depends to a large extent on the number and type of spectral lines that it is required to reproduce the profile of. Where a single spectral line contains already a large amount of information about the atmosphere in which it originated, the exact shape of several different line profiles can significantly restrict the possibilities.

For the inversion of a single spectral line, a commonly made choice is that of a Milne-Eddington (ME) atmosphere (Harvey et al. 1972; Auer et al. 1977), which is characterized by a constant opacity, linear source function, and a host of arbitrary fit parameters that are needed to fit the profile, but do not really correspond to useful physical information. The solution can be integrated analytically, however, leading to a very efficient calculation of the line profile, which allows for a fast inversion. This type of atmosphere is able to reproduce simple spectral line profiles. Many codes exist, that are based on this type of atmosphere (e.g. HELIX, Lagg et al. 2004; MERLIN, Skumanich and Lites 1987; HMI VFISV, Borrero et al. 2011, to name just a few), each of them using different minimization strategies to find the best fit to the observed spectrum (see comparison by Borrero et al. 2014).

In those cases where more sophistication is needed to fit the observed spectra, either due to their large formation range, or due to their specific sensitivity to gradients in some physical quantity, a fully stratified, physical model of the atmosphere must be used. The advantage of this approach is that the fitted atmosphere has a firm physical basis, and can thus be used to study the magneto-hydrodynamic structure underlying an observation (Ruiz Cobo and del Toro Iniesta 1992).

A number of codes exists that allows for a height dependent stratification (SIR, Ruiz Cobo and del Toro Iniesta 1992; SPINOR, Frutiger et al. 2000; NICOLE, Socas-Navarro et al. 1998, etc.), all of which make use of a gradient search based optimization method, using response functions or finite differencing to calculate the gradient. However, for all of them it is crucial that the level of stratification that is required to produce the spectrum is met, but not exceeded, or the inversion problem is no longer well posed. This last problem in particular gives rise to a level of arbitrariness that is very difficult to quantify.

More recently, a new generation of methods has begun development that tries to reduce some of the degrees of freedom of the inversions, by introducing additional constraints on the solution, that are either inspired by physics, or by other arguments. One of these is the sparse inversion code (Asensio Ramos and de la Cruz Rodríguez 2015), that requires the solution to be sparse, a quality that is inferred from the sparseness of the data (see Fig. 2). This method is able to condense the information from many pixels in a reduced number of fit parameters, yielding a large reduction in the work needed to invert the data, and better constrained results.

Fig. 2
figure 2

Compressibility of solar data from the inversion of a Hinode/SOT observation. Top: Inferred magnetic field from a sparse inversion assuming a sparsity level of 50 % (left). The other maps have then been compressed assuming [25 %, 12.5 %, 6.25 %] sparsity. Bottom: The emerging intensity in the wing of the Fe i \(\lambda 6302\) line, computed from the sparse models above

3.1.2 Physics

The physics that is assumed to be of importance in the formation of the observed spectral lines can vary enormously, depending on the nature of the transition of interest, the spectral resolution, the signal to noise and the atmospheric heights of interest. Many inversion codes make specific assumptions about the atmosphere, but also about the physics believed to be important for the spectral line that was of primary interest to the author of the code at the time it was written. Here, we give a brief overview of the most important physical effects in which most of the major codes differ.

LTE/NLTE::

The most commonly employed assumptions are those of Local Thermodynamic Equilibrium (LTE) and plane-parallellity (1D). Both of these are never strictly applicable, since the mere observability of the radiation field implies the escape of energy and thus by definition non-local equilibrium conditions, and no object in the known universe is infinitely large and flat. Nonetheless, both approximations appear to be remarkably accurate in many cases of interest, and continue to enjoy popularity in the inversion community in particular, owing to the huge simplifications that can be made by using them.

The formation of many photospheric lines is well described using LTE, in which case the dimensionality of the problem can be disregarded altogether, and the spectrum can be directly and efficiently calculated for each image pixel from the magneto-hydrodynamic structure. For lines forming higher up in the solar atmosphere, however, this approximation often does not hold, and the assumption of LTE must be abandoned. Normally, this happens when collisional rates are very low and radiation is weakly coupled to the local physical conditions (e.g., in the chromosphere), invalidating the convenient assumption of Local Thermodynamical Equilibrium, that is commonly used in the photosphere. This is particularly important for lines in which the scattering of radiation plays an important role, but comes at a hugely increased computational cost. Such costs must often be compensated for by simplifying the atmospheric model drastically, so that the overall sophistication of the formation model may not actually increase by much.

Geometry/Dimensionality::

Once the assumption of LTE is abandoned, the dimensionality of the atmosphere comes into play, since the non-locality of the radiation field manifests itself in the vertical, as well as in the horizontal dimensions. Although several forward solvers exist that can calculate the emergent spectrum in full 3D (e.g. RH, Uitenbroek 2001; MULTI3D, Leenaarts and Carlsson 2009), no inversion code currently exists that can invert a dataset using full 3D radiative transfer, largely due to the huge computational effort this would require.

Hanle vs. Zeeman effect::

The calculation of the imprint that the magnetic field leaves in the emergent radiation, in the form of polarization, can depend on many details in the atomic physics, that influence the formation of the line profiles. Two different effects exist that can be used to extract the strength and orientation of the magnetic field in the line forming region: the Zeeman effect and the Hanle effect. While the Zeeman effect is the most widely used, owing to its simplicity and relatively high signal level, the Hanle effect can have a much higher sensitivity to weak magnetic fields, and it is an important tool for the characterization of magnetic fields in the low-density chromosphere.

The Zeeman effect (Zeeman 1897) has been known for over a century and the theoretical description of it is relatively straightforward. Interpretation of Zeeman induced polarization has therefore been the cornerstone of photospheric inversions for many decades, in particular for the inversion of more complex, height-dependent atmospheres. However, its sensitivity to the magnetic field has intrinsic limitations: in regions where the field strength is very weak and collisional rates are low, scattering polarization can dominate over Zeeman induced polarization.

The use of the Hanle effect (Hanle 1924), is much less widespread, largely due to the complex physics and the large uncertainties in some of the physical quantities that are important for the interpretation, but it is able to return information on much weaker magnetic fields, especially in very low density regions. This effect has been the workhorse for measurements of the very weak magnetic field in chromospheric structures, such as loops and filaments.

Molecules::

While most inversions are based on the interpretation of a single atomic transition, clearly the use of a larger number of transitions, where both effects are present, would constitute a much better constrained problem. Especially in cool regions, such as sunspot umbrae, the presence of molecular lines provides an opportunity to make use of very different line transition properties to constrain the atmospheric parameters. Significant progress has been made in that direction by a number of groups (Berdyugina et al. 2000; Asensio Ramos et al. 2005), but the complexity of the physics and the numerical cost have thus far remained substantial and few good inversions with molecules currently exist.

While this list is not intended to be exhaustive, it covers the most important differences in the physics between codes.

3.2 Data Formation

There are many ways in which an instrument can modify the true spectra while converting them to digital form. Any of them, when neglected, can alter the fitted atmospheric properties in various ways, which must be considered when interpreting the result.

3.2.1 Spectral Degradation

Traditionally, the formation of the observed data from a synthetic, undegraded spectrum, has involved mainly consideration of the spectral response of the instrument used to record the data. This is a simple effect to take into account, since it involves only the convolution of the synthetic spectra with the instrumental spectral response function, after which a direct comparison with the observed data can be made.

The spectral resolution of the observation is one of the most important factors in the ability of an inversion code to recover information from the spectral line, and determines to a large extent how complicated an atmosphere can be recovered from the data. There is such a direct link between the complexity of the atmosphere and the spectral resolution, that several instruments were designed and built, with the specific intent to produce data suitable for ME inversion codes, that have specifically optimized their spectral resolution to achieve the best result. Figure 3 is an example of a study of this effect for the Solar Orbiter PHI instrument, and is the result of the inversion of sythesized observations. The error in the recovered inversion results decreases with increasing spectral resolution for almost all inverted quantities, but then increases again below a critical value, where aliasing of high-frequency spectral information starts to occur. This result suggests that since a ME inversion needs only 5 points to be adequately constrained, and the result is most accurate when the degraded spectrum is critically sampled, there is a maximum spectral resolution, beyond which the accuracy is not increased. Obviously, better wavelength coverage and spectral resolution are usually desired, as long as the observations are sampled accordingly. This example is particularly relevant for observations acquired with Fabry-Perot interferometers and Lyot filters, where wavelength coverage can be sacrificed in favor of temporal cadence for a given integration time.

Fig. 3
figure 3

Effect of spectral resolution in the accuracy of a Milne-Eddington inversion, using 5 spectral points. Courtesy: A. Lagg

If a height dependent atmosphere is desired, however, the spectral resolution needs to be sufficiently high to obtain a reliable result. An illustration of this effect is given in Fig. 4, where the sythesized line profiles of the photospheric FeI lines at 6301.5 and 6302.5 Å of a quiet Sun MHD simulation, calculated using the MURaM code, were inverted using SPINOR assuming a height dependent atmospheric model, for several different amounts of noise and degraded using different spectral resolutions. The scatter, an indication of the accuracy with which the “true” value was recovered, although not negligible for noisless, full-resolution data, clearly increases with increasing noise level. It also increases rapidly with decrease in the spectral resolution, where a factor 2 in spectral resolution corresponds roughly to an order of magnitude in S/N. Most likely, the subtle variations in the line profile are reduced by a low spectral resolution, and are subsequently more easily overpowered by the noise.

Fig. 4
figure 4

Effect of spectral resolution vs. S/N on the recovered LOS velocity of a photospheric inversion based on simulated spectra of the FeI lines at 6301.5 and 6302.5 Å

3.2.2 Spatial Degradation

Traditionally, the contamination of spectra with spectra from other parts of the field-of-view (FOV) has been considered as part of the formation process, most commonly in the form of a stray-light contribution of some sort, that is added to the undegraded spectra before or after degradation by the instrument. Typically, since the actual stray-light contribution depends on many factors, such as the observing conditions, time of day, etc., the stray-light profile is calculated from the average profile over the FOV or is modeled using a “typical” average quiet Sun atmosphere, and the amount of stray-light is fitted for as a free parameter (e.g. Stenflo 1968; Skumanich and Lites 1991; Bernasconi and Solanki 1996, and many more).

However, in most cases, the true nature of such spatial contamination is much more complicated, because there is a, more or less compact, mapping from the source (the undegraded spectra), to the data. This implies that to calculate the stray-light profile for a particular pixel, the undegraded spectra around it are required, which are not available, as they are themselves contaminated by an unknown amount of stray-light.

Orozco Suárez et al. (2007) deal with this problem by using the data itself, and subtracting it from the original data by fitting. While this so-called “local-straylight” method indeed removes a lot of the unwanted stray-light, it has the significant disadvantage that it approximates a convolution of the real profiles with the convolution of the data, which has already been convolved.

If spectra are available over an extended FOV, deconvolution can be considered to remove the spatial degradations directly. While it is in principle possible to recover the undegraded spectra by deconvolution, this procedure will amplify any noise in the data, preferentially at the highest possible spatial frequencies. One way to reduce this problem is to first accumulate the signal in the spectra in a reduced number of quantities, for instance by using a principal component analysis (PCA, Rees et al. 2000), and then deconvolve the maps (Ruiz Cobo and Asensio Ramos 2013). This method relies on the PCA basis functions of the data to be a good basis for the undegraded profiles, which for Hinode SP data seems to be a good approximation. Regularized spatial deconvolution has also been used to compensate the effect of straylight from atmospheric high-order aberrations (Scharmer et al. 2013).

Another approach to calculate the stray-light is to use the actual undegraded profiles and apply the spatial degradation to them. Since the undegraded spectra are not know, we must self-consistently calculate the degraded and the non-degraded spectra, so that the line profiles calculated from the inversion, degraded by telescope diffraction, produces the observed data. This method is known as a coupled inversion (van Noort 2012), and requires the simultaneous fitting of all profiles in the FOV. While it is mathematically the most consistent way to calculate the inverted physical atmosphere, it introduces additional degrees of freedom in the solution, because the sum of a large number of spectra, and not each individual spectrum is fitted to the data. This implies that a change in the spectrum in one pixel can be effectively “hidden” in the degraded data by an opposite change in the spectrum of the adjacent pixel. In addition, the current implementation is unable to deal with non-uniform instrumental properties, currently limiting its application to data from space-based instruments.

A selection of inverted quantities obtained using this method is shown in Fig. 5, where a comparison is made between a coupled inversion and a traditional “1D” inversion, where instrumental effects are ignored. Despite the additional degrees of freedom, the coupled inversion maps look much more consistent, and show more detail than the 1D result.

Fig. 5
figure 5

Coupled inversion of a sunspot (top left of each panel) observed with Hinode SOT/SP on the 5th of June 2007, compared with a “traditional” inversion, where stray-light is ignored (bottom right of each panel). Observation acquired with Hinode/SOT (Kosugi et al. 2007)

Further treatment of instrumental degradation will need to include the capability to deal with changing degradation conditions, to be able to invert ground based data. The framework for this already exists, but still requires impractical numerical resources to implement.

3.3 Optimization

At present, there are a number of basic methods in use for obtaining the most probable atmospheric structure, responsible for producing the observed spectra: classical downhill minimization, genetic algorithms and Bayesian methods.

3.3.1 Genetic

This method is loosely based on the principle of evolution by survival of the fittest, over a given number of generations, and is implemented using the PIKAIA algorithm (Charbonneau 1995) as the optimization method for the HELIX code. The optimization strategy consists of setting up a number of populations of trial solutions, each with an internal variation of the fit parameters. A given fraction of the populations is then eliminated, with a chance of survival that is mostly determined by the quality of the agreement with the observed data, usually based on a least squares metric. The remaining solutions are then duplicated, and random changes are introduced, thus giving rise to a new generation.

There are a number of advantages, such as a guarantee that the global minimum will be found if enough generations are allowed to pass, and automatic detection of degeneracies in parameter space. It also only requires the forward calculation of the synthetic line profiles, and not the derivative of the merit function to the atmospheric fit parameters, which makes it very flexible.

One major disadvantage is that the number of trials per generation that is necessary to probe all fit parameters independently is dependent on the number of atmospheric fit parameters, so that the numerical cost grows very rapidly with the complexity of the fitted atmosphere. This has limited the use of this method to relatively simple slab and Milne-Eddington atmospheres.

3.3.2 Bayesian/MCMC

Bayesian inversions (Asensio Ramos et al. 2007) are a probabilistic approach to inversion, in the sense that they determine for a distribution of trial solutions the posterior, that is: a distribution of the probability that any of the trial solutions is in agreement with the observed data. The most probable value of the solution is the one with the largest probability, but the uncertainty in the parameter values can be extracted from the posterior as well.

The key ingredient for this type of inversion is a method that generates a set of trial solutions that efficiently samples the posterior. A brute force grid computation will obviously do the job, but scales poorly with the number of fit parameters. The Markov Chain Monte Carlo (MCMC, f.i. Metropolis et al. 1953) method is one way to reduce this effort, and has been used successfully applied in recent years (Asensio Ramos 2011; Asensio Ramos and Martínez González 2014). MCMC is not unlike the genetic method, with the difference that new generations are based on old ones in a different way, that most efficiently samples the posterior, for which an estimate of the posterior is used.

The main limitation of this method is that to sample the posterior, many forward calculations are needed, which limits the applicability of the method to relatively simple and fast atmospheric models.

3.3.3 Database/PCA

This method is the most direct, but therefore also the most thorough. The aim is to quantify the spectra in some way that can be used to categorize them. This can be done by using the intensity values in each wavelength bin of the data, but also by using the value of the inner product of the data with some basis of spectral basis functions. An optimal set of such basis functions can be produced using Principal Components (PCA), a small number of which is usually sufficient to describe each spectral profile to the noise limit (Rees et al. 2000; Socas-Navarro et al. 2001). The objective is now to build an exhaustive database of spectra of all possible atmospheres, which are all described by the coefficients used to categorize the spectra. This database then can be used as a look-up table for an observed spectrum, for which the database lookup then returns all possible atmospheres that yield a sufficiently similar spectrum.

The result is thus a distribution of atmospheric values, not a specific value. If the distribution is normal, an error may be specified, as is often done for gradient search minimizations. However, frequently the distributions are far from normal, and there can be co-dependencies between parameters, that indicate there are degeneracies in the model.

Clearly, these methods return a lot of information that can be used to evaluate the result, but this comes at the cost of having to calculate a database that is complete. This limits the applicability of such methods to relatively simple atmospheres, since the dimensionality of the database quickly grows beyond the capabilities of available computational resources.

3.3.4 Gradient Search

This is a classic method for finding the optimum solution to a given problem, for which a large body of mathematical work exists (see for instance Press et al. 1992). The method is really a collection of methods, most of which are very efficient, in that they require only a few trial calculations of the synthetic spectra to converge, but they suffer from the problem that convergence to the global minimum can only be guaranteed if the merit function is monotonic. In addition, the gradient of the merit function to the atmospheric fit parameters is required, which can be difficult or costly to compute. In most inversion codes, the gradient is not explicitly calculated, but instead the response functions of the atmosphere are used to drive the solution in the direction of the minimum, by eliminating the remaining difference between the forward calculated spectrum and the observed one. It is relatively easy to show that when a \(\ell_{2}\)-norm is used, the gradient of the merit function depends on the response function. Assuming that the parameters of our model atmosphere are encoded in a vector \(\boldsymbol{x} = {x_{1}, x_{2}, ..., x_{i}}\), for an observation \(\boldsymbol{O}(\lambda )\) consisting of \(N_{\lambda }\) wavelengths in the four Stokes parameters, the merit function (\(\chi^{2}\)) and the gradient relative to a parameter \(x_{i}\) are given by

$$\begin{aligned} \chi^{2} =& \frac{1}{4N_{\lambda }}\sum_{j< 4N_{\lambda }} \frac{( {S}_{j}(\boldsymbol{x}) - {O}_{j})^{2} }{\sigma_{j}^{2}}, \end{aligned}$$
(13)
$$\begin{aligned} \frac{\partial \chi^{2}}{\partial x_{i}} =& \frac{1}{2N_{\lambda }} \sum_{j< 4N_{\lambda }} \frac{({S}_{j}(\boldsymbol{x}) - {O}_{j}) }{\sigma _{j}^{2}} \underbrace{\frac{\partial {S}_{j}(\boldsymbol{x})}{\partial x _{i}}}_{\boldsymbol{R}(x_{i})}, \end{aligned}$$
(14)

where \(\boldsymbol{S}(\boldsymbol{x})\) are the synthetic profiles and \(\sigma \) is the noise of the observations. The last term in Eq. (14) is the response function of \(\boldsymbol{S}\) to perturbations in \(x_{i}\).

The most common gradient search minimization algorithm in use is the Levenberg-Marquardt method (Levenberg 1944; Marquardt 1968), which is a mix of the minimization of the linearized problem and a local gradient search that kicks in when the forward problem is very non-linear. It is at the heart of all commonly used height dependent atmospheric inversion codes, and has a robust convergence, as long as the derivatives of the synthetic spectrum with respect to the atmospheric fit parameters can be efficiently obtained. Figure 6 (left) shows the basic scheme, where the difference between the observed and synthetic spectrum are used to drive corrections to the current estimate of the atmosphere.

Fig. 6
figure 6

Gradient search optimization. Top: single spectrum, without instrumental effects. Bottom: coupled inversion, with instrumental effects considered

It is possible to adapt the gradient search algorithm to search for the minimum of the difference between the spatially degraded synthetic profiles and the data, instead of using the synthetic profiles directly, by applying the effect that instruments have on the spectra also to the response functions, before the correction is calculated. Although this requires some additional effort in the computation of the correction, the gradient search method is currently the only method that has been successfully applied to simultaneously invert more than \(10^{6}\) atmospheric variables (van Noort 2012). Figure 6 illustrates gradient search algorithm for spatially coupled inversions and traditional pixel-by-pixel inversions.

4 Main Diagnostics in the Chromosphere

Observing the chromosphere and the transition region poses a challenge for solar physicists. There is a very limited selection of spectral lines that have sufficient opacity to sample the chromosphere.

Ground based observations are limited to visible and infrared wavelengths, and the most common chromospheric diagnostics are perhaps the Ca ii H & K lines (\(\lambda 3934\) & \(\lambda 3968\)), the H i 6563 line (H\(\alpha \)), the Ca ii infrared triplet lines (IR, \(\lambda 8489\), \(\lambda 8542\) & \(\lambda 8662\)) and the He i 5876 (D3) and \(\lambda 10830\) lines.

The ultra-violet includes a list of interesting lines that must be observed from space. These diagnostics are highly unexplored compared with those in the visible and infrared: the H i \(\lambda 1216\) line (L\(\alpha \)), Mg ii h & k lines (\(\lambda 2796\) & \(\lambda 2804\)), the He i 584 line, the He ii 304 line, Si iv \(\lambda 1394\) and \(\lambda 1403\), and many more. In Table 2 we summarize modelling requirements for some chromospheric diagnostics, and in Fig. 7 the formation height of the core of some chromospheric lines is illustrated as computed from a 3D MHD simulation.

Fig. 7
figure 7

Slice from a 3D MHD simulation indicating the \(\tau =1\) surface at line center for Mg ii h3 & b2, Ca ii H & \(\lambda 8542\), and Na i D. The contribution function of the He i \(\lambda 10830\) line is rendered in grey-scale because it is optically thin. Courtesy of M. Carlsson (Institute for theoretical astrophysics, University of Oslo)

Table 2 Main chromospheric diagnostics and the corresponding modelling requirements

The Ca ii H & K lines are particularly sensitive to temperature because the Planck function is very steep at those wavelengths. Thus, their broad wings can act as remarkable thermometers for the photosphere and the lower chromosphere. These lines have slightly higher Landé factor than the IR triplet lines (\(g_{3933}=1.16\), \(g_{3968} = 1.33\)) but the lower photon count in the UV and the dependency of the Zeeman splitting with \(\lambda^{2}\) makes them effectively less sensitive to magnetic fields (see Eq. (11)). Partial redistribution effects (PRD) must be included to reproduce the intensity profile close to line center (Uitenbroek 1989). The real advantage of these lines is that they can be observed from the ground at the highest resolution that a telescope can deliver as the diffraction limit of a telescope scales linearly with \(\lambda \). The importance of 3D non-LTE effects remains to be assessed in a similar way as de la Cruz Rodríguez et al. (2012) did for the \(\lambda 8542\) line.

The Mg ii h & k lines sample the transition region, providing valuable information of the physical coupling between the chromosphere and the corona (Uitenbroek 1997). With the launch in 2013 of NASA’s Interface Region Imaging Spectrograph (IRIS, De Pontieu et al. 2014), these lines have become particularly interesting for the solar community (Leenaarts et al. 2013; Pereira et al. 2013), although without measuring polarization. However, these lines could be combined with the Ca ii IR triplet lines to constrain the temperature stratification of the solar chromosphere and to measure the magnetic field in the chromosphere. PRD of scattered photons must be used to model these lines.

The H\(\alpha \) line has been considered for a very long time one of the best chromospheric diagnostics (see comments by Rutten 2007). It is well suited for the measurement of chromospheric velocities because the line profile is observed in absorption in most chromospheric conditions (not always though). Cauzzi et al. (2009) showed that the width of the Gaussian core of the H\(\alpha \) line is strongly affected by the chromospheric temperature because the hydrogen atom is very light. However, this line is not well suited for current implementations of non-LTE inversions because to reproduce the observed intensities, the radiation field must be evaluated in 3D dimensions (Leenaarts et al. 2012a). H\(\alpha \) is not an ideal diagnostic for chromospheric magnetic fields because its response to the Zeeman effect is originated in the photosphere (Socas-Navarro and Uitenbroek 2004), although the line is sensitive to the Hanle effect close to the line center (e.g., Štěpán and Trujillo Bueno 2010).

The Ca ii IR triplet lines have a relatively high sensitivity to magnetic fields (with Landé factors \(g_{8498}=1.07\), \(g_{8542}=1.10\), \(g_{8662}=0.87\)), and they can be modelled assuming CRD (see Uitenbroek 1989) and statistical-equilibrium (Wedemeyer-Böhm and Carlsson 2011). Furthermore, these lines are very sensitive to the temperature stratification of the atmosphere and encode information about velocity gradients. Therefore, most, if not all, depth-stratified non-LTE inversions in the chromosphere have been carried out using the Ca ii IR triplet lines in active regions (). In the quiet-Sun, scattering polarization and the Hanle effect must be included to describe the linear polarization signals (Manso Sainz and Trujillo Bueno 2010; Carlin et al. 2013). Recently, Leenaarts et al. (2014) showed that the effect of isotopic splitting must be included in the inversions to properly retrieve the velocity stratification.

The physical processes involved in the formation of the He i D3 and \(\lambda 10830\) lines are significantly different than those of the H\(\alpha \) line and of the aforementioned Ca ii lines (see Goldberg 1939; Andretta and Jones 1997; Trujillo Bueno and Asensio Ramos 2007; Centeno et al. 2008; Golding et al. 2014; Leenaarts et al. 2016). The He i atom consists of two spectral series of singlets (para-helium) and triplets (ortho-helium). The ground state of the atom is a singlet level, but the D3 and the \(\lambda 10830\) transitions take place between two levels of the triplet system. Since transitions between the para and the ortho levels are forbidden by the dipole selection rules and collisional rates in the chromosphere are very low, the only way to populate the ortho-levels is through photo-ionization from the para-helium system followed by a recombination into the ortho-system. The electrons cascade down through the levels of the ortho-system until the ground meta-stable level of the ortho-helium system. The ionization potential of the para-system is 24.6 eV, which means that the photoionization of the He i atom can only be effectively done with UV photons (\(\lambda < 504\) Å). Such radiation can only originate in the solar corona, which makes these lines particularly interesting because they are sensitive to both chromospheric and coronal physical conditions; see observations with the TRIPPEL spectrograph (Kiselman et al. 2011) at the Swedish 1-m Solar Telescope (SST, Scharmer et al. 2003) in Fig. 8 and with Gregor/GRIS (Schmidt et al. 2012; Collados et al. 2007) in Lagg et al. (2015). Since UV photons can only penetrate a thin layer of the chromosphere before they are absorbed, these lines are assumed to form in a relatively thin and localized range of heights, making the constant slab or Milne-Eddington descriptions applicable.

Fig. 8
figure 8

Raster-scan observation of AR12394 (top) and AR12390 (bottom) on 2014-08-01 at 1083 nm with the TRIPPEL spectrograph at the Swedish 1-m Solar Telescope. From left to right the panels show images in the continuum, in Si i \(\lambda 10827\) line center and in He i \(\lambda 10830\) line absorption. Courtesy of J. Joshi, T. Libbrecht, G. Sliepen and D. Kiselman (Institute for Solar Physics, Stockholm University)

5 Inversions in the Chromosphere: a Selection of Results

This volume includes dedicated chapters about sunspots (Rempel & Scharmer, same issue) and about photospheric magnetic fields in the quiet-Sun (Schussler et al., same issue). Therefore, we have chosen to focus on a small selection of results obtained from chromospheric studies, and more specifically on those concerning inference of magnetic fields.

The first attempts to invert chromospheric data can be tracked back to the VAL and FAL atmospheres (see Vernazza et al. 1981 and Fontenla et al. 1993). Those studies used spatially-averaged spectra, including many chromospheric lines from different species (atoms and ions), to derive models that could reproduce the observations. Nowadays, the VAL and FAL atmospheres are still used to derive radiative fluxes in the chromosphere or as reference chromospheric models. However, the chromosphere is highly dynamic and finely structured. These 1D models cannot catch those two inherent properties of the chromosphere, and it is now widely accepted that spatio-temporal models must be used to characterize this region of the Sun.

The following techniques have been particularly successful to derive magnetic fields in the chromosphere:

  1. 1.

    Depth-stratified non-LTE inversions, assuming statistical equilibrium and complete redistribution in angle and frequency of scattered photons (CRD). Socas-Navarro et al. (2000b) developed inversion methods that are used nowadays (Socas-Navarro et al. 2015) to derive spatio-temporal model atmospheres including a photosphere and a chromosphere (see detailed temperature maps in Fig. 9).

    Fig. 9
    figure 9

    Inferred chromospheric (top) and photospheric (bottom) temperatures from a non-LTE inversion using observations in the Ca ii \(\lambda 8542\) line acquired with CRISP (Scharmer 2006; Scharmer et al. 2008) at the SST. The temperature maps are given at fixed optical depths of \(\log \tau_{500} = -3.67\) (top) and \(\log \tau_{500} = -0.78\) (bottom). A small patch from this inversions was used by de la Cruz Rodríguez et al. (2015) to study small scale magnetic flux emergence

  2. 2.

    Milne-Eddington atmosphere or constant physical slab inversions. These inversions work directly with the parameters of the radiative transfer equation, and therefore only provide direct information about the line-of-sight velocity and magnetic field vector.

  3. 3.

    The weak-field approximation can be used in most chromospheric situations to infer the magnetic field vector. Most chromospheric lines have a relatively low Landé factor and a relatively large Doppler width, making them suitable candidates for this simple approximation.

5.1 Depth-Stratified Non-LTE Inversions

We focus now in approach 1. The statistical-equilibrium equations (Eq. (9)) have an explicit dependency on the mean intensity \(\bar{J}\), which in current implementations is computed for each pixel assuming plane-parallel geometry. In reality, if radiation is not coupled to the local conditions of the plasma, horizontal radiative transfer can become important, and the evaluation of the radiation field must be performed in 3D. Therefore, this method is only suited for lines that can be modelled assuming plane-parallel geometry.

A number of studies including the inversion of Ca ii IR data can be found in the literature:

Sunspots: Non-LTE inversions have allowed to identify the origin of umbral flashes (UF) in sunspots and to derive the chromospheric temperature increase during the flash phase (Socas-Navarro et al. 2000a). The polarity reversals observed in Stokes \(V\) during UF are induced by emission in the intensity profile, not to actual changes in the polarity of the magnetic field (de la Cruz Rodríguez et al. 2013b). In fact, most of the variability that is observed in monochromatic Stokes \(V\) images is produced by the thermal properties of the plasma that leave an imprint in Stokes \(V\), like Doppler motions and Doppler broadening. Similar conclusions were drawn from the study of Ca ii H & K data in plage (Martinez Pillet et al. 1990). The 3D structure of the magnetic field vector has been retrieved by Socas-Navarro (2005b), who found a complex field configuration with opposite-sign torsion that could be interpreted as opposite helicity flux ropes inside the same spot. In a second study Socas-Navarro (2005a) analyzed chromospheric heating induced by currents dissipation in the upper layers of the same sunspot. One aspect that remains to be investigated is the full depth stratification of the penumbra of sunspots, and how the Evershed effect and the moat flow relate to the inverse Evershed flow and the superpenumbra observed in the chromosphere.

Plage: Shine and Linsky (1974) discussed ad-hoc 1D models that could reproduce some observed properties in plage profiles. However, the first and probably only attempt to apply field-dependent non-LTE inversions to a patch of network was carried out by Pietarila et al. (2007a), using slit-spectrograph observations in the Ca ii \(\lambda 8498\) and \(\lambda 8542\) lines, recorded with SPINOR (Socas-Navarro et al. 2006). One of their main results is the appearance of a field that expands with height, and becomes more horizontal in the chromosphere, suggesting a canopy effect (see flux-tube models by Solanki et al. 1991, or measurements of increasing magnetic field gradients in plage by Sanchez Almeida et al. 1989). However, their conclusions are based in the visual appearance of the inverted field topology because they did not have enough signal in Stokes \(Q\) and \(U\) to derive the inclination of the magnetic field. This canopy effect has also been found in 3D MHD simulations (de la Cruz Rodríguez et al. 2013a), which has a clear diagnostic associated: the core of the Ca ii IR lines is observed in emission or with greatly enhanced intensity (see Fig. 10). It remains unclear what process heats the chromosphere in this canopy, above the quiet photosphere below, but it must have a magnetic origin.

Fig. 10
figure 10

Observation of plage in the Ca ii \(\lambda 8542\) line recorded with the CRISP instrument at Swedish 1 m Solar Telescope. Left: Monochromatic image acquired in the wing of the line, showing bright-points embedded in photospheric granulation. The color markers indicate the locations of the spectra plotted on the right panel, with the same color coding

Quiet-Sun: In quiet-Sun observations, the amplitudes of Zeeman induced polarization (in most chromospheric lines) are similar to those originated from scattering polarization and from the Hanle effect. These amplitudes are expected to be very low, of the order of \(10^{-4}\) relative to the continuum intensity. Therefore, the challenge to measure chromospheric magnetic fields is twofold: first it is very hard (probably impossible at the moment) to reach the required sensitivity with high/medium spatial resolution, but even if such observations were available, modelling the observed polarization profiles would be extremely hard. One of the best estimates of the field strength in the chromosphere of quiet-Sun is given by Trujillo Bueno et al. (2004).

5.2 Constant Slab Inversions and Milne-Eddington Inversions

The first realistic inversions of the D3 line, including a full treatment of the Hanle effect and scattering polarization, were originally introduced by López Ariste and Casini (2002). To overcome the computational challenge (at that time) of performing a full least-squares-fit for this non-linear problem, they used a method based on PCA decomposition and precomputed synthetic profiles (Rees et al. 2000). Solanki et al. (2003) studied the \(\lambda 10830\) line in an active region, including only Zeeman induced polarization in their inversions. HAZEL was the first code that included full spectral synthesis with Zeeman induced polarization, scattering polarization and the Hanle effect (Asensio Ramos et al. 2008), and Helix+ is now also capable of similar calculations (Lagg et al. 2009).

The D3 and \(\lambda 10830\) lines have been used to study prominences and filaments, spicules, fibrils, and flares. Here we summarize some important results from the literature:

Fibrils: To our knowledge, most of the studies carried out in fibrils (using He i lines) have focused on measuring the direction of the magnetic field and on assessing whether the magnetic field is aligned along the direction defined by chromospheric fibrils. In particular, the fibrils observed in the superpenumbra of sunspots seem to be aligned with the measured direction of the magnetic field (Schad et al. 2013), although de la Cruz Rodríguez and Socas-Navarro (2011) found a number of cases with significant miss-alignment using the \(\lambda 8542\) line. Further studies of fibrils in the H\(\alpha \) line using a 3D MHD simulation, showed that fibrils are usually aligned with the magnetic field in the horizontal direction, but that is not always the case vertically (Leenaarts et al. 2015).

Prominences: Theoretical models of solar prominences predict that the magnetic field must be highly inclined to support the material inside the prominence. Observationally, most measurements of the magnetic field topology in prominences have come from observations in He i lines (\(\lambda 5876\) and \(\lambda 10830\)). A difficulty that arises from these observations is the presence of ambiguities that are compatible with several orientations of the magnetic field. The validity of a more inclined versus a more vertical topology of the magnetic field has been greatly debated by the community (see latest results by Casini et al. 2005; Orozco Suárez et al. 2014; Schmieder et al. 2014; Martínez González et al. 2015).

Filaments: Magnetic fields in filaments have been recently studied in the photosphere and in the chromosphere separately (Lites 2005; López Ariste et al. 2006; Merenda et al. 2006). For the first time, Kuckein et al. (2012) carried out a detailed analysis of simultaneous photospheric and chromospheric spectropolarimetric observations, and they were capable of inferring the magnetic field vector in the photosphere (using the Si i \(\lambda 10827\) line and in the chromosphere (using the He i \(\lambda 10830\) line). These studies have shown that the field in the chromosphere has a strong horizontal component along the spine of the filament (up to 800 G), whereas the vertical component of the field has typical values of 400–500 G and are placed on both sides of the spine (see Fig. 11).

Fig. 11
figure 11

Magnetic field in a filament as a function of time. The upper two rows correspond to chromospheric inversions of the He i 10830 line, wheres the lower two rows correspond to photospheric inversions of the Si i \(\lambda 10827\). For each set of inversions, the upper row corresponds to the vertical component, and the lower panel corresponds to the horizontal component. Reproduced from Kuckein et al. (2012), Figs. 11 and 12 combined

Spicules: Polarimetric observations of spicules outside the limb have been used to derive the magnetic field orientation (López Ariste and Casini 2005; Centeno et al. 2010), including the variation of the magnetic field with height (Orozco Suárez et al. 2015). However, to achieve a high enough signal to noise ratio, these observations have usually been integrated for periods of 10 to 45 minutes. Unfortunately, the chromosphere is highly dynamic and those measurements reflect the average magnetic field vector over that integration period.

5.3 The Weak-Field Approximation in the Chromosphere

The weak field approximation (WFA hereafter) poses a very fast method to estimate the magnetic field vector from full-Stokes observations of magnetically sensitive lines (Rayrole 1967). It is applicable when the Doppler width of the line (\(\Delta \lambda_{D}\)) is much larger than the Zeeman splitting of the line (\(\Delta \lambda _{B}\)) and if the magnetic field strength, field inclination and line-of-sight velocity are close to constant as a function of depth in the atmosphere. Under those conditions, Stokes \(Q\), \(U\) and \(V\) can be written as a function of constant magnetic field vector components (with depth) and the first and second derivatives of the intensity profile (see summary in Landi Degl’Innocenti and Landolfi 2004).

Most chromospheric lines have a relatively low Landé factor and are usually broader than photospheric lines. Therefore, it is relatively easy to satisfy the conditions mentioned above, except that many chromospheric spectral lines are sensitive to a large range of regimes, and can sample photospheric and chromospheric conditions simultaneously. However, this inconvenience can be easily overcome by isolating a small wavelength range where the line can be assumed to sample one atmospheric regime. We note that Wöger et al. (2009) proposed a hybrid center of gravity method to derive depth information of the magnetic field. Jennerholm Hammar (2015) used synthetic observations in the \(\lambda 8542\) line, computed from a 3D MHD simulation to assess the usability of the WFA. Their results show good agreement between the inferred components of the magnetic field and that in the simulation.

The weak field approximation has been used to study the evolution of magnetic fields in flares (Harvey 2012), in a sunspot umbra (de la Cruz Rodríguez et al. 2013b) and in plage (Pietarila et al. 2007b), from observations in the Ca ii 8542 Å line.

6 Discussion and Future Developments

6.1 Structuring of Magnetic Fields in the Chromosphere

In Sects. 5.1 and 5.2 we have summarized a number of studies that have inferred magnetic fields, in most cases targeting particular features or phenomena in the chromosphere. The question of understanding how is the magnetic field topology in the chromosphere seems to persist. Recent developments in solar instrumentation have allowed to acquire spectropolarimetric observations with very high-spatial resolution (see summary by Kleint and Gandorfer 2015), and monochromatic images in all the Stokes parameters can appear very finely structured. Particularly in the chromosphere, this fine structures may be (wrongly) assumed to indicate a similar topology of the magnetic fields, although magnetic fields may govern the intricate force balance in the chromosphere. This fine structure is likely to contain strong imprints of Doppler motions, line broadening and opacity variations and corrugations, and it should not be assumed to resemble the magnetic field topology (similarly discussed by Judge 2006). In the chromosphere gas pressure is several orders of magnitude lower than in the photosphere, whereas magnetic fields are usually one order of magnitude lower. While the photosphere is dominated by gas pressure gradients, that dictate the structuring of magnetic fields, in the chromosphere this is not clearly the case.

Figure 12 illustrates a highly structured Stokes \(I\) image close to line center in the \(\lambda 8542\) line (left panel), but the inferred l.o.s. component of the magnetic field is much smoother, and similar results are obtained, e.g., in filaments (see Fig. 11 in Kuckein et al. 2012). Similarly, de la Cruz Rodríguez et al. (2013b) found that most of the variability observed as a function of time in umbral flashes can be explained with an almost constant magnetic field (at each location). LTE inversions in the photosphere in sunspots and plage regions also reveal that the magnetic field rapidly expands as a function of height and becomes relatively smooth (e.g., Scharmer et al. 2013; Buehler et al. 2015), supporting this scenario.

Fig. 12
figure 12

SST/CRISP spectropolarimetric observation of AR1793 on 2013-07-22 (08:51:55UT) in the Ca ii 8542 Å line. Left: umbra and penumbra of a sunspot (AR1793) at the line center. Right: the corresponding line of sight component of the magnetic field vector, computed with the WFA

Therefore, magnetic fields in the chromosphere must be smoother than the visual appearance of many high-resolution observations suggests, especially in active regions. Schad et al. (2015) draw similar conclusion from the analysis of Milne-Eddington inversions of a He i \(\lambda 10830\) dataset.

Very recently, results from the inversion of high-resolution GREGOR/GRIS observations in the Si I \(\lambda 10827\) and the He I \(\lambda 10830\) lines have revealed that the magnetic field strength is very smooth in the upper chromosphere, but the field inclination contains fine structure that is correlated with the inclination of the photospheric magnetic field (see Fig. 13, reproduced from Joshi et al. 2016).

Fig. 13
figure 13

Reconstruction of the magnetic field vector from GREGOR/GRIS observations in the Si I \(\lambda 10827\) and the He I \(\lambda 10830\) lines. From left to right there are three groups of panels showing the magnetic field strength, inclination and azimuth. Each group of panels contains the reconstructed quantity as a function of decreasing optical depth from left to right. The first three panels are reconstructed from LTE inversions in the Si I line. The fourth panel corresponds for a Milne-Eddington inversion of the He I line. Reproduced from Joshi et al. (2016), Fig. 3

6.2 An Outline for the Future

The future of radiative diagnostics continues to build upon forward modelling and inversions. Nowadays, RH (Uitenbroek 2001), MULTI3D (Leenaarts and Carlsson 2009) and NICOLE (Socas-Navarro et al. 2015) (among others) are well developed and available to the community. Hanle calculations may be possible with PORTA (Štěpán and Trujillo Bueno 2013, closed-source) and with TRAVIATA (Carlin and Asensio Ramos 2015, under development). These codes shall be used to develop new techniques to accelerate the computation of the NLTE problem (e.g., Fabiani Bendicho et al. 1997; Leenaarts et al. 2012b) to implement missing microphysics in the radiative transfer calculations (e.g., Osorio et al. 2012), and to study line formation with theoretical/numerical model atmospheres.

The methods presented by van Noort (2012) and just recently by Asensio Ramos and de la Cruz Rodríguez (2015) pose the latest development in photospheric inversions. These methods couple the parameters of the model atmosphere spatially and they properly account for the smearing of the telescope PSF. The application of these methods in the chromosphere will be a major step forward in the near future, although we have barely started to exploit the potential of simpler 1.5D inversions in non-LTE. Another point to improve upon is related to the nature of the spatial coupling, which has so far been instrumentally motivated or mathematically imposed, but the usability of the MHD equations remains, to our knowledge, to be proven.

There is also great potential in the exploration of interesting chromospheric lines like the Ca ii H & K, or the Mg ii h & k, although PRD effects must be included to study these lines. To assess the potential of inversions in H\(\alpha \), the radiative transfer problem must be solved in 3D which largely complicates the inversion and the description of the model atmosphere.