Issue 
A&A
Volume 664, August 2022



Article Number  A76  
Number of page(s)  26  
Section  The Sun and the Heliosphere  
DOI  https://doi.org/10.1051/00046361/202142934  
Published online  09 August 2022 
The transfer of polarized radiation in resonance lines with partial frequency redistribution, Jstate interference, and arbitrary magnetic fields
A radiative transfer code and useful approximations
^{1}
IRSOL Istituto Ricerche Solari “Aldo e Cele Daccò”, Università della Svizzera italiana (USI), 6605 LocarnoMonti, Switzerland
email: ernest.alsina@iac.es
^{2}
Instituto de Astrofísica de Canarias (IAC), 38205 La Laguna, Tenerife, Spain
^{3}
Departamento de Astrofísica, Universidad de La Laguna (ULL), 38206 La Laguna, Tenerife, Spain
^{4}
LeibnizInstitut für Sonnenphysik (KIS), 79104 Freiburg, Germany
^{5}
Euler Institute, Università della Svizzera italiana (USI), 6900 Lugano, Switzerland
^{6}
Consejo Superior de Investigaciones Científicas (CSIC), Spain
Received:
16
December
2021
Accepted:
25
April
2022
Aims. We present the theoretical framework and numerical methods we have implemented to solve the problem of the generation and transfer of polarized radiation in spectral lines without assuming local thermodynamical equilibrium, while accounting for scattering polarization, partial frequency redistribution (due to both the Doppler effect and elastic collisions), Jstate interference, and hyperfine structure. The resulting radiative transfer code allows one to model the impact of magnetic fields of an arbitrary strength and orientation through the Hanle, incomplete PaschenBack, and magnetooptical effects. We also evaluate the suitability of a series of approximations for modeling the scattering polarization in the wings of strong resonance lines at a much lower computational cost, which is particularly valuable for the numerically intensive case of threedimensional radiative transfer.
Methods. We examine the suitability of the considered approximations by using our radiative transfer code to model the Stokes profiles of the Mg II h & k lines and of the H I Lymanα line in magnetized onedimensional models of the solar atmosphere.
Results. Neglecting Doppler redistribution in the scattering processes that are unperturbed by elastic collisions (i.e., treating them as coherent in the observer’s frame) produces a negligible error in the scattering polarization wings of the Mg II resonance lines and a minor one in the Lymanα wings, although it is unsuitable to model the cores of these lines. For both lines, the scattering processes that are perturbed by elastic collisions only give a significant contribution to the intensity component of the emissivity. Neglecting collisional as well as Doppler redistribution (so that all scattering processes are coherent) represents a rough but suitable approximation for the wings of the Mg II resonance lines, but a very poor one for the Lymanα wings. The magnetic sensitivity in the scattering polarization wings of the considered lines can be modeled by accounting for the magnetic field in only the η_{I} and ρ_{V} coefficients of the Stokesvector transfer equation (i.e., using the zerofield expression for the emissivity).
Key words: radiative transfer / scattering / polarization / line: profiles / methods: numerical / Sun: chromosphere
© E. Alsina Ballester et al. 2022
Open Access article, published by EDP Sciences, under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
This article is published in open access under the SubscribetoOpen model. Subscribe to A&A to support open access publication.
1. Introduction
The intensity and polarization profiles of strong resonance lines are valuable observables for exploring the outer layers of the solar atmosphere. In particular, strong ultraviolet lines, such as the Lymanα lines of H I and He II and the Mg IIh & k doublet, were predicted to show significant linear polarization signals that arise from the scattering of anisotropic radiation, especially when observed close to the solar limb (Trujillo Bueno et al. 2011, 2012; Belluzzi & Trujillo Bueno 2012; Belluzzi et al. 2012). These scattering polarization signals encode information on the thermodynamic structure of the solar regions from which the radiation emerges. In the line core, they also carry the fingerprints of the strength and orientation of the magnetic fields due to the action of the Hanle effect (e.g., Stenflo 1994; Trujillo Bueno et al. 2001; Landi Degl’Innocenti & Landolfi 2004, hereafter LL04). The scattering polarization profiles of strong resonance lines often show broad lobes that extend far beyond the Doppler core, thus allowing the conditions in deeper layers of the solar atmosphere to be probed. Interestingly, via the socalled magnetooptical (MO) effects, these wing signals are sensitive to the presence of longitudinal magnetic fields with strengths comparable to those that characterize the onset of the Hanle effect (Alsina Ballester et al. 2016, 2019; del Pino Alemán et al. 2016, 2020).
Modeling the intensity and polarization patterns observed in such lines through radiative transfer (RT) calculations is crucial to understanding the physical processes that shape them and to developing reliable techniques to extract information on the solar atmosphere. Strong resonance lines, and especially their scattering polarization signals, must be modeled without assuming local thermodynamic equilibrium (LTE). In order to suitably model both the intensity and scattering polarization in the line wings, one must also account for the frequency correlations between incoming and outgoing photons in scattering processes, or partial frequency redistribution (PRD) phenomena. In the case of multiplets, their wing scattering polarization signals are often also strongly impacted by the quantum interference between different fine structure (FS) levels (i.e., Jstate interference), provided that the energy separation between them is not too large (Belluzzi & Trujillo Bueno 2011). In order to account for such interference, we need to consider a twoterm or multiterm atomic model (e.g., Sects. 7.5 and 7.6 of LL04).
The H I Lymanα line and the Mg IIh & k doublet in the ultraviolet range of the solar spectrum are strong resonance lines of particular scientific interest (e.g., the review by Trujillo Bueno et al. 2017). They present magnetically sensitive scattering polarization signals that must be modeled considering the abovementioned physical mechanisms. Following the theoretical predictions summarized in the abovementioned review paper, the intensity and polarization profiles of the H I Lymanα and Mg IIh & k lines were observed by the Chromospheric Lyman Alpha SpectroPolarimater (CLASP) and the Chromospheric Layer SpectroPolarimeter (CLASP2) sounding rocket experiments, respectively. Among a number of valuable findings (see Kano et al. 2017; Trujillo Bueno et al. 2018; Ishikawa et al. 2021), they provided observational confirmation that both the H I Lymanα and the Mg IIk lines present broad, largeamplitude, scattering polarization signals in the wings, which is in agreement with theoretical predictions (see Belluzzi & Trujillo Bueno 2012; Belluzzi et al. 2012; Alsina Ballester et al. 2016; del Pino Alemán et al. 2016, 2020).
The modeling of the intensity of these spectral lines, accounting for PRD effects, has been a subject of theoretical research for many decades; for an indepth discussion, with a particular focus on the hydrogen lines including Lymanα, the reader is referred to Sect. 15.6 of Hubeny & Mihalas (2015), and the references therein (see Vernazza et al. 1973; Milkey & Mihalas 1973a,b; Cooper et al. 1989; Hubeny & Lites 1995). Because a suitable modeling of the polarization of these lines requires accounting for all the phenomena mentioned above, it was approached in steps of increasing complexity. First, the limit of complete frequency redistribution (CRD; see LL04) was considered (Trujillo Bueno et al. 2011, 2012). This limit is suitable for modeling the scattering polarization signals observed in the core of these lines, where the Hanle effect operates, but not for their large and broad wing signals. Subsequently, making use of a theoretical framework based on the concept of metalevels (see Landi Degl’Innocenti et al. 1997), Belluzzi & Trujillo Bueno (2012) and Belluzzi et al. (2012) modeled the aforementioned lines taking PRD effects and Jstate interference into account. Within this framework, the impact of magnetic fields can also be taken into account, but the redistribution effects of collisions cannot be included in a selfconsistent manner. The approach based on the KramersHeisenberg formula for scattering amplitudes (see Stenflo 1994) allows one to account for the same physics (Sowmya et al. 2014) and is subject to the same limitation regarding collisional redistribution. The same lines were later modeled by Alsina Ballester et al. (2016, 2019), making use of the theoretical framework presented by Bommier (1997a,b). This theory, based on a perturbative expansion of atomphoton interactions, allows one to account for PRD effects (including collisional as well as Doppler redistribution) and the impact of magnetic fields. However, it is only suitable for a twolevel atomic system with an unpolarized^{1} and infinitely sharp lower level, and thus Jstate interference cannot be taken into account. A recent theoretical framework developed by Casini et al. (2014), based on a diagrammatic treatment of atomphoton interactions, allowed PRD effects, magnetic fields, and Jstate interference to be accounted for in the collisionless regime. Shortly thereafter, Casini et al. (2017a,b) extended it to account for the redistribution effects of collisions, and del Pino Alemán et al. (2016) applied it to model the Mg IIh & k lines. Finally, Bommier (2017, 2018) presented a generalization of her 1997 theoretical framework, which is suitable for a twoterm atomic system with an infinitely sharp and unpolarized lower term^{2} and, furthermore, allows for the inclusion of hyperfine structure (HFS). In this paper, we present the numerical scheme we have used to develop a novel nonLTE RT code, making use of the redistribution matrices presented in Bommier (2017, 2018). It represents an extension to the one presented in Alsina Ballester et al. (2017), which was valid for the simpler case of a twolevel atom. We have already applied this novel code to carry out research in other spectral lines, most notably to model the scattering polarization signals of the Na I D lines (see Alsina Ballester et al. 2021).
When considering RT problems with PRD effects, the line scattering emissivity must generally be computed accounting for its detailed dependency on the frequency and direction of propagation of the incident radiation. Even when introducing simplifying approximations, such as removing the anglefrequency coupling induced by the Doppler effect in the reference frame of the observer (i.e., the observer’s frame) through the socalled angleaveraged approximation (e.g., Rees & Saliba 1982), this generally remains the most computationally demanding step in the numerical solution of nonLTE RT problems, especially when considering complex atomic models or accounting for the energy shifts induced by the presence of an external magnetic field (e.g., Paganini et al. 2021). For PRD calculations in realistic threedimensional (3D) models of the solar atmosphere, which may contain more than 500^{3} spatial points, the numerical requirements become harsh enough to render them unfeasible, even with current highperformance computational techniques. It is thus of interest to devise and test approximations that allow one to quickly and reliably compute the scattering emissivity, even if their suitability is restricted to specific spectral ranges.
In this article we introduce the nonLTE RT code that we have developed and we then apply it to numerically evaluate a series of approximations for modeling the wings of the intensity and scattering polarization profiles of strong resonance lines. The investigation shown in the main text is focused on the Mg II doublet near 2800 Å, whereas the analogous study for the H I Lymanα line is found in the Appendix. We first investigate the approximation of neglecting Doppler redistribution for the fraction of scattering processes that are coherent in the atomic frame (i.e., for these processes, we assume that coherence occurs in the observer’s frame). This approximation was already investigated by Belluzzi & Trujillo Bueno (2012) for the magnesium doublet, but in the absence of magnetic fields and neglecting collisional redistribution. We then analyze the impact of additionally neglecting the contribution to scattering polarization from the scattering processes that are rendered noncoherent by collisions and, subsequently, of neglecting both Doppler and collisional redistribution (i.e., we assume that all scattering processes are coherent in the observer’s frame). Finally, we study the suitability of neglecting the impact of the magnetic field in the emissivity, taking it into account in all or only some of the coefficients of the propagation matrix.
This article is structured as follows. In Sect. 2, we show the main expressions involved in the considered RT problem, which are suitable for the case without HFS, as well as the detailed numerical scheme used to develop the transfer code. In Sect. 3, the abovementioned approximations are explained in detail and their suitability is evaluated through numerical calculations. The main conclusions are presented in Sect. 4. The atomic model parameters used in the calculations for the Mg IIh & k lines, and the details of this modeling, are presented in Appendix A. Appendix B presents an analogous analysis to that of the main text but considering the H I Lymanα line, in which the differences and similarities with the magnesium doublet are highlighted. Appendix C contains the relevant expressions for the numerical scheme, including those suitable for the general case in which HFS is included and those obtained under the approximations investigated in this paper.
2. Formulation of the problem
In this section, we present the relevant equations entering the considered nonLTE RT problem, the methods applied to solve it, and the details of its numerical implementation. The ensuing code is suitable for calculations considering onedimensional (1D) models of the solar atmosphere. We consider a twoterm atomic model whose lower term is infinitely sharp and unpolarized; this assumption is generally justified for strong resonance lines. We point out that suitably modeling the polarization signals of certain spectral lines of interest, such as the sodium doublet, requires considering a twoterm atom with HFS (see Alsina Ballester et al. 2021). The generalization of the present approach to include HFS is found in Appendix C.
2.1. The radiative transfer equation
The intensity and polarization properties of a given radiation beam are characterized by its Stokes vector I, whose components I_{i} (i = {0, 1, 2, 3}) correspond to the Stokes parameters I, Q, U, and V, respectively. The variation of the Stokes parameters of a radiation beam as it propagates through a medium is described by the radiative transfer equation (RTE), a firstorder inhomogeneous ordinary differential equation which can be written in vectorial form as
where s is the coordinate along the considered ray path, K is the propagation matrix, characterizing the attenuation of the Stokes parameters and the couplings between them, and ε is the emission vector, whose four components quantify the emission in the four Stokes parameters. All quantities appearing in the RTE depend in general on the spatial point r and on the frequency ν and propagation direction Ω of the considered radiation beam. These dependencies have been omitted in the expressions shown in this subsection for notational simplicity. From the numerical point of view, it is often convenient to solve the RTE on optical depth scale rather than geometrical depth (e.g., Janett et al. 2017). Indicating with τ the optical depth coordinate, the relation between the two scales is given by dτ = −η_{I} ds, where η_{I} is the absorption coefficient, which quantifies the attenuation of the four Stokes parameters as the radiation propagates through the medium (i.e., without modifying its degree of polarization). The propagation matrix has the form
The coefficients η_{Q}, η_{U}, and η_{V} quantify the differential attenuation of Stokes parameters Q, U, and V, respectively (i.e., dichroism). The anomalous dispersion coefficients ρ_{Q}, ρ_{U}, and ρ_{V} describe the couplings between Stokes parameters other than I. The ρ_{V} coefficient, in particular, quantifies the coupling between Stokes Q and U, resulting in a rotation of the plane of linear polarization. Under the assumption of an unpolarized lower term, this coupling is exclusively due to the presence of a magnetic field, and we thus refer to it as Faraday rotation. In the line wings, ρ_{V} reaches values comparable to those of η_{I} in the presence of longitudinal magnetic fields with strengths similar to those that characterize the onset of the Hanle effect (see Alsina Ballester et al. 2016, 2019). Thus, as noted in the introduction, these MO effects give rise to an appreciable magnetic sensitivity in the scattering polarization wings of strong resonance lines, even in the presence of relatively weak magnetic fields.
All the elements of the propagation matrix and components of the emission vector can in general be given as a sum of two contributions, one due to line processes and one due to continuum processes. These contributions will hereafter be labeled with ℓ and c, respectively. The analytical expressions for the line contributions to the elements of the propagation matrix and to the emission vector, for the atomic system considered in this work, can be found in Sects. 2.3 and 2.4, respectively. The expressions for the continuum contribution to all coefficients of the RTE are discussed in Sect. 2.5.
2.2. The twoterm atomic model
We consider a twoterm atomic system in which each term is specified by (βLS), where β is a set of inner quantum numbers, L is the quantum number for the orbital angular momentum operator L, and S is the quantum number for the electronic spin operator S. In the absence of magnetic fields, the energy eigenstates of this atomic system coincide with those of the total angular momentum operator J and are given by βLSJM⟩, where J is the total angular momentum quantum number and is M the magnetic quantum number. When an external magnetic field is present and the induced splitting between the magnetic sublevels is comparable to the separation between the different Jlevels of the considered term (i.e., the PaschenBack effect regime), J ceases to be a good quantum number for the atomic Hamiltonian. Its eigenstates can thus be given as linear combinations of the eigenstates of J,
where the label j is introduced to distinguish between different states with the same quantum numbers β, L, S, and M. The sum over J ranges from L − S to L + S, but for simplicity of notation these limits are not given explicitly. The coupling coefficients can be obtained by diagonalizing the atomic Hamiltonian (see Appendix C). Of course, in the absence of a magnetic field, .
We consider the spectral lines arising from radiative transitions (under the electric dipole approximation) between states of the upper and lower term, for which we hereafter use the shorthand notation j_{u}M_{u}⟩ and j_{ℓ}M_{ℓ}⟩, respectively. We introduce the normalized strength (e.g., Sect. 3.4 of LL04) for the transition between states j_{ℓ}M_{ℓ}⟩ and j_{u}M_{u}⟩
where q is an integer which can take values −1, 0, and 1. The quantities given in the brackets and curly brackets are the socalled 3j and 6j symbols, respectively, quantifying the couplings between various angular momenta (see Sects. 2.2 and 2.3 of LL04). The transition frequency is
where h is the Planck constant and E_{juMu} and E_{jℓMℓ} are the energies of the upper and lower states, respectively, which correspond to eigenvalues of the atomic Hamiltonian (see Appendix C.1).
2.3. Propagation matrix elements in a twoterm atom
The line contribution to the elements of the propagation matrix can be derived as detailed in Sect. 7.6 of LL04. In the reference frame of the observer, and under the assumption that the lower term is unpolarized, this contribution can be written in terms of the transition strengths introduced above^{3}
Throughout this work, the maximum and minimum values of M in the sums depend on the quantum numbers S and L of the considered term, but for simplicity of notation the summation limits are not given explicitly. For the same reason we do not show the limits for the j labels, which are determined by the numbers S, L, and M (see Sect. 3.4 of LL04).
The quantities are the socalled rotation matrices (e.g., Sect. 2.4 of LL04). They quantify the rotation from a reference system in which the Zaxis, which corresponds to the quantization axis for total angular momentum, is parallel to the magnetic field vector (i.e., the magnetic reference system) into the system in which it is parallel to the local vertical (i.e., the reference system of the problem). This rotation is given by R_{B} = (0, −θ_{B}, −χ_{B}), where θ_{B} and χ_{B} are the Euler angles, illustrated in Fig. 1. The expressions for the geometrical tensors (i, Ω), which in Eqs. (6a) and (6b) are given in the reference system of the problem, can be found in Sect. 5.11 of LL04.
Fig. 1. Righthanded Cartesian coordinate system considered in the problem. The Zaxis is taken parallel to the local vertical. The direction toward the observer, or line of sight (LOS), is contained in the X–Z plane and is therefore determined solely by its inclination with the local vertical θ. The direction of the magnetic field is specified by its inclination θ_{B} and azimuth χ_{B}. 
The functions H and L are the Voigt profile and the associated dispersion profile, respectively. We have also introduced the reduced frequency u and the reduced frequency shift u_{juMu, jℓMℓ}, for the transition between the upper state j_{u}M_{u}⟩ and the lower state j_{ℓ}M_{ℓ}⟩, as
where ν_{0} is a reference frequency taken equal to the baricenter of all transitions between the upper and lower states. The Doppler widths in frequency and wavelength units are given as Δν_{D} and Δλ_{D}, respectively, and their expressions can be found in Appendix C.2. The damping constant a introduced in Eqs. (6a) and (6b) depends on the Doppler width and its expression can be found in the same Appendix. The frequencyintegrated absorption coefficient k_{M} entering the expressions for and above is given by
where c has the usual meaning of speed of light, N_{ℓ} is the population of the lower term, and A_{uℓ} = A(β_{u}L_{u}S → β_{ℓ}L_{ℓ}S) is the Einstein coefficient for spontaneous emission from the upper to the lower term.
2.4. Emission coefficients for a twoterm atom
The line emission coefficients – also referred to as emissivities or the components of the emission vector – directly depend on the populations and quantum coherence between the various states of the upper term. These quantities, as well as N_{ℓ} (see Sect. 2.3), can be determined through the statistical equilibrium equations, which usually require a numerical solution. However, in certain cases there exists a closed analytical solution, for instance when considering the twoterm atomic model with an unpolarized lower term. In these cases, the line emission coefficients can be related to the incoming radiation field through the redistribution matrix (Domke & Hubeny 1988; Bommier 1997b) according to
We follow the convention that the primed and unprimed quantities refer to the incident and scattered radiation, respectively. The quantity is the thermal contribution, which arises from collisionally excited atoms. Throughout this work we assume collisions to be isotropic and neglect the influence of the magnetic field on this contribution. Thus, we take it to be equal to the term appearing in the last line of Eq. (68) in Belluzzi et al. (2013). This implies that only the Stokes I component receives a nonzero contribution.
The first term in the right hand side of Eq. (8) describes the contribution to the emission vector from scattering processes. The redistribution matrix element [ℛ(ν′,Ω′,ν, Ω)]_{ij} relates the jth Stokes parameter of the radiation at frequency ν′ and in propagation direction Ω′ that illuminates the atom to the emissivity in the ith Stokes parameter at frequency ν and in direction Ω.
We consider the redistribution matrix presented in Bommier (2018), which is suitable for a twoterm atom with an unpolarized and infinitely sharp lower term. This redistribution matrix allows accounting for the frequency redistribution effects of elastic collisions and the impact of a magnetic field of an arbitrary strength and orientation. Its expression can be separated into two matrices, generally indicated as ℛ_{II} and ℛ_{III}, following the notation introduced by Hummer (1962). The matrix ℛ_{II} characterizes the scattering processes that are coherent in the atomic frame and ℛ_{III} characterizes those that are fully noncoherent (i.e., the frequencies of incoming and scattered radiation are uncorrelated) in the atomic frame, due to the redistribution effect of elastic collisions. In the observer’s frame, Doppler redistribution induces a complex coupling between the angular and frequency dependencies of these matrices. In this work we consider the angleaveraged approximation (Rees & Saliba 1982) for the processes quantified by ℛ_{II} and the approximation that CRD occurs in the observer’s reference frame for those quantified by ℛ_{III} (see Sect. 10.3 of Hubeny & Mihalas 2015). Under such approximations, the expressions of both matrices in the observer’s frame can be decomposed into frequency and angledependent components. Working in the formalism of the irreducible spherical tensors for polarimetry (see Sect. 5.11 of LL04) we can write
where X = {II,III} and K_{min} = min(K, K′). We consider the approximation for ℛ_{III} to be suitable for modeling the scattering polarization of the strong resonance lines considered in this work (e.g., Sampoorna et al. 2017), for which the contribution from ℛ_{II} is substantially greater. The emergent radiation in the line core region originates from atmospheric depths where the density is low and only a small fraction of scattering processes are perturbed by elastic collisions. Moreover, although the wing photons originate from deeper regions of higher density, it can be shown that the largeamplitude wing scattering polarization signals mainly arise from processes that are not perturbed by elastic collisions (see Alsina Ballester et al. 2018). The frequencydependent components of ℛ_{II} and ℛ_{III} are given by
and
The analogous expressions for atomic systems with HFS can be found in Appendix C.4. The function W(a, x) = H(a, x)+i L(a, x) can be equivalently expressed in terms of the complex variable z = x + i a; it is a complex analytical function related to the complementary error function (e.g., Sect. 5.4 of LL04). We also introduce the reduced frequency splittings between states pertaining to the same term^{4}
The quantities 𝒜 entering Eqs. (10) and (11) depend on a series of quantum numbers specific to each atomic state. Their expressions can be found in Eq. (C.19). The line broadening constants due to radiative processes (Γ_{R}) and to elastic (Γ_{E}) and inelastic (Γ_{I}) collisions have also been introduced in the previous equations. In this work, these constants are determined as explained in Appendix A. In the reference system of the problem the angledependent part of the redistribution matrix in Eq. (9) is given as
For clarity, we hereafter refer to the calculations that rely on the expressions presented in this subsection without any additional approximations as reference PRD calculations.
2.5. Continuum contribution to radiative transfer coefficients
Under conditions encountered in the solar atmosphere, it is generally a good approximation to neglect the continuum contribution to the offdiagonal elements of the propagation matrix (see Sect. 9.1 of LL04). The continuum contribution to the absorption coefficient is given by
where κ_{c} is the extinction coefficient due to thermal processes, or “true” absorption, and σ_{c} is the extinction coefficient due to continuum scattering. For the latter, we account for contributions from Rayleigh scattering due to neutral hydrogen and helium atoms and from Thomson scattering due to free electrons (e.g., Trujillo Bueno & Shchukina 2009).
The emission coefficient also receives a contribution from continuum processes, which can be decomposed into a scattering term and a thermal term, or . The scattering term is given by
where are the multipolar components of the radiation field tensor (see Sect. 5.11 of LL04)
2.6. The iterative scheme
The general nonLTE problem consists in finding a selfconsistent solution of the RTE, which yields the Stokes vector at all spatial points, frequencies, and directions (see Eq. (1)), and of the statistical equilibrium equations, from which the coefficients of the RTE are obtained. Efficient operatorsplitting iterative methods exist to solve this problem, both in the absence (e.g., Cannon 1973; Olson et al. 1986; Trujillo Bueno & Fabiani Bendicho 1995) and in the presence (e.g., FaurobertScholl et al. 1997; Nagendra et al. 1998; Trujillo Bueno & Manso Sainz 1999) of polarization. Reviews on such methods can be found in Hubeny (1992), Nagendra et al. (2003), and Trujillo Bueno et al. (2003). More recently, iterative approaches based on Krylov methods, which could yield better performances than the aforementioned operatorsplitting methods, have been proposed (e.g., Paletou & Anterrieu 2009; Anusha et al. 2009; Benedusi et al. 2021).
In our iterative approach the population of the lower term 𝒩_{ℓ} (needed to calculate the frequencyintegrated absorption coefficient k_{M} of Eq. (7)) is kept fixed. We generally obtain it from a selfconsistent multilevel calculation in the unpolarized case using the RH code of Uitenbroek (2001). Hereafter, we refer to this part of the calculation as step 1. This step also provides the continuum quantities κ_{c}, σ_{c}, and ε^{c, th}, the rates of both elastic and inelastic collisions, and an initial estimate for the unpolarized radiation field. We point out that, in principle, these quantities could be obtained from other sources. For instance the population for the lower term of the H I Lymanα line (see Appendix B) can be taken directly from the considered atmospheric model.
Once the input quantities are obtained, we iteratively solve the RT problem in the polarized case for a twoterm atomic model. We refer to this as step 2 (or the main part) of the calculation, for which we use the RT code that we developed through the implementation of the expressions introduced above. This step relies on the approximation that N_{ℓ} is kept fixed^{5} during the iterative process. Although this strategy is not fully consistent, it gives a population of the lower term that is much more realistic than the one that would be obtained from a twoterm atomic model. Furthermore, by fixing the lower level population the elements of the propagation matrix are known a priori and the considered RT problem is linear.
The step2 nonLTE problem thus consists in finding a selfconsistent solution of Eqs. (1) and (8), with the latter equation relating the line emission coefficient to the incident radiation. The considered Jacobibased iterative method represents a generalization of the approach presented in Alsina Ballester et al. (2017) to the case of a twoterm atomic model. The RTE is solved through the DELOPAR shortcharacteristics formal solver of Trujillo Bueno et al. (2003). Formal solvers of the Diagonal Element Linear Operator (DELO) family are nowadays a popular choice for solving RT problems accounting for polarization (e.g., Alsina Ballester et al. 2017; Sampoorna et al. 2017; de la Cruz Rodríguez et al. 2019) because they can account for the action of the various elements of the propagation matrix in a straightforward manner. Compared to other frequently used methods, such as highorder RungeKutta solvers, DELO solvers are particularly well suited to avoiding potential numerical instabilities (see Janett & Paganini 2018).
We study the convergence of the iterative procedure in step 2 by introducing the following decomposition of the line scattering contribution to the emission coefficients
At a given iteration, the maximum relative change of the components, over all spatial and frequency points, is
where the labels “new” and “old” refer to the values of the component at the current and previous iteration, respectively.
In the applications presented below, convergence is considered to have been achieved when the maximum relative change for the component with K = Q = 0 falls below a predetermined value. The most computationally demanding task in this RT problem is the evaluation of the redistribution matrix, which is calculated at the first iteration and then stored. Subsequent iterations therefore entail a far lower computational cost. This justifies our choice to take the very strict convergence criterion of , despite that it calls for more iterations than if a higher, but still acceptable, threshold value were taken. For the reference PRD calculations, we also impose that in order for convergence to be achieved. Due to the possible presence of oscillations in during the initial iterations, these convergence criteria are only applied when more than 30 iterations have been performed. When convergence is reached, the Stokes profiles for the emergent radiation are obtained by solving the RTE for a predetermined set of lines of sight (LOS) and, finally, the results are stored.
3. Illustrative results for the Mg II doublet
In this section we present a series of calculations carried out with the RT code described above. We also quantitatively evaluate the suitability of several approximations of interest for modeling the scattering polarization in the wings of the Mg IIh & k lines. We have modeled these resonance lines considering a twoterm atomic system with an infinitely sharp and unpolarized lower term without HFS. A discussion on the suitability of a twoterm atom and further details of this modeling are presented in Appendix A. The analogous study considering the H I Lymanα line is shown in Appendix B.
We recall that, in all the RT calculations considered in this section, the approximation of CRD in the reference frame of the observer is made for ℛ_{III}. We refer to the calculations considering the angleaveraged ℛ_{II}, without making the approximations described in Sects. 3.1 and 3.2, as reference PRD calculations.
For all calculations, the semiempirical 1D atmospheric model C of Fontenla et al. (1993), hereafter FALC, is considered. For the figures presented below we consider an LOS with cos θ = 0.1, where θ is the inclination with respect to the local vertical (see Fig. 1). We selected an LOS with a large inclination in order to study scattering polarization signals with large amplitudes. Throughout this work, the reference direction for positive Stokes Q is taken parallel to the limb. When present, magnetic fields are taken to be horizontal (θ_{B} = 90°) with azimuth χ_{B} = 0° (i.e., parallel to the Xaxis in Fig. 1) and with a strength of 20 G at all spatial grid points of the problem.
We focus our initial discussion on the results of the reference PRD calculations in the absence of a magnetic field. The intensity and linear polarization (Q/I) profiles obtained from these calculations are represented by the black curves in Fig. 2, for the two spectral intervals that will be considered throughout this section, given in vacuum wavelengths. The wider of the two intervals was selected to highlight the farwing behavior of the doublet and ranges from ∼75 Å to the blue of the k line center to ∼75 Å to the red of the h line center. The narrower one focuses on the behavior close to the core region of the lines and corresponds almost exactly to the spectral interval covered by the spectrograph of CLASP2 (Ishikawa et al. 2021), bounded between ∼3.3 Å to the blue of the k line center and ∼3.3 Å to the red of the h line center. We verified the accuracy of these calculations by comparing the results with those of existing codes; the results close to the core region of the k line agree with those obtained with the twolevel code introduced in Alsina Ballester et al. (2017) and, in the entire interval considered in this work, they coincide with the results obtained with the twoterm code that was used in del Pino Alemán et al. (2016, 2018).
Fig. 2. Stokes I (upper panels) and Q/I (lower panels) profiles as a function of wavelength for the Mg IIh & k lines for the wider (left panels) and narrower (right panels) spectral intervals discussed in the text. Vacuum wavelengths are considered for all figures. The calculations were carried out in the absence of a magnetic field. The solid black curves correspond to the reference PRD calculations (see text), whereas the solid red curves represent the results of calculations taking the approximate redistribution matrix (see text), in which scattering processes are treated as coherent in the reference frame of the observer. The shaded areas in the figures of this section are centered around the h & k lines, have a width of 1.6 Å, and indicate the spectral region where this approximation is not expected to be suitable. For all the figures presented in this section, the calculations are carried out considering the atmospheric model C of Fontenla et al. (1993). All profiles are presented for an LOS with μ = 0.1 and taking the direction for positive Stokes Q parallel to the limb. 
In the intensity profiles, when going from the far wings into the core of either line, we find a deep absorption feature where the values become roughly one order of magnitude smaller than those of the far wings. In the region between the two lines, where their extended wings overlap, the intensity is also much lower than in the far wings. On the other hand, emission peaks are found closer to the center of the two lines. The k line in particular presents two peaks (k_{2}) that reach an intensity greater than that in the far wings. Regarding the scattering polarization, we find farwing signals with substantial amplitudes, which are known to be strongly influenced by Jstate interference (Belluzzi & Trujillo Bueno 2012). Closer to the core of the two lines, where the absorption features are appreciable in intensity, the Q/I signals fall below the continuum levels. Also in agreement with Belluzzi & Trujillo Bueno (2012), we observe a triplepeak structure around the k line with a positive peak in the center and negative peaks in the near wings, an antisymmetric profile around the h line, and a negative feature between them.
It must be acknowledged that the intensity and polarization patterns of strong resonance lines are strongly influenced by parameters including the microturbulent velocity and the van der Waals (vdW) broadening, which is related to Γ_{E}. The clear impact of enhancements of the microturbulent velocity and the vdW broadening in the intensity wings of the Mg II resonance lines is illustrated in Fig. 4 of Milkey & Mihalas (1974). The researcher interested in modeling spectropolarimetric observations such as those of the CLASP2 missions should pay special attention to the selection of these parameters. However, for the main purpose of this work – namely to study the reliability of a number of approximations through comparisons with the reference PRD calculations – we find it reasonable to take the microturbulent velocities that were determined semiempirically as specified in Fontenla et al. (1991) and to calculate the vdW broadening as discussed in Appendix A without any enhancements.
In Sects. 3.1 through 3.3 we introduce the approximations investigated throughout this work and evaluate their suitability. In Sect. 3.4, we analyze the influence of the branching ratios, especially those that enter the terms of the redistribution matrix that quantify the interference between different upper states.
3.1. Coherent scattering in the observer’s frame for ℛ_{II}
In this subsection we investigate an approximation that is applied to the scattering processes that are unperturbed by elastic collisions, quantified by ℛ_{II}. In particular, we treat such processes as coherent in the reference frame of the observer rather than in that of the atom. In other words, Doppler redistribution is neglected and as a result no frequencyangle coupling is introduced in the ensuing approximate redistribution matrix, which we hereafter refer to as , and whose expression can be found in Eq. (C.20). We note that we do not neglect the redistribution due to elastic collisions and, for the corresponding scattering processes (quantified by ℛ_{III}), we still make the assumption that CRD occurs in the reference frame of the observer (see Sect. 2.4). The proposed approximation greatly reduces the numerical cost of computing the contribution of ℛ_{II} to the emissivity, which is the most computationally intensive contribution for the reference PRD calculations. The contribution from to the emission coefficient at any given frequency only requires accounting for the incident radiation at a small number of spectral points determined by the emission frequency and by the energy differences between the initial and final lower states. For the considered atomic system, whose lower term only has one FS level, these energy differences only arise in the presence of magnetic fields (see Eq. (C.20)).
The impact of this approximation, relative to the reference PRD calculations, can be seen in the Stokes profiles shown in Fig. 2. The shaded regions in the figure span 0.8 Å from the center of the h & k lines, which corresponds to their Doppler width Δλ_{D} at the height for which their linecenter τ is equal to unity for μ = 0.1 in the FALC model. Within these spectral regions, Doppler redistribution plays a dominant role (e.g., Thomas 1957), and thus the approximation discussed here should not be expected to be suitable. The error incurred by this approximation is only appreciable well within the shaded areas and no farther than 0.5 Å from the center of the h and k lines, both in intensity and Q/I. Far from the shaded core regions of these lines, an excellent agreement is found between the results of this approximation and reference PRD calculations.
We have also evaluated the suitability of using the approximate in the presence of a 20 G horizontal magnetic field. The comparison between the Q/I and U/I profiles obtained under this approximation and through the reference PRD calculations is shown in Fig. 3. In the presence of a 20 G magnetic field, the approximation is also found to be suitable beyond 0.5 Å from the center of the lines of the magnesium doublet. The intensity profiles are not shown in this figure because they are not meaningfully impacted by fields of such strength and coincide with those shown in Fig. 2.
Fig. 3. Stokes Q/I (upper panels) and U/I (lower panels) profiles as a function of wavelength. The black and red curves represent calculations similar to those presented in Fig. 2, but in the presence of 20 G horizontal (θ_{B} = 90°) magnetic fields with χ_{B} = 0°. 
3.2. The treatment of noncoherent scattering processes
The approximation analyzed in the previous subsection performs very well for modeling the intensity and scattering polarization signals beyond a Doppler width from the centers of the Mg IIh & k lines. In addition, it allows for a considerable decrease in the overall computational cost of the nonLTE RT calculations. Under this approximation, the contribution from the redistribution matrix may no longer be the most computationally intensive part of the emissivity calculation. In this case, it may be of interest to reduce the computational cost of the contribution from ℛ_{III}, which quantifies the scattering processes that are noncoherent due to collisions.
First we discuss the influence of artificially setting to zero all the frequencydependent components of ℛ_{III} (see Eq. (9)) except for K = K′=Q = 0, which typically represents by far the greatest contribution to ε_{I} but has no impact on the other Stokes components of the emission vector. Under this approximation, we calculated the intensity and Q/I profiles both using ℛ_{II} and the approximate . The profiles obtained through these calculations, which were carried out in the absence of a magnetic field, fully coincide with the corresponding ones shown in Fig. 2, in which all components of ℛ_{III} were considered. Although the scattering processes quantified by ℛ_{III} have a direct impact on the intensity profile^{6}, these comparisons reveal that the same processes only affect the wings of the scattering polarization profile indirectly, by reducing the contribution from the coherent scattering processes through a decrease in the branching ratios in ℛ_{II} or (see also the discussion in Alsina Ballester et al. 2018, which is focused on the Ca I resonance line at 4227 Å). For the rest of the calculations presented in this section, all the components of ℛ_{III} are taken into account unless otherwise noted.
A further consequence of this finding is that the scattering polarization profiles are not sensitive to the depolarizing effect of the collisions responsible for noncoherent scattering. In the absence of magnetic fields, the code used in this work can also take into account the depolarizing effect of the collisions that induce transitions between states of the same FS level (see Eq. (C.21)). We verified that the inclusion of depolarizing collisional rates, computed as detailed in the Appendix of Manso Sainz et al. (2014), has no appreciable impact on the scattering polarization profile compared to the case in which they are neglected.
When considering scenarios that are especially demanding from the numerical point of view, such as 3D radiative transfer, it may be of interest to further reduce the cost of computing the emissivity. We now go a step beyond the previous approximations and neglect the frequency redistribution due to both the Doppler effect and elastic collisions, so that all scattering process are treated as coherent in the observer’s frame and are thus quantified by . In the numerical framework presented in this work, this can achieved simply by setting to zero the line broadening constant due to elastic collisions Γ_{E} that enters the branching ratios of the redistribution matrices (see Eq. (C.20)). Following this approach, the contribution from Γ_{E} should also be neglected in the computation of the damping constant. Otherwise an inconsistency is introduced because the magnetic splitting in the emission profiles is no longer fully canceled by the denominators of the branching ratios (see Appendix C.5), which results in an artificial magnetic sensitivity in the far wings (see Appendix B of Alsina Ballester et al. 2018). In the following subsection, an approximation through which this spurious sensitivity can be avoided will be discussed.
Because the contribution from ℛ_{III} is effectively zero in this case, the entire emission vector at any given frequency can be computed accounting only for the radiation field at the small number of frequency points discussed in Sect. 3.1, which thus allows for an even lighter calculation. The intensity and Q/I profiles obtained in the absence of magnetic fields following this approach, both accounting for the contribution from Γ_{E} to a and neglecting it, are shown in Fig. 4, where they are also compared to the reference PRD calculations. Both in the near and far wings, a better agreement is found when accounting for the contribution from elastic collisions to the damping constant.
Fig. 4. Stokes I (upper panels) and Q/I (lower panels) profiles as a function of wavelength obtained through the RT calculations described in the text, in the absence of a magnetic field. Reference PRD calculations (black curves) are compared to those in which Doppler and collisional redistribution are neglected in scattering processes (see text), both accounting for the contribution from elastic collisions to the damping constant (blue curves) and neglecting it (red curves). The vertical dashed colored lines indicate the spectral positions discussed in the main text, namely 2.2 Å to the blue of the k line center (blue), equidistant between the k and h line centers (green), and 2.2 Å to the red of the h line center (red). 
At wing wavelengths roughly 10 Å from the center of either line, the reference PRD results are reproduced reasonably well when the contribution of elastic collisions to the damping constant is taken into account, although the intensity and the Q/I signals are slightly overestimated. The agreement is significantly worse when neglecting this contribution, in which case the approximate calculation further overestimates the intensity signal and substantially overestimates the Q/I amplitude.
Closer to the center of the lines, we do not find a good agreement with the reference PRD intensity profile until going farther than 1 Å into the wings, in contrast to the results obtained when the redistribution effects of elastic collisions were taken into account (see Sect. 3.1). In the spectral region a few Å from the center of the h or k lines, the inclusion of Γ_{E} in the damping constant yields a better agreement for both intensity and Q/I, although the disparity between calculations including and neglecting this contribution is not as great as in regions farther into the wings. In the regions roughly 2.2 Å to the blue of the k line center, 2.2 Å to the red of the h line center, and between the two lines of the doublet close to 2800 Å (indicated with vertical colored lines in Fig. 4), the intensity is slightly underestimated when including Γ_{E} in a and slightly overestimated when neglecting it. The amplitude of the Q/I signal is overestimated in these regions, especially when the damping constant does not include the contribution from elastic collisions.
3.3. Neglecting the magnetic field in the redistribution matrix
Here we investigate an approximation for modeling the scattering polarization signals in the wings of the aforementioned lines that is focused specifically on the treatment of magnetic fields. For field strengths typical of quiet regions of the solar atmosphere, theoretical arguments support that the line scattering emission coefficients should not be sensitive to the magnetic field for wavelengths outside the core regions (see Sect. 10.4 of LL04; also Appendix B of Alsina Ballester et al. 2018). Outside the line core, we thus expect the magnetic sensitivity of the linear polarization pattern to be controlled only by the elements of the propagation matrix and particularly by the ρ_{V} coefficient, which quantifies Faraday rotation. If the influence of the magnetic field is neglected in the redistribution matrices, many of the energy states of the atomic system remain degenerate. In this case, far fewer transitions need to be considered (see the expressions in Eq. (C.21)), which considerably reduces the cost of computing the emission vector. We recall that this is usually the most costly computation in the considered RT problem; reducing their complexity would thus bring down the overall computational requirements.
To study the suitability of this approximation for modeling the scattering polarization signals in the line wings, we have carried out a series of RT calculations in the presence of 20 G horizontal magnetic fields. The four Stokes profiles are shown in Fig. 5, comparing the results obtained when the magnetic splitting is (i) taken into account in all the RT coefficients (represented by the black curves), (ii) neglected in the emission coefficients but taken into account in all elements of the propagation matrix K (red curves), and (iii) only accounted for in the computation of the η_{I} and ρ_{V} coefficients (blue curves). Because we are considering an atomic system with an unpolarized lower term, in case (iii) all elements of K other than η_{I} and ρ_{V} are zero (see Eq. (6)). As expected, these approximations are not suitable to model the circular polarization signals found close to the center of h and k, because the Stokes V component of the emissivity is sensitive to the presence of the magnetic field through the Zeeman effect. In addition, the Stokes V/I signals of the emergent radiation are shown to be strongly impacted by the dichroism effects quantified by η_{V}.
Fig. 5. Intensity (upper left panel), V/I (upper right panel), Q/I (lower left panel), and U/I (lower right panel) profiles of the Mg IIh & k lines as a function of wavelength. The various colored curves show the results of reference PRD calculations in which the impact of the magnetic field is fully taken into account in all RT coefficients (black curves), neglected only in the computation of the emission coefficient (red curves), and only taken into account in η_{I} and ρ_{V} (blue curves). The magnetic field is horizontal, with χ_{B} = 0° and a strength of 20 G. 
In any case, these calculations firmly establish that, for the strong resonance lines considered here, the magnetic sensitivity of the wing linear polarization profiles can be well reproduced by accounting for the magnetic splitting only in ρ_{V} and η_{I} and neglecting it in all other RT coefficients entering Eq. (1). The figure only shows the results in the narrower of the spectral ranges discussed above, but we verified that this approximation is also perfectly suitable for the scattering polarization signals farther from the line wings. We also verified that this approximation performs similarly well when considering magnetic fields with different orientations or with field strengths up to one order of magnitude larger than the ones considered here. On the other hand, when neglecting the magnetic splitting in the calculation of the emissivity but taking it into account in all elements of the propagation matrix, slight errors are incurred in the intensities and linear polarization signals in the near wings of both lines. We attribute these errors to accounting for the circular polarization dichroism term η_{V} while neglecting the emission in circular polarization ε_{V} (a more indepth discussion in the context of the Lymanα line can be found in Appendix B). Thus, researchers interested in modeling the wing scattering polarization are recommended to account for the magnetic splitting only in η_{I} and ρ_{V} when making the approximation of neglecting it in the emission coefficient.
This approximation can be used in combination with the ones discussed in previous subsections, allowing for a further decrease in the computational cost of the RT calculation. Indeed, we have carried out identical calculations to the ones presented in this subsection, but neglecting Doppler redistribution for the scattering processes quantified by ℛ_{II} (i.e., considering ) as in Sect. 3.1. The results are not shown in the present paper, but we verified that the scattering polarization signals in the wings are also well reproduced by only accounting for the ρ_{V} and η_{I} coefficients in this case, confirming the suitability of combining the two approximations.
We also considered combining the approximation of accounting for the magnetic splitting only in ρ_{V} and η_{I} with that of neglecting Doppler and collisional redistribution (see Sect. 3.2). In this case the artificial magnetic sensitivity produced when including the contribution from elastic collisions to the damping constant while neglecting it in the branching ratios of the redistribution matrices is of course avoided. The comparison between the scattering polarization profiles obtained under these approximations and through the reference PRD calculations while fully accounting for the magnetic field is shown in Fig. 6 for a 20 G horizontal magnetic field. The level of agreement is similar to that of the nonmagnetic case discussed in Sect. 3.2. Again, the approximation of neglecting Doppler and collisional redistributions performs considerably better when accounting for the contribution from Γ_{E} to the damping constant.
Fig. 6. Stokes Q/I (upper panels) and U/I (lower panels) profiles as a function of wavelength obtained from RT calculations in the presence of a 20 G magnetic field. Reference PRD calculations accounting for the magnetic field in all RT coefficients (black curves) are compared to those in which Doppler and collisional redistribution are neglected in scattering processes while the magnetic splitting is only accounted for in η_{I} and ρ_{V} (see text), both including the contribution from elastic collisions in the damping constant (blue curves) and neglecting it (red curves). 
3.4. The influence of the branching ratios in PRD modeling
As noted above, the redistribution matrices used for the reference PRD calculations (see Eqs. (10) and (11)) were derived from the rigorous theoretical framework presented in Bommier (2017). RT calculations in the polarized case for a twoterm atom had already been considered in the past, for instance by Belluzzi & Trujillo Bueno (2012, 2014) in the absence of magnetic fields. These authors used a heuristic ℛ_{III}, as well as heuristic branching ratios. The RT code introduced in the present paper can consider the latter through the implementation of the expressions given in Eq. (C.23). More details can be found in Appendix C.8. We verified numerically that we can reproduce the intensity and linear polarization profiles of the Mg II doublet obtained by Belluzzi & Trujillo Bueno (2012). The main difference between the redistribution matrices for the reference PRD calculations and those given in Eq. (C.23) is found in the branching ratios of the terms that quantify the interference between different states of the upper level, which contain an imaginary quantity that is proportional to the energy difference of such states.
We now quantitatively evaluate the error introduced in the RT calculations following the approach of Belluzzi & Trujillo Bueno (2012, 2014), by comparing with the reference PRD solutions. The intensity profiles do not change appreciably, and thus are not shown. However, we find a clear difference in the Q/I profiles, as shown in Fig. 7. This is especially apparent in the far wings of the lines, in which the amplitude of the scattering polarization signals is strongly enhanced by the quantum interference between the upper FS levels of the atomic system. As such, these farwing signals are the most strongly impacted by the branching ratios of the interference terms. Within the narrower spectral interval that represents the range covered by the spectrograph of CLASP2, the two calculations present a much better agreement. Indeed, slight errors are appreciable only close to the blue and red boundaries of the interval and in the negative trough between the two lines, where Jstate interference is known to play a key role.
Fig. 7. Q/I profiles as a function of wavelength obtained from PRD calculations in the absence of a magnetic field, considering the wider (left panel) and narrower (right panel) spectral ranges discussed in the text. The black and red curves represent, respectively, the calculations carried out using the redistribution matrices given in Bommier (2017) and those given in Eq. (C.23), for which the main difference concerns the branching ratios. 
4. Conclusions
In this work we have presented the numerical approach that we have applied to develop a nonLTE RT code for modeling the intensity and polarization of resonance lines. It is based on the theoretical framework presented in Bommier (2017, 2018) and represents an extension to the numerical approach of Alsina Ballester et al. (2017). It is suitable to investigate spectral lines arising from a twoterm atomic system including HFS, and it allows one to jointly account for the effects of PRD, Jstate interference, and the presence of magnetic fields of an arbitrary strength and orientation. An optimized version of this code will be made publicly available in the near future.
We applied this RT code to the Mg II doublet and the H I Lymanα line, which are strong resonance lines of interest for diagnostics of magnetic fields in the outer solar atmosphere. Through such RT calculations, we analyzed the reliability of a number of approximations for modeling the wings of the intensity and linear polarization profiles of strong resonance lines at a reduced computational cost, which would be particularly useful for the numerically intensive case of 3D radiative transfer. The suitability of such approximations for the Mg II doublet is studied in the main body of the paper, and the details of the analogous investigation applied to the stronger H I Lymanα line can be found in Appendix B. The approximations we considered are the following.

Doppler redistribution is neglected in coherent scattering processes and the approximate redistribution matrix is used. In the Mg IIh & k lines, this approximation is found to be suitable for modeling the intensity and linear polarization wings at spectral distances larger than a Doppler width from their centers. For the stronger H I Lymanα line, we find that this approximation is suitable outside the core region, but it only yields a perfect agreement in the far wings.

Only the intensity component of the emission vector receives a contribution from ℛ_{III}, in which all components other than K = K′=Q = 0 are neglected. We verified that the other components of ℛ_{III} (i.e., the matrix that quantifies the scattering processes perturbed by elastic collisions) do not appreciably contribute to either the intensity or the scattering polarization profiles of the considered lines, which indicates that this is a very good approximation. Relatedly, even when accounting for all components of ℛ_{III}, the same profiles are found to be insensitive to the depolarizing effect of collisions.

The redistribution due to both the Doppler effect and elastic collisions is neglected. This approximation builds upon the one listed above for , but making the stronger assumption that all scattering processes are coherent in the observer’s frame, which allows for a further decrease in the computational cost. The I and Q/I profiles obtained in the wings of the Mg IIh & k lines represent a rough yet suitable approximation of the reference PRD calculations, provided that the contribution from elastic collisions is included in the damping constant. This approximation is not suitable for reproducing the wings of the H I Lymanα line because it cannot account for the influence of the strong emission peak in the line core via redistribution effects. Moreover, accounting for elastic collisions in the damping constant, while neglecting them in the branching ratios of the redistribution matrices, could in principle produce an artificial magnetic sensitivity in the emission coefficient, which would be appreciable in the wing linear polarization pattern.

The magnetic splitting is neglected in the computation of the emissivity. This allows for a significant reduction in the computational cost of the overall problem. By accounting for the magnetic splitting in only the η_{I} and ρ_{V} coefficients of the propagation matrix, the scattering polarization wing profiles can be reproduced remarkably well, although we find that additionally accounting for the η_{V} dichroism term introduces some spurious magnetic sensitivity, especially in the H I Lymanα line. This approximation can be used in combination with the others studied in this work, allowing for a further reduction in the computational cost. Indeed, this approximation allows one to avoid the artificial magnetic sensitivity arising in the emission coefficient discussed in the previous point.
The numerical approach and the resulting RT code presented in this article allow for valuable investigations regarding the polarization of other solar spectral lines of diagnostic interest. For instance, it was already used to account for all the relevant physics required to model the enigmatic linear polarization observed in the core of the sodium D_{1} line, which provides a satisfactory explanation for the appearance of this signal in the magnetized solar chromosphere (Alsina Ballester et al. 2021). Another ongoing investigation studies which physical processes are relevant in shaping the scattering polarization signals of the K I D_{1} (at 7698.96 Å) and D_{2} (at 7664.90 Å) lines, which the third flight of the SUNRISE mission aims to observe. In another forthcoming publication, RT calculations using the same code will be carried out to further investigate the wing scattering polarization signals of the H I Lymanα line by modeling their frequencyintegrated signals and their magnetic sensitivity. These results will provide valuable insights regarding the filterpolarimetric observations obtained with the CLASP missions and, thereby, the inference of magnetic fields in the solar chromosphere.
These expressions were already introduced in Eqs. (9)–(12) of Alsina Ballester et al. (2019), where the order of the j_{u}M_{u} and j_{ℓ}M_{ℓ} was unintentionally inverted in the definition of the transition strength. Despite this change in definition, all the expressions therein remain correct.
The only fine structure level of the lower term has total angular momentum J = 1/2, and therefore cannot carry atomic alignment by definition. We recall that a given fine structure level is said to be oriented when there are population imbalances between two given sublevels with magnetic quantum numbers M and −M and aligned when population imbalances exist between sublevels with different M. Atomic orientation and alignment contribute, respectively, to the circular and linear polarization signals produced via scattering processes.
Acknowledgments
We thank Petr Heinzel (Astronomical Institute, ASCR) for carefully reading the manuscript and for constructive suggestions. We acknowledge the funding received from the Swiss National Science Foundation (SNSF) through Grant 200021_175997 and from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (ERC Advanced Grant agreement No. 742265).
References
 Alsina Ballester, E., Belluzzi, L., & Trujillo Bueno, J. 2016, ApJ, 831, L15 [Google Scholar]
 Alsina Ballester, E., Belluzzi, L., & Trujillo Bueno, J. 2017, ApJ, 836, 6 [Google Scholar]
 Alsina Ballester, E., Belluzzi, L., & Trujillo Bueno, J. 2018, ApJ, 854, 150 [Google Scholar]
 Alsina Ballester, E., Belluzzi, L., & Trujillo Bueno, J. 2019, ApJ, 880, 85 [Google Scholar]
 Alsina Ballester, E., Belluzzi, L., & Trujillo Bueno, J. 2021, Phys. Rev. Lett., 127, 081101 [NASA ADS] [CrossRef] [Google Scholar]
 Anusha, L. S., Nagendra, K. N., Paletou, F., & Léger, L. 2009, ApJ, 704, 661 [NASA ADS] [CrossRef] [Google Scholar]
 Belluzzi, L., & Trujillo Bueno, J. 2011, ApJ, 743, 3 [NASA ADS] [CrossRef] [Google Scholar]
 Belluzzi, L., & Trujillo Bueno, J. 2012, ApJ, 750, L11 [NASA ADS] [CrossRef] [Google Scholar]
 Belluzzi, L., & Trujillo Bueno, J. 2014, A&A, 564, A16 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Belluzzi, L., Trujillo Bueno, J., & Štěpán, J. 2012, ApJ, 755, L2 [NASA ADS] [CrossRef] [Google Scholar]
 Belluzzi, L., Landi Degl’Innocenti, E., & Trujillo Bueno, J. 2013, A&A, 551, A84 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Benedusi, P., Janett, G., Belluzzi, L., & Krause, R. 2021, A&A, 655, A88 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Bommier, V. 1997a, A&A, 328, 706 [NASA ADS] [Google Scholar]
 Bommier, V. 1997b, A&A, 328, 726 [NASA ADS] [Google Scholar]
 Bommier, V. 2017, A&A, 607, A50 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Bommier, V. 2018, A&A, 619, C1 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Cannon, C. J. 1973, ApJ, 185, 621 [Google Scholar]
 Casini, R., & Degl’Innocenti, E. L. 2008, in Astrophysical Plasmas, Plasma Polarization Spectroscopy, eds. T. Fujimoto, & A. Iwamae (Berlin: Springer), Atom. Opt. Plasma Phys., 44, 247 [NASA ADS] [CrossRef] [Google Scholar]
 Casini, R., Landi Degl’Innocenti, M., Manso Sainz, R., Landi Degl’Innocenti, E., & Landolfi, M. 2014, ApJ, 791, 94 [NASA ADS] [CrossRef] [Google Scholar]
 Casini, R., del Pino Alemán, T., & Manso Sainz, R. 2017a, ApJ, 835, 114 [NASA ADS] [CrossRef] [Google Scholar]
 Casini, R., del Pino Alemán, T., & Manso Sainz, R. 2017b, ApJ, 848, 99 [NASA ADS] [CrossRef] [Google Scholar]
 Cooper, J., Ballagh, R. J., & Hubeny, I. 1989, ApJ, 344, 949 [NASA ADS] [CrossRef] [Google Scholar]
 de la Cruz Rodríguez, J., Leenaarts, J., Danilovic, S., & Uitenbroek, H. 2019, A&A, 623, A74 [Google Scholar]
 del Pino Alemán, T., Casini, R., & Manso Sainz, R. 2016, ApJ, 830, L24 [Google Scholar]
 del Pino Alemán, T., Trujillo Bueno, J., Štěpán, J., & Shchukina, N. 2018, ApJ, 863, 164 [CrossRef] [Google Scholar]
 del Pino Alemán, T., Trujillo Bueno, J., Casini, R., & Manso Sainz, R. 2020, ApJ, 891, 91 [CrossRef] [Google Scholar]
 Domke, H., & Hubeny, I. 1988, ApJ, 334, 527 [NASA ADS] [CrossRef] [Google Scholar]
 Dumont, S. 1967, Ann. d’Astrophys., 30, 861 [Google Scholar]
 FaurobertScholl, M., Frisch, H., & Nagendra, K. N. 1997, A&A, 322, 896 [NASA ADS] [Google Scholar]
 Fontenla, J. M., Avrett, E. H., & Loeser, R. 1991, ApJ, 377, 712 [NASA ADS] [CrossRef] [Google Scholar]
 Fontenla, J. M., Avrett, E. H., & Loeser, R. 1993, ApJ, 406, 319 [Google Scholar]
 Grevesse, N., & Anders, E. 1991, Solar element abundances (Tucson: University of Arizona Press), 1227 [Google Scholar]
 Hubeny, I. 1992, in The Atmospheres of EarlyType Stars, eds. U. Heber, & C. S. Jeffery (Berlin: Springer), Lecture Notes Phys. Ser., 401, 377 [NASA ADS] [Google Scholar]
 Hubeny, I., & Lites, B. W. 1995, ApJ, 455, 376 [NASA ADS] [CrossRef] [Google Scholar]
 Hubeny, I., & Mihalas, D. 2015, Theory of Stellar Atmospheres: An Introduction to Astrophysical Nonequilibrium Quantitative Spectroscopic Analysis (Princeton: Princeton University Press) [Google Scholar]
 Hummer, D. G. 1962, MNRAS, 125, 21 [Google Scholar]
 Ishikawa, R., Trujillo Bueno, J., del Pino Aleman, T., et al. 2021, Sci. Adv., 7, 8406 [NASA ADS] [CrossRef] [Google Scholar]
 Janett, G., & Paganini, A. 2018, ApJ, 857, 91 [Google Scholar]
 Janett, G., Carlin, E. S., Steiner, O., & Belluzzi, L. 2017, ApJ, 840, 107 [NASA ADS] [CrossRef] [Google Scholar]
 Kano, R., Trujillo Bueno, J., Winebarger, A., et al. 2017, ApJ, 839, L10 [NASA ADS] [CrossRef] [Google Scholar]
 Kramida, A., Ralchenko, Y., Reader, J., & NIST ASD Team. 2021, NIST Atomic Spectra Database (version 5.9), Gaithersburg, MD, National Institute of Standards and Technology [Online]. Available: https://physics.nist.gov/ [Google Scholar]
 Landi Degl’Innocenti, E., & Landolfi, M. 2004, Polarization in Spectral Lines (Dordrecht: Kluwer), 307 [Google Scholar]
 Landi Degl’Innocenti, E., Landi Degl’Innocenti, M., & Landolfi, M. 1997, in THEMIS Forum: Science with THEMIS, eds. N. Mein, & S. SahalBréchot (Paris: Observatoire de ParisMeudon), 59 [Google Scholar]
 Leenaarts, J., Pereira, T. M. D., Carlsson, M., Uitenbroek, H., & De Pontieu, B. 2013, ApJ, 772, 89 [NASA ADS] [CrossRef] [Google Scholar]
 Manso Sainz, R., Roncero, O., SanzSanz, C., et al. 2014, ApJ, 788, 118 [NASA ADS] [CrossRef] [Google Scholar]
 Milkey, R. W., & Mihalas, D. 1973a, Sol. Phys., 32, 361 [NASA ADS] [CrossRef] [Google Scholar]
 Milkey, R. W., & Mihalas, D. 1973b, ApJ, 185, 709 [NASA ADS] [CrossRef] [Google Scholar]
 Milkey, R. W., & Mihalas, D. 1974, ApJ, 192, 769 [NASA ADS] [CrossRef] [Google Scholar]
 Nagendra, K. N. 2003, in Stellar Atmosphere Modeling, eds. I. Hubeny, D. Mihalas, & K. Werner, ASP Conf. Ser., 288, 583 [NASA ADS] [Google Scholar]
 Nagendra, K. N., Frisch, H., & FaurobertScholl, M. 1998, A&A, 332, 610 [NASA ADS] [Google Scholar]
 Olson, G. L., Auer, L. H., & Buchler, J. R. 1986, J. Quant. Spectr. Rad. Transf., 35, 431 [Google Scholar]
 Paganini, A., Hashemi, B., Alsina Ballester, E., & Belluzzi, L. 2021, A&A, 645, A4 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Paletou, F., & Anterrieu, E. 2009, A&A, 507, 1815 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Pereira, T. M. D., Carlsson, M., De Pontieu, B., & Hansteen, V. 2015, ApJ, 806, 14 [NASA ADS] [CrossRef] [Google Scholar]
 Przybilla, N., & Butler, K. 2004, ApJ, 609, 1181 [NASA ADS] [CrossRef] [Google Scholar]
 Racah, G. 1942, Phys. Rev., 62, 438 [NASA ADS] [CrossRef] [Google Scholar]
 Rees, D. E., & Saliba, G. J. 1982, A&A, 115, 1 [NASA ADS] [Google Scholar]
 Sampoorna, M., Nagendra, K. N., & Stenflo, J. O. 2017, ApJ, 844, 97 [NASA ADS] [CrossRef] [Google Scholar]
 Sigut, T. A. A., & Pradhan, A. K. 1995, J. Phys. B At. Mol. Phys., 28, 4879 [NASA ADS] [CrossRef] [Google Scholar]
 Sowmya, K., Nagendra, K. N., Stenflo, J. O., & Sampoorna, M. 2014, ApJ, 786, 150 [NASA ADS] [CrossRef] [Google Scholar]
 Sowmya, K., Nagendra, K. N., Sampoorna, M., & Stenflo, J. O. 2015, ApJ, 814, 127 [NASA ADS] [CrossRef] [Google Scholar]
 Stenflo, J. 1994, Solar Magnetic Fields: Polarized Radiation Diagnostics (Dordrecht: Springer), 189 [CrossRef] [Google Scholar]
 Sutton, K. 1978, J. Quant. Spectr. Rad. Transf., 20, 333 [NASA ADS] [CrossRef] [Google Scholar]
 Thomas, R. N. 1957, ApJ, 125, 260 [NASA ADS] [CrossRef] [Google Scholar]
 Traving, G. 1960, Über die Theorie der Druckverbreiterung von Spektrallinien (Hamburg: Astronomische Gesellschaft) [Google Scholar]
 Trujillo Bueno, J. 2001, in Advanced Solar Polarimetry  Theory, Observation, and Instrumentation, ed. M. Sigwarth, ASP Conf. Ser., 236, 161 [NASA ADS] [Google Scholar]
 Trujillo Bueno, J. 2003, in Stellar Atmosphere Modeling, eds. I. Hubeny, D. Mihalas, & K. Werner, ASP Conf. Ser., 288, 551 [NASA ADS] [Google Scholar]
 Trujillo Bueno, J., & Fabiani Bendicho, P. 1995, ApJ, 455, 646 [NASA ADS] [CrossRef] [Google Scholar]
 Trujillo Bueno, J., & Manso Sainz, R. 1999, ApJ, 516, 436 [NASA ADS] [CrossRef] [Google Scholar]
 Trujillo Bueno, J., & Shchukina, N. 2009, ApJ, 694, 1364 [NASA ADS] [CrossRef] [Google Scholar]
 Trujillo Bueno, J., Štěpán, J., & Casini, R. 2011, ApJ, 738, L11 [NASA ADS] [CrossRef] [Google Scholar]
 Trujillo Bueno, J., Štěpán, J., & Belluzzi, L. 2012, ApJ, 746, L9 [NASA ADS] [CrossRef] [Google Scholar]
 Trujillo Bueno, J., Landi Degl’Innocenti, E., & Belluzzi, L. 2017, Space Sci. Rev., 210, 183 [CrossRef] [Google Scholar]
 Trujillo Bueno, J., Štěpán, J., Belluzzi, L., et al. 2018, ApJ, 866, L15 [NASA ADS] [CrossRef] [Google Scholar]
 Uitenbroek, H. 2001, ApJ, 557, 389 [Google Scholar]
 Unsöld, A. 1955, Physik der Sternatmosphären, mit besonderer Berücksichtigung der Sonne (Berlin: Springer) [Google Scholar]
 Vernazza, J. E., Avrett, E. H., & Loeser, R. 1973, ApJ, 184, 605 [NASA ADS] [CrossRef] [Google Scholar]
Appendix A: The atomic model for the Mg II h & k lines
The RT calculations for the Mg II doublet presented in this work were carried out numerically following the twostep approach described in Sect. 2.6. In step 1, which relies on the use of the RH code, we consider a relatively simple multilevel model for the Mg IIh & k lines that consists of 4 levels, namely the ground level of Mg II (which corresponds to the 3s ^{2}S term) and the upper levels of the h & k resonance lines (which belong to the 3p ^{2}P term), as well as the ground level of Mg III. The h & k lines are the only two line transitions considered by this model, for which PRD effects are taken into account (see Uitenbroek 2001). In addition, this model includes 3 continuum transitions. The results of Leenaarts et al. (2013) support the suitability of this model to calculate the ground level population of Mg II, which is the only population that is required as an input for step 2.
In step 2 the polarization of radiation and the magnetic field are taken into account. In this step the calculations are carried out using the numerical code described in Sect. 2. A twoterm atomic model with spin S = 1/2 is considered, in which the upper term has orbital angular momentum quantum number L = 1 and the lower term has L = 0. The lower term corresponds to the ground level of Mg II. Due to their long lifetime, the states pertaining to this term can be treated as infinitely sharp and, because of the impact of collisions on such longlived states, the atomic polarization of the term can be safely neglected.^{7}
Twoterm atoms were considered in prior works to model the intensity and polarization of the Mg II resonance lines (see Belluzzi & Trujillo Bueno 2012). In the past it was suggested that the inclusion of the 3d ^{2}D term in the atomic model could have an impact on the intensity profile of the h & k lines if a PRD treatment was made for the subordinate lines that couple this term to 3p ^{2}P (see Milkey & Mihalas 1974), although it was already established that this was not the case when the subordinate lines were modeled under CRD (Dumont 1967). Subsequent RT calculations by Pereira et al. (2015) confirmed that the same intensity profiles are obtained for the h & k lines whether PRD or CRD is considered for the subordinate lines. This makes a compelling case for the suitability of modeling the Mg IIh & k lines with a twoterm atomic system. Moreover, a comparison between the calculations for intensity and polarization considering a twoterm atomic model (see del Pino Alemán et al. 2016) and those considering a threeterm model (see del Pino Alemán et al. 2020) suggests that the h & k lines can be well modeled by considering a twoterm system, also when accounting for polarization. However, it must be noted that a CRD treatment was made for the subordinate lines in the latter calculations. Clearly, a definitive confirmation of the suitability of a twoterm modeling will require a formalism through which polarization and PRD effects can be taken into account in all the lines of a cascadetype threeterm system such as the one responsible for the resonance and subordinate lines (see del Pino Alemán et al. 2020), which is not yet available.
Relevant parameters for the atomic model considered in step 2 include the upper and lower fine structure (FS) levels, their respective energies E relative to the ground state, and the Einstein coefficient for spontaneous emission from upper level β_{u}L_{u}SJ_{u}⟩ to lower level β_{ℓ}L_{ℓ}SJ_{ℓ}⟩, given as A_{uℓ} = A(β_{u}L_{u}SJ_{u} → β_{ℓ}L_{ℓ}SJ_{ℓ}). For all the calculations considered in the present work, the radiative line broadening parameter Γ_{R} is taken to be equal to A_{uℓ}, whose experimental values are given in Kramida et al. (2021). These quantities are given in Table A.1. The collisional line broadening constants for elastic (Γ_{E}) and inelastic (Γ_{I}) collisions, which are required as input quantities for step 2, enter the branching ratios of the redistribution matrices and the expression of the damping constant a (see Appendix. C.2). In this work, Γ_{E} is obtained accounting only for the contributions due to Van der Waals interaction and the Stark effect. Γ_{I} is taken to be equal to the rate of inelastic collisions responsible for the atomic transitions from states of the upper term to those of the lower term, C_{uℓ}. For the Mg II doublet, these quantities are obtained in step 1 directly from the execution of RH. The collisional strengths required to compute C_{uℓ} are obtained following Sigut & Pradhan (1995). The Van der Waals contribution to Γ_{E} due to neutral hydrogen and helium atoms is obtained making use of Unsöld’s approximation (Unsöld 1955). The quadratic Stark effect contribution, due to electrons and singly charged ions, is taken into account (Traving 1960). The chemical abundance of magnesium relative to hydrogen is given by
Atomic parameters for the Mg IIh & k lines.
where n(H) and n(Mg) are the populations of hydrogen and magnesium, respectively. Throughout this work, we have taken A(Mg) = 7.58 (see Grevesse & Anders 1991).
Appendix B: Applications to the H I Lymanα line
Here we present an analogous investigation to the one presented in Sect. 3 for the Mg IIh & k resonance lines, but applied to the H I Lymanα line instead. We recall that the Lymanα line arises from the radiative transitions between the n = 1 and n = 2 levels of neutral hydrogen. In step 1 the calculations (see Sect. 2.6) are carried out with RH, taking an atomic model with 6 levels in which FS is neglected, which includes 5 levels of H I with principal quantum numbers between n = 1 and n = 5 and a level corresponding to the ionized H II. We account for 10 line transitions and 5 continuum transitions that involve these levels. The contributions from all transitions are computed under the CRD (or flatspectrum) assumption, except for the one corresponding to Lymanα itself, which receives a PRD treatment. The suitability of considering PRD only for the latter transition when determining the population of the ground state of hydrogen is supported by the results presented in Hubeny & Lites (1995).
In step 2 of the problem (see Sect. 2.6) we consider a twoterm atomic system. Indeed, considering the fine structure of hydrogen and recalling that the 1s ^{2}S and 2s ^{2}S terms are prohibited by the electric dipole selection rules, we can treat the H I Lymanα line as arising from the transitions between the 1s ^{2}S and 2p ^{2}P terms. The relevant atomic parameters are provided in Table B.1, in which the energies of the FS levels and the Einstein coefficients A_{uℓ} were taken from Kramida et al. (2021). Unlike in the calculations for the Mg II doublet, only the continuum quantities and the initial guess for the unpolarized radiation field are provided from step 1. The population of the lower level N_{ℓ} is taken to be equal to the population of the ground level of hydrogen provided by the atmospheric model (see Fontenla et al. 1993). The Γ_{I} line broadening constant is taken to be equal to the inelastic collision rates 𝒞_{uℓ}, which are calculated according to the expressions given in Przybilla & Butler (2004). Regarding Γ_{E}, we consider two contributions. The first is the van der Waals contribution due to neutral hydrogen, which is calculated following Sect. 7.13 of LL04. The second is the linear (rather than quadratic) Stark broadening contribution, for which we use the formula presented in Sutton (1978).
Atomic parameters for the FS components of the H I Lymanα line.
We highlight two important differences with respect to the atomic parameters of the Mg II doublet. First, the energy separation between the FS levels of the upper term of the H I Lymanα line is considerably smaller and, as a result, its two FS components are blended. Second, the Einstein coefficients for spontaneous emission A_{uℓ}, which are proportional to the oscillator strength of the FS components of the line, are larger for the Lymanα line by more than a factor two. Together with the far greater abundance of hydrogen, this implies that that the Lymanα line is much stronger (i.e., characterized by a stronger line opacity, see Milkey & Mihalas 1973b) than the Mg IIh or k lines, and thus originates at more external atmospheric regions.
We carried out RT calculations as detailed above to evaluate the suitability of the same approximations discussed in Sect. 3, but applied here to the H I Lymanα line. The FALC atmospheric model is used in all calculations. The magnetic field, when present, is taken with the same strength and orientation at all heights. The field is horizontal (θ_{B} = 90°) with azimuth χ_{B} = 0° (see Fig. 2). However, here its strength is taken to be 50 G, which characterizes the onset of the Hanle effect (see Sect. 10.3 of LL04) for this line. The profiles are shown for an LOS with μ = 0.1 and taking the reference direction for positive Stokes Q parallel to the limb. Vacuum wavelengths are considered in all the figures shown in this Appendix. The spectral interval considered in these figures has a width of 30 Å and is centered at the baricenter of the transitions contributing to this line. The baricenter falls at 1215.67 Å, which we hereafter refer to as the line center.
First we focus on the intensity and linear polarization (Q/I) profiles resulting from reference PRD calculations, represented by the black curves in Fig. B.1. Unlike for the Mg II doublet, the two FS components are clearly blended. In the intensity profile we find the most striking difference with respect to the Mg II lines; for this line a much sharper emission profile is produced, with a value within the core region that is roughly two orders of magnitude larger than that in the far wings (in qualitative agreement with the theoretical profiles in Milkey & Mihalas 1973b). We note that we obtained comparable emission profiles when carrying out calculations for the Mg II doublet in which we artificially increased the abundance of magnesium (not shown in this work). This indicates that this remarkable emission feature is a consequence of the fact that the H I Lymanα line is much stronger. The Q/I profile obtained through the reference PRD calculation is negative throughout the considered spectral range, with very broad lobes with large amplitudes in the far wings, sharp peaks in the near wings, and a small amplitude close to the line center.
Fig. B.1. Stokes I (left panel) and Q/I (right panel) profiles as a function of vacuum wavelength for the H I Lymanα line, obtained in the absence of a magnetic field. The solid black curves correspond to reference PRD calculations, whereas the red curves represent the results of calculations considering the approximate redistribution matrix (see main text). In the right panel, the latter curve is dashed to enhance visibility. The shaded areas have a width of 2.4 Å and indicate the spectral region where the latter approximation is not expected to be suitable. For all the calculations presented in this Appendix, the FALC atmospheric model is considered. For the figures in this Appendix we consider an LOS with μ = 0.1 and take the direction for positive Stokes Q parallel to the limb. 
We verified that the intensity and linear polarization patterns found in the line wings, taking an LOS with μ = 0.3, perfectly agree with the calculations neglecting FS presented in Alsina Ballester et al. (2019); this is in accordance with the principle of spectroscopic stability (see Sect. 7.10 of LL04). We also found a perfect agreement with the linecore profiles presented in Belluzzi et al. (2012). However, a slight discrepancy was found in the linewing Q/I pattern, in the region where Jstate interference plays an important role, because in that work the authors made use of redistribution matrices in which the branching ratios and ℛ_{III} were obtained using heuristic arguments (see Belluzzi & Trujillo Bueno 2014). Indeed, we could reproduce these profiles through calculations using the redistribution matrices that correspond to the latter approach, given in Eqs. (C.23). A comparison between such calculations (red curves) and the reference PRD calculations (black curves) is shown in Fig. B.2 for an LOS with μ = 0.1. An error is indeed incurred in the Q/I wings, but it is not as large as in the case of the Mg IIh & k lines (see Sect. 3.4) because of the smaller energy separation between FS levels, which thus has a smaller impact on the branching ratios for the interference terms. On the other hand, it can be seen from the figure that the intensity profile is not appreciably impacted by the changes in branching ratios.
Fig. B.2. Stokes I (left panel) and Q/I (right panel) profiles as a function of wavelength obtained from PRD calculations in the absence of a magnetic field. The black and red curves represent the calculations obtained considering the redistribution matrices given in Eqs. (10) and (11) and those given in Eq. (C.23), respectively. The latter calculation was considered in order to reproduce the results of Belluzzi et al. (2012). 
In addition to the reference PRD calculations, Fig. B.1 also shows the results obtained when neglecting Doppler redistribution in the redistribution matrix, so that the scattering processes that it quantifies are treated as coherent in the reference frame of the observer (see Sect. 3.1). The shaded area indicates the spectral range in which this approximation is not expected to be suitable. For this line, it spans 1.2 Å from the line center, corresponding to the Doppler width at the height where τ = 1, at line center and for μ = 0.1. Unlike for the Mg II doublet, discrepancies in the intensity profile are appreciable even beyond the shaded area, up to several angstroms from line center. This can be explained because of the exceptionally prominent emission feature of this line. Through redistribution effects, the large intensity signal in the core region strongly impacts the intensity in the line wings, and this impact is of course underestimated when Doppler redistribution is neglected. In the linear polarization profiles, discrepancies are also appreciable at similar distances from line center.
In the presence of a magnetic field, discrepancies between the reference PRD calculations and the ones obtained under the abovementioned approximation are also found beyond the shaded area, as can be seen in Fig. B.3. Indeed, a few angstroms from the line center, the discrepancies in Q/I are substantially larger than in case without magnetic fields. We recall that the magnetic sensitivity of the wing linear polarization patterns is mainly controlled by the MO effects quantified by ρ_{V} (Alsina Ballester et al. 2016, 2019), which act on the radiation emitted within the medium. This suggests that the approximate treatment of coherent scattering processes has a considerable impact on the linear polarization components of the emission vector several angstroms from line center even in the absence of a magnetic field. However, in that case the impact on the emergent radiation was found to be modest, possibly because of transfer effects. In the presence of magnetic fields, the profiles found in the line wings also coincide with those reported in Alsina Ballester et al. (2019).
Fig. B.3. Stokes Q/I (left panel) and U/I (right panel) profiles for the H I Lymanα line as a function of wavelength. The black and red curves represent calculations similar to those presented in Fig. B.1, but in the presence of 50 G horizontal (θ_{B} = 90°) magnetic fields with χ_{B} = 0°. 
Despite not showing the results here, we verified that there is no appreciable impact on the intensity and Q/I profiles when artificially setting to zero all the components of ℛ_{III} except for K = K′=Q = 0 (see Eq. (9)), as was found also for the Mg II doublet in Sect. 3.2. In Fig. B.4 a comparison is presented between the results of reference PRD calculations and calculations in which Doppler and collisional redistribution are neglected (see Sect. 3.2 for details). For the latter calculations, we consider both the case in which the contribution from Γ_{E} to the damping constant is taken into account (blue curves) and in which it is neglected (red curves). Such approximations perform very poorly for this line until wavelengths many Doppler widths from the line center are considered, independent of whether the contribution from elastic collisions is included in the damping constant. The intensity profiles present considerable discrepancies until roughly 10 Å from the line center. Although the Q/I signals begin to suitably approximate the reference PRD signals somewhat closer to the center, the discrepancies are striking within a range of a few Doppler widths from the line center, even presenting a different sign. We again attribute the unsuitability of this approximation for modeling the H I Lymanα line wings to its particularly strong intensity emission peak paired with redistribution effects.
Fig. B.4. Stokes I (left panel) and Q/I (right panel) profiles as a function of wavelength obtained through the RT calculations described in the text in the absence of a magnetic field. Reference PRD calculations (black curves) are compared to those in which scattering is treated as fully coherent in the observer’s reference frame (neglecting Doppler and collisional redistribution; see text), both accounting for the contribution from elastic collisions to the damping constant (blue curves) and neglecting it (red curves). 
Finally, Fig. B.5 shows a comparison between reference PRD calculations, applied to the H I Lymanα line, in which the magnetic splitting is taken into account (i) for all RT coefficients, (ii) for all elements of the propagation matrix but not the emission vector, and (iii) only in η_{I} and ρ_{V} (see Sect. 3.3 for details). It is noteworthy that, when the magnetic splitting is neglected in the computation of the emission vector, the intensity and the scattering polarization signals in the wings depend appreciably on whether the splitting is taken into account in all elements of the propagation matrix or only in η_{I} and ρ_{V} (see Fig. B.5). Further numerical tests revealed that the RT coefficient responsible for this difference is the η_{V} coefficient for dichroism. By accounting for the impact of the magnetic field in the calculation of η_{V} but not in that of ε_{V}, a spurious V/I signal is produced. As can be seen from the RTE given in Eq. (1), this impacts the intensity profile close to the line core. Because of the particularly strong emission profile of Lymanα, this in turn has a substantial impact on the I, Q/I, and U/I signals in the line wings, again due to redistribution effects. This impact was much smaller for the Mg IIh & k lines (see Sect. 3.3) and was appreciable only in the very near wings, because they present far weaker emission features. In any case, the results presented in this Appendix do not invalidate the suitability of the approximation of neglecting the magnetic splitting in the redistribution matrix, and thereby the emissivity, for modeling the wing scattering polarization signals. These findings only serve to emphasize that, under this approximation, the magnetic splitting should be taken into account only in η_{I} and ρ_{V} but not in the other elements of the propagation matrix.
Fig. B.5. Intensity (upper left panel), V/I (upper right panel), Q/I (lower left panel), and U/I (lower right panel) profiles as a function of wavelength. The various colored curves show the results of reference PRD calculations in which the magnetic field is fully taken into account in all RT coefficients (black curves), neglecting its impact only in the computation of the emission coefficient (red curves), and accounting for it only for η_{I} and ρ_{V} (blue curves). The magnetic field is horizontal (θ_{B} = 90°) with χ_{B} = 0° and has a strength of 50 G. 
In summary, certain approximations that were suitable for the Mg II doublet are not applicable for the H I Lymanα line because of the exceptionally strong emission feature in its line core, which is related to the strength of this line. Neglecting Doppler redistribution in the scattering processes quantified by represents a rough approximation that is suitable in the far wings. The noncoherent scattering processes quantified by ℛ_{III} do not appreciably impact the scattering polarization. On the other hand, the approximation of fully neglecting Doppler and collisional redistribution is found to be unsuitable in this case. Finally, the approximation of neglecting the magnetic splitting in the emissitivity remains reliable even in the near wings, as long as the splitting is only taken into account in η_{I} and ρ_{V}.
Appendix C: Analytical expressions for the numerical framework
The nonLTE RT code used in this work, based on the numerical framework discussed in the main text (see Sect. 2), is suitable for modeling the generation and transfer of polarized radiation in spectral lines that arise from twoterm atomic systems with an unpolarized and infinitely sharp lower term. Although it is not considered in the main text, it also allows for the inclusion of HFS in the atomic system. In this Appendix, we present the expressions involved in the RT problem for this more general case (see Appendices C.1–C.4). Subsequently, we discuss how to implement the approximations of fully coherent scattering and of fully noncoherent scattering, also referred to as the CRD approximation (see Appendix C.5). Then, we show how the RT coefficients change when considering a magnetic field whose orientation changes at small scales (see Appendix C.6). In Appendix C.7 we show simplified expressions that are suitable for the case without magnetic fields, and which can additionally take into account the depolarizing effect of collisions that induce transitions within the same HFS level. Finally, in Appendix C.8 we present the simplified expressions for atomic systems without HFS, which are used in the main text. The same Appendix also contains the expressions obtained by applying the approximations investigated in the main text. We point out that the framework presented here can also be trivially extended to the case in which the considered spectral line arises from multiple isotopes of the same atomic species, simply by computing the contributions from each isotope to the various RT coefficients separately and then summing them, weighted by the relative abundances of the isotopes.
C.1. The atomic Hamiltonian
In the LS coupling scheme, a given term is specified by (β, L, S), where β is a set of inner quantum numbers, L is the quantum number for the orbital angular momentum operator L, and S is the quantum number for the electronic spin S. The various fine structure (FS) levels that pertain to a given term are determined by the spinorbit Hamiltonian H_{FS}, whose eigenvectors are of the form βLSJM⟩, where J is the quantum number for the total electronic angular momentum J = L + S, and M is its projection along the quantization axis. If the nuclear spin of the atom I is nonzero, it interacts with the electron cloud; through this interaction, which is much weaker than the spinorbit one, a given fine structure Jlevel splits into various HFS levels. These levels are determined by the HFS Hamiltonian, which can be expressed as an infinite series of electric and magnetic multipoles. It is generally a good approximation to only consider the first two terms of the series, namely the magnetic dipole and the electric quadrupole terms (see Sect. 3.5 of LL04). The eigenvectors of the HFS Hamiltonian are of the form βLSJFf⟩, where F is the quantum number for the total (electronic plus nuclear) angular momentum F = J + I, and f its projection along the quantization axis. The matrix elements of the unperturbed Hamiltonian H_{0} = H_{FS} + H_{HFS} are given by
where E_{βLS}(J) is the energy of the considered FS Jlevel, 𝒜(β, L, S, J, I) and ℬ(β, L, S, J, I) are the magnetic dipole and electric quadrupole constants for HFS, and
In the presence of a magnetic field, the energy eigenvectors and eigenvalues of the atomic system have to be calculated by diagonalizing the total Hamiltonian H = H_{FS} + H_{HFS} + H_{B}, where H_{B} is the magnetic Hamiltonian, given by
where μ_{0} is the Bohr magneton and B = Bb is the magnetic field, with B the magnetic field strength and b the unit vector for the direction of the field. Through the application of the WignerEckart theorem and its corollaries (see Sect. 2.8 of LL04), the matrix elements of the magnetic Hamiltonian are found to be
With some minor changes in notation, this expression coincides with the one presented in Sowmya et al. (2015). We recall that the 3j and 6j symbols couple different angular momenta, and their expressions can be found in Sects. 2.2 and 2.3 of LL04 (see also Racah 1942). We note that the magnetic Hamiltonian is still diagonal in f, as well as in β, L, S, and I. However, it introduces a coupling between states with different F and J, which therefore are no longer good quantum numbers for the system. We thus label the eigenstates of the atomic Hamiltonian as βLSIμf⟩, which can be given as linear combinations of the eigenstates of J and F as
where the label μ is introduced to distinguish between different states with the same quantum numbers β, L, S, I, and f. The sums over F and J range from J − I to (J + I) and from L − S to (L + S), respectively. For simplicity of notation these limits will not be shown explicitly in the following sections of this Appendix. The values of the coupling coefficients are determined through the diagonalization of the atomic (unperturbed plus magnetic) Hamiltonian. Of course, in the absence of a magnetic field there is no state mixing and .
Hereafter, we write the eigenstates βLSIμ_{i}f_{i}⟩ and eigenvalues (i.e., the energies) E_{βLSI}(μ_{i}f_{i}) using the shorthand notation μ_{i}f_{i}⟩ and E_{μifi}, respectively. For the twoterm system considered in this work, we write u or ℓ in place of the label i, depending on whether it corresponds to a state of the upper or lower term, respectively. The frequency of the transition between the state of the upper term μ_{u}f_{u}⟩ and the state of the lower term μ_{ℓ}f_{ℓ}⟩ is given by
C.2. Doppler width and damping constant
In the expressions presented below, we consider the reference frame of the observer rather than the rest frame of the atom. As such, the Doppler frequency shifts due to the smallscale motions of the atmospheric medium are taken into account. These effects cause the spectral line to be further broadened according to the Doppler width, which is given as Δν_{D} in frequency units or as Δλ_{D} in wavelength units
where ν_{0} is the reference frequency defined as the baricenter of the frequencies of all the transitions between states of the upper and lower term and λ_{0} is the corresponding vacuum wavelength. In this expression the Boltzmann constant k_{B} and the temperature of the medium T are also introduced. The Doppler width receives a thermal contribution, for which we assume a Maxwellian distribution of velocities, and a nonthermal contribution, which depends on the socalled microturbulent velocity v_{m}. We also define the damping constant in terms of the Doppler width as
where Γ is the line broadening parameter, which is given as the sum of the contribution from radiative processes Γ_{R}, elastic collisions Γ_{E}, and inelastic collisions Γ_{I}. For the applications to the Mg II lines presented in the main text, these contributions are obtained as discussed in Appendix A. For applications to the H I Lymanα line, they are obtained as explained in Appendix B.
C.3. The elements of the propagation matrix
Here we present the analytical expressions for the quantities that enter the RT equation. Unless otherwise noted, the expressions in this Appendix are given in the reference frame of the observer, and taking the quantization axis along which the quantum number f is measured to be parallel to the local vertical (hereafter the vertical reference system). The geometrical information of these expressions is fully contained in the geometrical tensors (see LL04). The reference system in which the quantization axis is parallel to the direction of the magnetic field (hereafter the magnetic reference system) and the vertical reference system are related (e.g., Alsina Ballester et al. 2017) as follows
where the label B indicates the magnetic reference system and v indicates the vertical one. The quantities are the elements of the socalled rotation matrices, and R_{B} = (0, −θ_{B}, −χ_{B}) are the Euler angles through which the system is rotated from the magnetic frame into the vertical one.
For the considered twoterm atomic model with HFS and an infinitely sharp and unpolarized lower term, the elements of the propagation matrix appearing in Eqs. (1) and (2) may be given in the vertical reference system as
The functions H and L are the Voigt and associated dispersion profiles, respectively. They arise from the convolution of the Lorentzian and associated dispersion profiles (which enter the expressions in the atomic rest frame), respectively, with the Gaussian profile that quantifies the Doppler broadening. The summation limits for f depend on the quantum numbers S, I, and L of the considered term, and the number of distinct μ states depends on S, I, L, and f. For simplicity of notation, these limits are not shown here. The reduced frequency u is introduced in Sect. 2.3. The reduced frequency shift between upper state μ_{u}f_{u}⟩ and lower state μ_{ℓ}f_{ℓ}⟩ is given by
The expressions for the elements of the propagation matrix shown above are given in terms of the socalled transition strengths
where the quantum number q = f_{ℓ} − f_{u} takes integer values −1, 0 or 1. These transition strengths can be obtained making use of the definition provided in Sect. 3.4 of LL04, which can be straightforwardly generalized to an atomic system with HFS. Moreover, they fulfill the normalization condition
C.4. The redistribution matrices (twoterm atomic model with HFS)
The line scattering emission coefficient is related to the incident radiation field following Eq. (8). The redistribution matrix entering this expression can be separated into ℛ_{II} and ℛ_{III}, which characterize scattering processes that are coherent and noncoherent in the atomic frame, respectively (see Sect. 2.4). For a twoterm atomic model with an unpolarized lower term and HFS, we have made use of the expression given in Eq. (A.6) of Bommier (2018). For ℛ_{II} we carried out an integration over velocities assuming a Maxwellian distribution (including also a nonthermal contribution) and accounting for the Doppler frequency shifts as detailed in Sect. 10.3 of Hubeny & Mihalas (2015), making also use of the angleaveraged approximation (see Rees & Saliba 1982). As for ℛ_{III}, we have made the assumption that complete frequency redistribution (CRD) occurs in the observer’s frame, accounting for Doppler redistribution by substituting each of the Lorentzian and associated dispersion profiles within it by the corresponding H and L functions, also taking into account a normalization factor . Under these approximations, we can perform the decomposition into frequency and angle dependent components shown in Eq. (9). The angledependent factors are of the form shown in Eq. (12), where the transformation into the vertical reference system is performed according to the discussion in Appendix C.4. The frequencydependent factors for ℛ_{II} and ℛ_{III} are given by
Notable changes in notation with respect to the expressions given in Bommier (2018) include the exchange of the indices K and K′ and that the quantum number M in that paper corresponds to quantum number f used here. The reduced frequency splitting between states that belong to the same term is given by
The expressions for R_{II} and R_{III} contain the same quantity 𝒜, which depends on the quantum numbers of the states involved in each of the terms of the redistribution matrix, and the coupling between them. This quantity is given by
We arrive at this expression by making use of the equivalence between the coupling coefficients and the product of the pair given in Bommier (2018), in which the perturbed Hamiltonians for FS and HFS are diagonalized separately. Here the quantity M is the value of J measured along the selected quantization axis, and it is referred to as M_{J} in Bommier (2018). We also changed the set of labels J^{*}F^{*} to the equivalent μ, as shown in Eqs. (C.11).
C.5. The limits of CRD and fully coherent scattering
A theoretical framework that has been extensively used to model spectral line polarization is the one introduced by LL04. It was derived from first principles of quantum electrodynamics and relies on a firstorder perturbative treatment of matterradiation interaction. Thus, scattering processes are treated as a succession of statistically independent absorption and emission processes (Casini et al. 2008). This corresponds to the limit of complete frequency redistribution (CRD), in which any frequency coherence in scattering processes is effectively lost. As discussed in LL04, this approach is valid under the flatspectrum approximation, in which the incident radiation field is assumed to be independent of frequency.
By contrast, the formalism considered in this work (see Bommier 2017) allows one to take the spectral structure of the incident radiation fully into account. It can account for scattering processes that are coherent in frequency (i.e., that preserve the frequency correlation between incoming and outgoing radiation) and, the same time, it accounts for loss of such coherence due to elastic collisions. As can be seen from the redistribution matrices shown in Appendix C.4, a higher elastic collisional rate Γ_{E} implies smaller branching ratios in ℛ_{II} (which quantify coherent scattering processes) and larger ones in ℛ_{III} (noncoherent processes). The CRD limit can in principle be reached by artificially setting a very large value of Γ_{E} (i.e., Γ_{E} ≫ Γ_{R}, Γ_{I}) in the branching ratios so that the contribution from ℛ_{III} dominates over that from ℛ_{II}. However, one must bear in mind that Γ_{E} also enters the definition of the damping constant a (which could introduce inconsistencies) and that elastic collisions may in principle relax atomic polarization (so that polarization phenomena could become negligible in a highly collisional regime). We also observe that the ℛ_{III} considered in this framework was not obtained under the flatspectrum assumption and could potentially introduce a sensitivity to the spectral structure of the radiation field. Conversely, the limit of fully coherent scattering (CS) can by reached by setting Γ_{E} = 0 so that the contribution from ℛ_{III} vanishes. In this work, we have considered calculations that correspond to this limit both accounting for the contribution from Γ_{E} to the damping constant and neglecting it (see Sect C.8 for the approximation of additionally neglecting Doppler redistribution). We note that accounting for this contribution in the damping constant gives rise to an inconsistency, because the emission profiles contained in the redistribution matrices no longer cancel perfectly with the branching ratios in the far wings, which could introduce an artificial magnetic sensitivity (see Sect. 10.4 of LL04; Alsina Ballester et al. 2018).
C.6. Microstructured magnetic fields
The expressions presented above are suitable for the computation of the RT coefficients when the external magnetic field has a fixed strength and orientation at any given spatial point. Hereafter, such fields are referred to as deterministic. However, in stellar atmospheres it is common for magnetic fields to be tangled at small spatial scales, so that its orientation changes multiple times across the mean free path of the line’s photons. Making the assumption that the strength of the magnetic field remains constant over these scales (i.e., the magnetic field is unimodal), the expressions for the RT coefficients in the vertical reference system can be found through an analytical integration over the considered distribution of magnetic field orientations. The dependency on the magnetic field orientation is fully contained in the rotation matrices, both in the elements of the propagation matrix and in the line scattering emission coefficient (see Eqs. (6) and (12)). Thus, these matrices are the only quantities entering the integration. Below, we consider two distinct scenarios for the distribution of magnetic field orientations and show the corresponding expressions.
Isotropic distribution of magnetic fields: The analytical integration is carried out over all possible inclinations θ_{B} and azimuths χ_{B}.
For the latter integration we used the Weyl theorem (see Sect. 2.6 of LL04). Making use of these integrals, the expression for the absorption coefficient becomes
The propagation matrix elements ρ_{i} and η_{i} with subscripts other than I are zero and therefore their expressions are not shown. The elements of the scattering phase matrix contained in the redistribution matrices become
It is often useful to consider this distribution in order to investigate the smallscale magnetic fields present in the quiescent solar photosphere.
Magnetic field with a fixed inclination and a random distribution of azimuths: In this case, the analytical integration is only carried out over χ_{B}, while θ_{B} is kept fixed, resulting in
where is the socalled reduced rotation matrix (see Sect. 2.6 of LL04). Through these relations we reach
and
It is often useful to consider this distribution in order to investigate the canopylike magnetic fields in the outer layers of the solar atmosphere.
C.7. The redistribution matrices in the absence of a magnetic field, including the depolarizing effect of elastic collisions
In the absence of magnetic fields, J and F remain good quantum numbers. The energy eigenstates are of the form βLSIJFf⟩ (or, with shorthand notation, JFf⟩) and states with different quantum number f but the same numbers J and F remain degenerate. As a result, the number of transitions with different frequencies greatly decreases and the line scattering emission coefficients can be computed at a considerably lower computational cost. Simpler expressions for the redistribution matrix, suitable for the nonmagnetic case, are found in Eq. (40) of Bommier (2017). Following the approach described in Appendix C.4 and making the same changes in notation we write them as
where
Similar expressions can be obtained directly from those presented in Appendix C.4, observing that in the unmagnetized case . The only notable difference is that the branching ratios in the expressions obtained from Bommier (2017) contain Kmultipole depolarization rates for each HFS level D^{(K)}(J_{u}, F_{u}) produced by elastic collisions. In that work the D^{(K)} rates could be included because the master equations for the atomic states allow for a closed analytical solution even when accounting for the collisional transitions between states belonging to the same HFS level, provided there is no external magnetic field. We note that, even in the absence of magnetic fields, no such solution can be found when accounting for the collisional transitions between states that belong to the same term but with different J or F quantum numbers, which are therefore not included in the expressions introduced above.
Neglecting interference between states of the upper term The expressions above can be straightforwardly modified to artificially neglect the quantum interference between states belonging to the upper term with different J or F, which remain good quantum numbers of the system in the absence of a magnetic field. In order to neglect the interference between states with different J (i.e., Jstate interference), we simply introduce a in the quantity 𝒜 shown above. Similarly, the interference between states with different quantum number F can be neglected by introducing in 𝒜.
C.8. The twoterm atomic model without HFS
The Mg II doublet (see main text) and the H I Lymanα line (see Appendix B) can be suitably modeled considering atomic systems without HFS. In this case, the expressions shown in the previous sections simplify considerably. The matrix elements of the magnetic Hamiltonian also simplify, taking the form shown in Sect. 3.4 of LL04, and the atomic Hamiltonian is given by H = H_{FS} + H_{B}. For a given (β, L, S) term, its eigenstates are specified by quantum number M, which is the value of the total electronic angular momentum J measured along the specified quantization axis, and by the label j. The energies of these states and their couplings to the eigenstates of J are given by
Hereafter, we use the shorthand labels jM⟩ and JM⟩ for states βLSjM⟩ and βLSJM⟩, respectively. In this case, the RT coefficients can be obtained from those corresponding to an atomic system with HFS (see Appendices C.3 and C.4), but setting the nuclear spin I = 0 and making use of the relation shown in Eq. (2.36a) of LL04 for the 6j symbols. This also requires the substitution of labels μ with j, quantum numbers f with M, and coupling coefficients with . The resulting expressions for the elements of the propagation matrix are found in Eqs. (6a) and (6b), and those for the frequencydependent terms of the redistribution matrices are found in Eqs. (10) and (11). The corresponding quantity 𝒜 is given by
We note that these expressions for the redistribution matrix coincide with those that would be obtained from Eq. (A.1) of Bommier (2018), making the abovementioned changes in notation and the approximations discussed in Sect. 2.4 for the reference PRD calculations. In the rest of this section, we present the expressions for the redistribution matrices under the approximations that are studied in the main text.
Coherent scattering in the reference frame of the observer: The first approximation considered in the main text is that of treating the scattering processes quantified by ℛ_{II} as coherent in the reference frame of the observer, or equivalently, neglecting Doppler redistribution in this matrix. Under this approximation we still account for the broadening effect of smallscale atomic motions in the absorption profiles. This can be achieved by neglecting the Doppler shifts in the Dirac delta function in Eq. (A.1) of Bommier (2018). Thus, when integrating over velocities with a Maxwellian distribution, the Lorentzian and associated dispersion profiles in the R_{II} terms are replaced with Voigt and associated dispersion profiles, respectively, multiplied by a normalization factor. Making the abovementioned changes in notation, the frequencydependent components become
Like in the main text (see Sect. 3.1), we write the components of this approximate redistribution matrix as . The additional Δν_{D} in the denominator is obtained when changing the argument of the Dirac delta function from frequency to reduced frequency. It can easily be recognized that, under this approximation, the coupling between the incoming and scattered radiation is contained only in the Dirac delta. Thus, the radiation scattered at reduced frequency u receives contributions only from the incident radiation at the few reduced frequencies determined by the energy difference between the initial and final state. This represents a significant decrease in numerical complexity. Indeed, if all states of the lower term are degenerate, then these scattering processes introduce no coupling between the radiation field at different frequencies. We recall that this approximation is only applied to ℛ_{II}, but it can be combined with the approximation of treating all scattering processes as coherent, discussed in Appendix. C.5. Indeed, this is done in Sect. 3.2 of the main text.
We finally observe that in the line wings, where this approximation is valid,
where ϕ and ψ are the Lorentzian and associated dispersion profiles (see Sect. 5.3 of LL04). Therefore, at these spectral ranges, one should expect the results to be the same as if were considered directly in the atomic rest frame without accounting for Doppler broadening.
Expressions in the absence of a magnetic field: The expressions for the redistribution matrix in the unmagnetized case, accounting for the depolarizing effect of elastic collisions (see Appendix C.7) can be further simplified for atomic systems without HFS. In analogy to what is discussed in Appendix C.7, they can be written as
and the 𝒜 quantity contained within them is given by
These expressions can also be obtained from the redistribution matrix presented in Eq. (34) of Bommier (2017), making the abovementioned changes in notation and approximations for the reference PRD case (see Sect. 2.4). These redistribution matrices were used for the calculations presented in Sect. 3.3, in which the depolarizing effect of elastic collisions was fully neglected by setting all D^{(K)}(J_{u}) rates to zero.
Reproducing the redistribution matrix of Belluzzi & Trujillo Bueno (2014): These authors proposed a redistribution matrix for the case of a twoterm atomic model with an unpolarized and infinitely sharp lower term in the absence of a magnetic field. The branching ratios and ℛ_{III} were obtained from heuristic arguments. In order to recover this redistribution matrix using the present formalism, we consider the following frequencydependent factors for ℛ_{II} and ℛ_{III}
where the quantity 𝒜 is exactly as given in Eq. (C.22). We observe that the only difference between these expressions and those given in Eq. (C.21) is found in their branching ratios. Neglecting depolarizing collisions in the latter, we note that the branching ratios of the two formulations coincide if (i) the CS limit is taken (Γ_{E} = 0), (ii) the CRD limit is taken (Γ_{E} ≫ Γ_{R}, Γ_{I}), or (iii) the fine structure energy splitting of both the upper and lower terms (contained in u_{Ju, Jℓ} and ) is negligible.
The ℛ_{II} that results from Eq. (C.23a) perfectly coincides with the analogous quantity in Belluzzi & Trujillo Bueno (2014), which is the first term on the righthand side of Eq. (36) in that paper. On the other hand, discrepancies remain between the ℛ_{III} resulting from Eq. (C.23b) and the second term of Eq. (36) in Belluzzi & Trujillo Bueno (2014). These discrepancies are contained in the absorption profiles of the two expressions (i.e., the profiles whose arguments depend on the incident radiation); in the latter work this profile was introduced heuristically. Nevertheless, the two expressions fully coincide if we make the assumption that the incident radiation field is spectrally flat, in which case the frequency shifts in their absorption profiles can be neglected.
All Tables
All Figures
Fig. 1. Righthanded Cartesian coordinate system considered in the problem. The Zaxis is taken parallel to the local vertical. The direction toward the observer, or line of sight (LOS), is contained in the X–Z plane and is therefore determined solely by its inclination with the local vertical θ. The direction of the magnetic field is specified by its inclination θ_{B} and azimuth χ_{B}. 

In the text 
Fig. 2. Stokes I (upper panels) and Q/I (lower panels) profiles as a function of wavelength for the Mg IIh & k lines for the wider (left panels) and narrower (right panels) spectral intervals discussed in the text. Vacuum wavelengths are considered for all figures. The calculations were carried out in the absence of a magnetic field. The solid black curves correspond to the reference PRD calculations (see text), whereas the solid red curves represent the results of calculations taking the approximate redistribution matrix (see text), in which scattering processes are treated as coherent in the reference frame of the observer. The shaded areas in the figures of this section are centered around the h & k lines, have a width of 1.6 Å, and indicate the spectral region where this approximation is not expected to be suitable. For all the figures presented in this section, the calculations are carried out considering the atmospheric model C of Fontenla et al. (1993). All profiles are presented for an LOS with μ = 0.1 and taking the direction for positive Stokes Q parallel to the limb. 

In the text 
Fig. 3. Stokes Q/I (upper panels) and U/I (lower panels) profiles as a function of wavelength. The black and red curves represent calculations similar to those presented in Fig. 2, but in the presence of 20 G horizontal (θ_{B} = 90°) magnetic fields with χ_{B} = 0°. 

In the text 
Fig. 4. Stokes I (upper panels) and Q/I (lower panels) profiles as a function of wavelength obtained through the RT calculations described in the text, in the absence of a magnetic field. Reference PRD calculations (black curves) are compared to those in which Doppler and collisional redistribution are neglected in scattering processes (see text), both accounting for the contribution from elastic collisions to the damping constant (blue curves) and neglecting it (red curves). The vertical dashed colored lines indicate the spectral positions discussed in the main text, namely 2.2 Å to the blue of the k line center (blue), equidistant between the k and h line centers (green), and 2.2 Å to the red of the h line center (red). 

In the text 
Fig. 5. Intensity (upper left panel), V/I (upper right panel), Q/I (lower left panel), and U/I (lower right panel) profiles of the Mg IIh & k lines as a function of wavelength. The various colored curves show the results of reference PRD calculations in which the impact of the magnetic field is fully taken into account in all RT coefficients (black curves), neglected only in the computation of the emission coefficient (red curves), and only taken into account in η_{I} and ρ_{V} (blue curves). The magnetic field is horizontal, with χ_{B} = 0° and a strength of 20 G. 

In the text 
Fig. 6. Stokes Q/I (upper panels) and U/I (lower panels) profiles as a function of wavelength obtained from RT calculations in the presence of a 20 G magnetic field. Reference PRD calculations accounting for the magnetic field in all RT coefficients (black curves) are compared to those in which Doppler and collisional redistribution are neglected in scattering processes while the magnetic splitting is only accounted for in η_{I} and ρ_{V} (see text), both including the contribution from elastic collisions in the damping constant (blue curves) and neglecting it (red curves). 

In the text 
Fig. 7. Q/I profiles as a function of wavelength obtained from PRD calculations in the absence of a magnetic field, considering the wider (left panel) and narrower (right panel) spectral ranges discussed in the text. The black and red curves represent, respectively, the calculations carried out using the redistribution matrices given in Bommier (2017) and those given in Eq. (C.23), for which the main difference concerns the branching ratios. 

In the text 
Fig. B.1. Stokes I (left panel) and Q/I (right panel) profiles as a function of vacuum wavelength for the H I Lymanα line, obtained in the absence of a magnetic field. The solid black curves correspond to reference PRD calculations, whereas the red curves represent the results of calculations considering the approximate redistribution matrix (see main text). In the right panel, the latter curve is dashed to enhance visibility. The shaded areas have a width of 2.4 Å and indicate the spectral region where the latter approximation is not expected to be suitable. For all the calculations presented in this Appendix, the FALC atmospheric model is considered. For the figures in this Appendix we consider an LOS with μ = 0.1 and take the direction for positive Stokes Q parallel to the limb. 

In the text 
Fig. B.2. Stokes I (left panel) and Q/I (right panel) profiles as a function of wavelength obtained from PRD calculations in the absence of a magnetic field. The black and red curves represent the calculations obtained considering the redistribution matrices given in Eqs. (10) and (11) and those given in Eq. (C.23), respectively. The latter calculation was considered in order to reproduce the results of Belluzzi et al. (2012). 

In the text 
Fig. B.3. Stokes Q/I (left panel) and U/I (right panel) profiles for the H I Lymanα line as a function of wavelength. The black and red curves represent calculations similar to those presented in Fig. B.1, but in the presence of 50 G horizontal (θ_{B} = 90°) magnetic fields with χ_{B} = 0°. 

In the text 
Fig. B.4. Stokes I (left panel) and Q/I (right panel) profiles as a function of wavelength obtained through the RT calculations described in the text in the absence of a magnetic field. Reference PRD calculations (black curves) are compared to those in which scattering is treated as fully coherent in the observer’s reference frame (neglecting Doppler and collisional redistribution; see text), both accounting for the contribution from elastic collisions to the damping constant (blue curves) and neglecting it (red curves). 

In the text 
Fig. B.5. Intensity (upper left panel), V/I (upper right panel), Q/I (lower left panel), and U/I (lower right panel) profiles as a function of wavelength. The various colored curves show the results of reference PRD calculations in which the magnetic field is fully taken into account in all RT coefficients (black curves), neglecting its impact only in the computation of the emission coefficient (red curves), and accounting for it only for η_{I} and ρ_{V} (blue curves). The magnetic field is horizontal (θ_{B} = 90°) with χ_{B} = 0° and has a strength of 50 G. 

In the text 
Current usage metrics show cumulative count of Article Views (fulltext article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 4896 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.