The transfer of polarized radiation in resonance lines with partial frequency redistribution, J-state interference, and arbitrary magnetic fields. A radiative transfer code and useful approximations

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 out of local thermodynamical equilibrium, while accounting for scattering polarization, partial frequency redistribution, J-state interference, and hyperfine structure. The resulting radiative transfer code allows modeling the impact of magnetic fields of arbitrary strength and orientation through the Hanle, incomplete Paschen-Back, and magneto-optical effects. We also evaluate the suitability of a series of approximations for modeling the scattering polarization in the wings of strong resonance lines that would be particularly useful for the numerically intensive case of three-dimensional radiative transfer. We examine the suitability of the considered approximation using our radiative transfer code to model the Stokes profiles of the Mg II h&k lines and of the H I Lyman alpha line in magnetized one-dimensional models of the solar atmosphere. Neglecting Doppler redistribution in the scattering processes that are unperturbed by elastic collisions produces a negligible error in the scattering polarization wings of the Mg II resonance lines and a minor one in the Lyman alpha wings, although it is unsuitable to model the cores of these lines. For both lines, the scattering processes that are perturbed by elastic collisions give a significant contribution only to the intensity component of the emissivity. Neglecting collisional as well as Doppler redistribution represents a rough but suitable approximation for the wings of the Mg II resonance lines, but a very poor one for the Lyman alpha wings. The magnetic sensitivity in the scattering polarization wings of the considered lines can be modeled by accounting for the magnetic field only in the eta I and rho V coefficients of the Stokes-vector transfer equation.


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 ii h & 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 . 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 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 so-called 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. 2016Ballester et al. , 2019del 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 1 An atomic level or term is said to be polarized when the states composing it present population imbalances or quantum coherence. veloped by Casini et al. (2014), based on a diagrammatic treatment of atom-photon interactions, allowed PRD effects, magnetic fields, and J-state 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 ii h & k lines. Finally, Bommier (2017Bommier ( , 2018 presented a generalization of her 1997 theoretical framework, which is suitable for a two-term 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 non-LTE RT code, making use of the redistribution matrices presented in Bommier (2017Bommier ( , 2018. It represents an extension to the one presented in Alsina Ballester et al. (2017), which was valid for the simpler case of a two-level 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 angle-frequency coupling induced by the Doppler effect in the reference frame of the observer (i.e., the observer's frame) through the so-called angleaveraged approximation (e.g., Rees & Saliba 1982), this generally remains the most computationally demanding step in the numerical solution of non-LTE 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 high-performance 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 non-LTE 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  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 ii h & 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.

Formulation of the problem
In this section, we present the relevant equations entering the considered non-LTE RT problem, the methods applied to solve it, and the details of its numerical implementation. The ensuing code is suitable for calculations considering one-dimensional (1D) models of the solar atmosphere. We consider a two-term 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 two-term atom with HFS (see Alsina . The generalization of the present approach to include HFS is found in Appendix C.

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 first-order 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. 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.

The two-term atomic model
We consider a two-term 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 |βLS JM , 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 J-levels of the considered term (i.e., the Paschen-Back 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 C j J (M) can be obtained by diagonalizing the atomic Hamiltonian (see Appendix C). Of course, in the absence of a magnetic field, C j J (M) = δ J, j . We consider the spectral lines arising from radiative transitions (under the electric dipole approximation) between states of where h is the Planck constant and E j u M u 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).

Propagation matrix elements in a two-term 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 Fig. 1. Right-handed Cartesian coordinate system considered in the problem. The Z-axis 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 .
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 D K QQ (R B ) are the so-called rotation matrices (e.g., Sect. 2.4 of LL04). They quantify the rotation from a reference system in which the Z-axis, 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 where θ B and χ B are the Euler angles, illustrated in Fig. 1. The expressions for the geometrical tensors T K Q (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.
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 j u M u , 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 frequency-integrated absorption coefficient k M entering the expressions for η i and ρ i 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. 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 two-term 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 ε ,th i 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 [R(ν , Ω , ν, Ω)] i j relates the jth Stokes parameter of the radiation at frequency ν and in propagation direction Ω that illuminates the atom to the emissivity in the i-th Stokes parameter at frequency ν and in direction Ω.
We consider the redistribution matrix presented in Bommier (2018), which is suitable for a two-term 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 R ii and R iii , following the notation introduced by Hummer (1962). The matrix R ii characterizes the scattering processes that are coherent in the atomic frame and R 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 angle-averaged approximation (Rees & Saliba 1982) for the processes quantified by R ii and the approximation that CRD occurs in the observer's reference frame for those quantified by R 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 angle-dependent 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 R 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 R 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 large-amplitude 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 R ii and R 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 A 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 due 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 angle-dependent 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.

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 off-diagonal 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 ε c i = ε c,sc i + ε c,th i . The scattering term is given by where J K Q are the multipolar components of the radiation field tensor (see Sect. 5.11 of LL04) 2.6. The iterative scheme The general non-LTE 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 operator-splitting 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., Faurobert-Scholl 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 (2003), and Trujillo Bueno (2003). More recently, iterative approaches based on Krylov methods, which could yield better performances than the aforementioned operator-splitting 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 N (needed to calculate the frequency-integrated absorption coefficient k M of Eq. (7)) is kept fixed. We generally obtain it from a self-consistent multi-level 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 two-term 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 two-term 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 step-2 non-LTE 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 Jacobi-based iterative method represents a generalization of the approach presented in Alsina Ballester et al. (2017) to the case of a two-term atomic model. The RTE is solved through the DELOPAR short-characteristics formal solver of Trujillo Bueno (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 high-order Runge-Kutta 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 E K Q components, over all spatial and frequency points, is where the labels "new" and "old" refer to the values of the E K Q 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 5 The population of the upper term N u is allowed to vary. Because N u N , this does not introduce significant inconsistencies and it allows us to take into account the impact of polarization on the ratio N u /N . 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 matrixR ii (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. of R c (E 0 0 ) ≤ 10 −10 , even though 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 R c (E 2 0 ) ≤ 10 −6 in order for convergence to be achieved. Due to the possible presence of oscillations in R c (E 2 0 ) 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.

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 ii h & k lines. We have modeled these resonance lines considering a two-term atomic system with an infinitely sharp and unpolarized lower term without HFS. A discussion on the suitability of a two-term 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 R iii . We refer to the calculations considering the angle-averaged R ii , without making the approximations described in Sects. 3.1 and 3.2, as reference PRD calculations.
For all calculations, the semi-empirical 1D atmospheric model C of Fontenla et al. (1993), hereafter FAL-C, is considered. For the figures presented in this section 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 X-axis 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 far-wing 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 two-level 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 two-term code that was used in del Pino Alemán et al. (2016Alemán et al. ( , 2018. 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 J-state interference . 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 , we observe a triple-peak 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 micro-turbulent velocity and the van der Waals (vdW) broadening, which is related to Γ E . The clear impact of enhancements of the micro-turbulent 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 spectro-polarimetric observations such as those of the CLASP-2 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 semi-empirically 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.

Coherent scattering in the observer's frame for R ii
In this subsection we investigate an approximation that is applied to the scattering processes that are unperturbed by elastic collisions, quantified by R 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 frequency-angle coupling is introduced in the ensuing approximate redistribution matrix, which we hereafter refer to asR ii , 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 R 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 R ii to the emissivity, which is the most computationally intensive contribution in the case of the reference PRD calculations. The contribution fromR ii 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 in Fig. 2. The shaded regions in the figure span 0.8 Å from the center of the h and k lines, which corresponds to their Doppler width ∆λ D at the height for which their line-center τ is equal to unity for µ = 0.1 in the FAL-C 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 approxi-mateR ii 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.

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 ii h & k lines. In addition, it allows for a considerable decrease in the overall computational cost of the non-LTE RT calculations. Under this approximation, the contribution from theR ii 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 R iii , which quantifies the scattering processes that are noncoherent due to collisions.
First we discuss the influence of artificially setting to zero all the frequency-dependent components of R 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 R ii and the approximateR ii . 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 R iii were considered. Although the scattering processes quantified by R 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 6 We verified that, by setting to zero all the components of R iii including K = K = Q = 0, the intensity profile is severely underestimated, especially in the wings. 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 Eqs. (C.21)). We verified that the inclusion of depolarizing collisional rates, computed as detailed in the Appendix of Manso , 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 byR ii . 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 R 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.
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 A&A proofs: manuscript no. ms regions, especially when the damping constant does not include the contribution from elastic collisions.

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 (repre-sented 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 Eqs. (6a) and (6b)). 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 .
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 in-depth 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 R ii 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 redistribution performs considerably better when accounting for the contribution from Γ E to the damping constant.

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 two-term atom had already been considered in the past, for instance by  in the absence of magnetic fields. These authors used a heuristic R 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 . 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 , 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 far-wing 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.   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.
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 J-state interference is known to play a key role.

Conclusions
In this work, we have presented the numerical approach that we have applied to develop a non-LTE RT code for modeling the intensity and polarization of resonance lines. It is based on the theoretical framework presented in Bommier (2017Bommier ( , 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 two-term atomic system including HFS, and it allows one to jointly account for the effects of PRD, J-state 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 anal-Article number, page 12 of 27 E. Alsina Ballester et al.: Transfer of polarized radiation with PRD, J-state interference and magnetic fields ogous 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 matrixR ii is used. In the Mg ii h & 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 R iii , in which all components other than K = K = Q = 0 are neglected. We verified that the other components of R 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 R 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 forR ii , 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 ii h & 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 ). 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 filter-polarimetric observations obtained with the CLASP missions and, thereby, the inference of magnetic fields in the solar chromosphere. Upper state E u (cm −1 ) Lower state E (cm −1 ) A u (s −1 ) 2p 6 3p 2 P 1/2 35669.31 2p 6 3s 2 S 1/2 0.00 2.57 · 10 8 2p 6 3p 2 P 3/2 35760.88 2p 6 3s 2 S 1/2 0.00 2.60 · 10 8

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 two-step approach described in Sect. 2.6. In step 1, which relies on the use of the RH code, we consider a relatively simple multi-level model for the Mg ii h & 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 two-term 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 long-lived states, the atomic polarization of the term can be safely neglected. 7 Two-term atoms were considered in prior works to model the intensity and polarization of the Mg ii resonance lines (see . 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 ii h & k lines with a two-term atomic system. Moreover, a comparison between the calculations for intensity and polarization considering a two-term 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 two-term 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 two-term modeling will require a formalism through which polarization and PRD effects can be taken into account in all the lines of a cascade-type three-term 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 S J u to lower level |β L S J , given as A u = A(β u L u S J u → β L S J ). 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 where n(Mg) and n(H) are the populations of magnesium and hydrogen, respectively. Throughout this work, we have taken A(Mg) = 7.58 (see Grevesse & Anders 1991).
A&A proofs: manuscript no. ms Upper state E u (cm −1 ) Lower state E (cm −1 ) A u (s −1 ) 2p 2 P 1/2 82258.92 1s 2 S 1/2 0.00 6.26 · 10 8 2p 2 P 3/2 82259.29 1s 2 S 1/2 0.00 6.26 · 10 8 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 flat-spectrum) 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 two-term 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 C 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).
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 the Lyman-α line is much stronger (i.e., characterized by a stronger line opacity, see Milkey & Mihalas 1973b) than the Mg ii h 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 FAL-C 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. The solid black curves correspond to reference PRD calculations, whereas the red curves represent the results of calculations considering the approximate redistribution matrixR ii (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 FAL-C 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.
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. 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 line-core profiles presented in . However, a slight discrepancy was found in the line-wing Q/I pattern, in the region where J-state interference plays an important role, because in that work the authors made use of redistribution matrices in which the branching ratios and R 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 ii h & 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.
In addition to the reference PRD calculations, Fig. B.1 also shows the results obtained when neglecting Doppler redistribution in theR ii 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. 2016Ballester et al. , 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). Although we are 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 R 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.
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 ii h & 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.
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 byR ii represents a rough approximation that is suitable in the far wings. The noncoherent scattering processes quantified by R 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 non-LTE 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 two-term 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.

Appendix C.1: The atomic Hamiltonian
In the L-S 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 spin-orbit Hamiltonian H FS , whose eigenvectors are of the form |βLS JM , 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 spin-orbit one, a given fine structure J-level 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 |βLS JF f , 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 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 Wigner-Eckart 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 3-j and 6-j 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 |βLS Iµ 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 C JF µ ( f ) 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 C JF µ ( f ) = δ µ,JF . Hereafter, we write the eigenstates |βLS Iµ i f i and eigenvalues (i.e., the energies) E βLS I (µ i f i ) using the shorthand notation |µ i f i and E µ i f i , respectively. For the two-term 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 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 D K QQ (R B ) are the elements of the so-called 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 two-term 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 so-called 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 Appendix C.4: The redistribution matrices (two-term 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 R ii and R iii , which characterize scattering processes that are coherent and noncoherent in the atomic frame, respectively (see Sect. 2.4). For a two-term 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 R 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 angle-averaged approximation (see Rees & Saliba 1982). As for R 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 √ π∆ν D . Under these approximations, we can perform the decomposition into frequency and angle-dependent components shown in Eq. (9). The angle-dependent factors are of the form shown in Article number, page 21 of 27 A&A proofs: manuscript no. ms Eq. (12), where the transformation into the vertical reference system is performed according to the discussion in Appendix C.4. The frequency-dependent factors for R ii and R 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 the 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 A, 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 C F J µ ( f ) and the product of the pair C J J * M(F * f ) C F F * * (JM) f 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). 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 R ii (which quantify coherent scattering processes) and larger ones in R 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 R iii dominates over that from R 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 R iii considered in this framework was not obtained under the flat-spectrum 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 R 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).
Appendix C.6: Micro-structured 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. 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 η I (ν, Ω) = k M 3 √ π∆ν D q µ u f u µ f S µ f ,µ u f u q H a, u + u µ u f u ,µ f . (C.13) 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 small-scale 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 1 2π It is often useful to consider this distribution in order to investigate the canopy-like magnetic fields in the outer layers of the solar atmosphere.
Appendix 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 |βLS I JF f (or, with shorthand notation, |JF f ) 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 2 D (K) (J u F u ) + D (K) (J u F u ) + 2π i ∆ν D u J u F u ,J u F u − Γ R Γ R + Γ I + Γ E + 2π i ∆ν D u J u F u ,J u F u × 1 2 W a, u + u J u F u ,J F + 1 2 W a, u + u J u F u ,J F * 1 2 W a, u + u J u F u ,J F + 1 2 W a, u + u J u F u ,J F * , (C.17b) where A KK Q J u F u ,J u F u , J F , J F = 3(2L u + 1) (2S + 1)(2I + 1) (−1) F −F (2J u + 1) (2J u + 1) (2J + 1) (2J + 1) Similar expressions can be obtained directly from those presented in Appendix C.4, observing that in the unmagnetized case C JF µ = δ µ,JF . The only notable difference is that the branching ratios in the expressions obtained from Bommier (2017) contain K-multipole 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. 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 two-term atomic model with an unpolarized and infinitely sharp lower term in the absence of a magnetic field. The branching ratios and R iii were obtained from heuristic arguments. In order to recover this redistribution matrix using the present , u + u + u J u ,J + u J u ,J 2 cos Θ/2 + 1 2 W a cos Θ/2 , u + u + u J u ,J + u J u ,J 2 cos Θ/2 * , (C.23a) 1 2 W a, u + u J u ,J + 1 2 W a, u + u J u ,J * 1 2 W a, u + u J u ,J + 1 2 W a, u + u J u ,J * , (C.23b) where the quantity A 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 J u ,J and u J ,J ) is negligible.
The R 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 right-hand side of Eq. (36) in that paper. On the other hand, discrepancies remain between the R 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.