11institutetext:  Instituto de Astrofísica de Canarias, 38205 La Laguna,
Tenerife, Spain 22institutetext: Departamento de Astrofísica, Universidad de
La Laguna, 38206 La Laguna, Tenerife, Spain 33institutetext: IRSOL Istituto
Ricerche Solari “Aldo e Cele Daccó”, Università della Svizzera italiana, 6605
Locarno-Monti, Switzerland
33email<EMAIL_ADDRESS>
# The polarization signals of the solar K i D lines
and their magnetic sensitivity

E. Alsina Ballester 112233

(March 2022)

###### Abstract

Aims. This work aims to identify the relevant physical processes in shaping
the intensity and polarization patterns of the solar K i D lines through
spectral syntheses, placing particular emphasis on the D2 line.

Methods. The theoretical Stokes profiles were obtained by numerically solving
the radiative transfer problem for polarized radiation considering one-
dimensional semi-empirical models of the solar atmosphere. The calculations
account for scattering polarization, partial frequency redistribution (PRD)
effects, hyperfine structure (HFS), $J$\- and $F$-state interference, multiple
isotopes, and magnetic fields of arbitrary strength and orientation.

Results. The intensity and circular polarization profiles of both D lines can
be suitably modeled while neglecting both $J$-state interference and HFS. The
magnetograph formula can be applied to both lines, without including HFS, to
estimate weak longitudinal magnetic fields in the lower chromosphere. By
contrast, modeling the scattering polarization signal of the D lines requires
the inclusion of HFS. The amplitude of the D2 scattering polarization signal
is strongly depolarized by HFS, but it remains measurable. A small yet
appreciable error is incurred in the scattering polarization profile if PRD
effects are not taken into account. Collisions during scattering processes
have a clear depolarizing effect, although a quantitative analysis is left for
a forthcoming publication. Finally, the D2 scattering polarization signal is
particularly sensitive to magnetic fields with strengths around $10$ G and it
strongly depends on their orientation. Despite this, its center-to-limb
variation relative to the amplitude at the limb is largely insensitive to the
field strength and orientation.

Conclusions. These findings highlight the value of the K i D2 line
polarization for diagnostics of the solar magnetism, and show that the linear
and circular polarization signals of this line are primarily sensitive to
magnetic fields in the lower chromosphere and upper photosphere, respectively.

###### Key Words.:

Radiative transfer – Scattering – Polarization – Sun: chromosphere

##  1 Introduction

The K i D1 and D2 lines resonance lines encode valuable information on the
layers of the solar atmosphere between the upper photosphere and the lower
chromosphere, where the temperature minimum is found. The radiative transfer
(RT) investigations on the K i D1 line carried out by Bruls et al. (1992),
without assuming local thermodynamic equilibrium (LTE), led to the conclusion
that its line-core intensity profile is primarily formed in the photosphere.
Furthermore, the height at which the line-center optical depth is unity was
found at $450$ km above the solar surface, which is slightly below the
temperature minimum (see also the line-depression contribution functions in
Bruls & Rutten 1992). A more recent theoretical investigation (see Quintero
Noda et al. 2017) on the two potassium D lines found that the temperature
sensitivity of their line-core intensity is strongest at the lower
photosphere. On the other hand, it was also found that the responses of the
intensity to variations in the line-of-sight (LOS) velocity and of the
circular polarization to the magnetic field were centered at heights
corresponding to the upper photosphere and even the lower chromosphere. These
differences were attributed to the fact that the temperature sensitivity comes
from lower layers where the line source function is coupled to the local
thermal contributions, whereas the sensitivity to the LOS velocity and the
magnetic fields comes from higher layers where scattering processes play a
more dominant role. In addition, the D2 line was found to be sensitive to
variations in these properties at slightly greater atmospheric heights than
the D1 line. The D lines of potassium thus appear to be excellent candidates
for multiwavelength investigations; by observing them together with other
spectral lines, we could potentially probe the properties of the solar
atmosphere at various depths at the same time.

In observations close to the limb, the D2 line is expected to show linear
polarization signals of substantial amplitude, due to the scattering of
anisotropic radiation, which induces population imbalances and coherence
between the various magnetic sublevels of the atom (i.e., atomic level
polarization). These so-called scattering polarization signals are known to be
sensitive to the presence of magnetic fields via the Hanle effect (e.g.,
Trujillo Bueno 2001), which increases the diagnostic value of the D2 line.
Unfortunately, this line is strongly absorbed in the Earth’s atmosphere by a
molecular O2 line (e.g., Delbouille et al. 1973), and it is thus inaccessible
to ground-based observations. However, steps have been made toward observing
this line in recent years. One notable example is the SUNRISE Chromospheric
Infrared spectroPolarimeter (SCIP; see Katsukawa et al. 2020), designed to
provide unprecedented spectro-polarimetric measurements of this line, among
many others, during the flight of the SUNRISE III balloon-borne observatory.

A number of RT investigations focused on the K i D lines were carried out in
the past (Bruls et al. 1992; Bruls & Rutten 1992; Uitenbroek & Bruls 1992;
Quintero Noda et al. 2017), although they did not take scattering polarization
and its magnetic sensitivity into account. The hyperfine structure (HFS) of
potassium was not considered either, even though its two most abundant stable
isotopes, ${}^{39}\\!$K and ${}^{41}\\!$K, have nuclear spin $I=3/2$ and even
though all the atomic levels involved in the transitions responsible for the
D1 and D2 lines present considerable hyperfine splitting (e.g., Ney 1969;
Bendali et al. 1981; Kramida et al. 2020). Although HFS is known to only have
an appreciable impact on the intensity profiles for a small number of spectral
lines, such as the infrared Mn i lines investigated by Asensio Ramos et al.
(2007), it is essential for modeling the scattering polarization of various
other resonance lines of interest, such as the Ba ii and Na i D lines
(Belluzzi et al. 2007; Belluzzi & Trujillo Bueno 2013; Alsina Ballester et al.
2021).

Figure 1: Grotrian diagram for the two-term system with hyperfine structure
(HFS) considered to model the K i D lines. The D1 and D2 lines arise from the
transitions between states of the same lower fine structure (FS) level
$4s\,{}^{2}\mathrm{S}_{1/2}$ (ground term) and the states of the
$4p\,{}^{2}\mathrm{P}^{o}_{1/2}$ and $4p\,{}^{2}\mathrm{P}^{o}_{3/2}$ levels,
respectively. The atomic system has nuclear spin $I=3/2$, and thus the D1 line
consists of four HFS components (red lines), whereas the D2 line consists of
six HFS components (blue lines).

As illustrated in Fig. 1, the K i D lines arise from the radiative transitions
between the states of the ground term of potassium, $4s\,{}^{2}\mathrm{S}$,
and the upper term $4p\,{}^{2}\mathrm{P}^{o}$. The ground term consists of a
single fine structure (FS) level with $J=1/2$, which is common to the two
lines. The upper term consists of two FS levels with $J=1/2$ and $J=3/2$,
which are the upper levels of the D1 and D2 lines, respectively. When
accounting for the nuclear spin, these FS levels are further split into
various HFS levels characterized by quantum number $F$. Thus, the D1 and D2
lines each consist of several HFS transitions. The main goal of the present
article is to investigate which physical mechanisms are relevant in shaping
the intensity and polarization profiles of these lines. For this purpose, the
spectral synthesis code introduced in Alsina Ballester et al. (2022),
hereafter ABT22, was used. This code relies on the numerical solution of the
transfer problem for polarized radiation under non-LTE conditions. It is based
on the theoretical framework of Bommier (2017) and is suitable for modeling
spectral lines that arise from a two-term system that includes HFS. Because
the code considers a two-term model, the quantum interference between FS or
HFS levels that belong to the same term can be taken into account. Partial
frequency redistribution (PRD) effects, or the frequency correlations between
incoming and outgoing radiation in scattering processes, are also accounted
for. In addition, it takes into account the influence of magnetic fields of
arbitrary strengths and orientations considering the Paschen-Back (PB) effect.

The article is structured as follows. Section 2 presents the main equations
involved in the considered RT problem and a brief discussion on the numerical
methods employed in the above-mentioned numerical code. Section 3 is dedicated
to the evaluation of the impact of specific (nonmagnetic) physical parameters
or processes on the intensity and polarization patterns of the K i D lines.
First, the impact of accounting for the second-most abundant of the stable
isotopes, ${}^{41}\\!$K, is examined. Then, the influence of considering
atmospheric models that represent regions of the Sun with different levels of
activity is explored. The redistribution and depolarization effects of
collisions with neutral perturbers are also studied in this section. Finally,
the impact on the line profiles of HFS and the quantum interference between
different atomic states is investigated. The analysis in Sect. 4 is focused on
the impact of the magnetic field, first regarding the scattering polarization
signals of the D2 line in the presence of magnetic fields of various
geometries, considering an LOS close to the solar limb. The same section also
considers an analysis of the circular polarization patterns in both D lines,
highlighting which physics mechanisms must be taken into account to suitably
model them. Section 5 presents a brief analysis of the center-to-limb (CLV)
variation of the intensity and linear polarization at the center of the D2
line. In Sect. 6, the response functions for the intensity and polarization of
the K i D2 line are presented and discussed when considering atmospheric
models permeated with vertical and horizontal magnetic fields, accounting for
the first time for scattering polarization and HFS. Finally, the main
conclusions of this work are summarized in Sect. 7.

The parameters of the atomic model considered in the RT calculations, and
details of the numerical calculations, are given in Appendix A. The extension
to the case of multiple isotopes of the expressions that are implemented in
the RT code, which are given in ABT22, is detailed in Appendix B. The Hanle
diagram for the scattering polarization emitted at a height in the atmospheric
model that corresponds to the lower chromosphere, and its variation with the
strength and orientation of the magnetic field is shown in Appendix C. The
Stokes profiles for the D lines, calculated for the same geometries considered
in Sect. 4 but in the presence of stronger magnetic fields, are shown in
Appendix D.

##  2 Formulation of the problem

The spectral synthesis code used throughout this work solves the non-LTE RT
problem in one-dimensional (1D) atmospheric models. The numerical framework on
which the code is based is described in detail in ABT22. For the sake of
brevity this section only contains the expressions for the main quantities
involved in the solution of the RT problem and a brief discussion on the
considered iterative scheme and on the geometry of the problem.

###  2.1 Equations of the problem

The intensity and polarization of a partially polarized radiation beam is
characterized by its Stokes vector $\bm{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 vector at frequency $\nu$ as it
propagates through the medium in direction $\mathbf{\Omega}$ along the ray
path, determined by coordinate $s$, is given by the radiative transfer
equation (RTE)

$\frac{\mathrm{d}}{\mathrm{d}s}\bm{I}(\nu,\mathbf{\Omega})=-\mathbf{K}(\nu,\mathbf{\Omega})\,\bm{I}(\nu,\mathbf{\Omega})+\bm{\varepsilon}(\nu,\mathbf{\Omega}).$
(1)

All the quantities that appear in this ordinary differential equation have a
dependency on the spatial coordinate $\mathbf{r}$,111The spatial coordinates
$\mathbf{r}$ and $s$ are related through
$\mathrm{d}s=\mathbf{\Omega}\cdot\mathrm{d}\mathbf{r}$. which is not shown
explicitly in this article for simplicity of notation. The propagation matrix
$\mathbf{K}$ has the form

$\mathbf{K}=\left(\begin{array}[]{c c c
c}\eta_{I}&\eta_{Q}&\eta_{U}&\eta_{V}\\\
\eta_{Q}&\eta_{I}&\rho_{V}&-\rho_{U}\\\
\eta_{U}&-\rho_{V}&\eta_{I}&\rho_{Q}\\\
\eta_{V}&\rho_{U}&-\rho_{Q}&\eta_{I}\end{array}\right)\,,$ (2)

in which the dependencies on $\nu$ and $\mathbf{\Omega}$ are not shown for
simplicity of notation. The diagonal element $\eta_{I}$ is the absorption
coefficient. The $\eta_{Q}$, $\eta_{U}$, and $\eta_{V}$ elements are the
dichroism coefficients, and $\rho_{Q}$, $\rho_{U}$, and $\rho_{V}$ are the
anomalous dispersion coefficients. The emission in each of the four Stokes
parameters is quantified by the four components of the emission vector
$\bm{\varepsilon}$.

Hereafter, the elements of the propagation matrix and the components of the
emission vector are collectively referred to as the RT coefficients. In
general, each of them has a line and a continuum contribution, but under
typical conditions of the solar atmosphere the continuum contribution to the
dichroism and anomalous dispersion coefficients can be safely neglected (see
Landi Degl’Innocenti & Landolfi 2004, hereafter LL04). Thus, the absorption
coefficient and the $i$-th component of the emission vector can be decomposed
into

$\displaystyle\eta_{I}(\nu,\mathbf{\Omega})=\eta^{\ell}_{I}(\nu,\mathbf{\Omega})+\eta^{c}_{I}(\nu,\mathbf{\Omega})\,,$
(3)
$\displaystyle\varepsilon_{i}(\nu,\mathbf{\Omega})=\varepsilon_{i}^{\ell}(\nu,\mathbf{\Omega})+\varepsilon_{i}^{c}(\nu,\mathbf{\Omega})\,,$
(4)

where the labels $\ell$ and $c$ indicate the line and continuum contribution,
respectively. Each of these contributions to the emission vector can be
further decomposed into scattering and thermal contributions, labeled “sc” and
“th,” respectively. The continuum contributions considered in this work are
obtained as explained in ABT22.

Regarding the line contribution, it is worth recalling that the atomic system
considered in this work is, in the most general case, a two-term atom with
HFS.222Unlike in the case of a multilevel atomic model, the quantum
interference between FS levels that belong to the same term is taken into
account in a multiterm system. In the absence of a magnetic field, each of the
atomic states of the system can be characterized by the quantum numbers for
the electronic (orbital plus spin) total angular momentum $J$ and the atomic
(electronic plus nuclear) total angular momentum $F$. The various (degenerate)
states with the same numbers $J$ and $F$ are further characterized by the
magnetic quantum number $f$, which corresponds to a measurement of the
operator for $F$ along a selected quantization axis. In the nonmagnetic case,
one can make a distinction between the quantum interference between pairs of
states that belong to (i) the same $J$ and $F$ level, (ii) different $F$
levels of the same $J$ level – hereafter $F$-state interference – and (iii)
different $J$ levels – hereafter $J$-state interference (e.g., Stenflo 1997;
Casini & Manso Sainz 2005). As will be discussed further in Sect. 4, the
degeneracy of the $f$ states is broken in the presence of magnetic fields.
When the magnetic field is strong enough that the incomplete PB effect regime
is reached, $J$ and $F$ are no longer good quantum numbers of the system and
thus they cannot be used to characterize the atomic states.

In addition, the lower term of the system is assumed to be unpolarized and
infinitely sharp.333An atomic term is said to be polarized when the various
states that belong to it present population imbalances or quantum coherence.
The term is said to be infinitely sharp if all its states are infinitely
sharp. Such an atomic system is generally suitable for modeling resonance
lines that originate from transitions between the ground term of the atom and
an upper term that is not collisionally or radiatively connected to other
terms of lower energy, which is the case for the K i D lines. Furthermore, the
abovementioned code can account for the contribution from different isotopes.
The expressions for the line contributions to the elements of the propagation
matrix, for an atomic system with a single isotope, can be found in Appendix
C.3 of ABT22. The generalization to a two-isotope atomic model is
straightforward (see Appendix B).

In LTE conditions, Kirchhoff’s law states that the unpolarized line emissivity
divided by the absorption coefficient is equal to the Planck function.
According to the principle of detailed balance, this relation must hold
separately for any direction, frequency range, and polarization state (e.g.,
Sect. 9.15 in Reif 1965). Thus, in LTE conditions, the polarized components of
the line emission vector are proportional to the corresponding dichroism
coefficients. Moreover, these relations for the emissivity can be separated
into the scattering and thermal contributions, and the latter is given by

$\varepsilon_{i}^{\ell,\mbox{\scriptsize
th}}(\nu,\mathbf{\Omega})=\epsilon\,B_{T}(\nu)\,\eta_{i}(\nu,\mathbf{\Omega})\,,$
(5)

where $B_{T}(\nu)$ is the Planck function, taking the Wien limit (under the
reasonable assumption of neglecting stimulated emission). The photon
destruction probability due to inelastic collisions is given by
$\epsilon=\Gamma_{I}/(\Gamma_{R}+\Gamma_{I})$, where $\Gamma_{R}$ and
$\Gamma_{I}$ are the contributions to the line broadening constant from
radiative transitions and inelastic collisions, respectively. This expression
is independent of the radiation field and holds in non-LTE conditions as long
as inelastic collisions are isotropic and the perturbers follow a Maxwellian
distribution of velocities. The expression for the particular case of a two-
level atom was derived in Sect. 10.6 of LL04 and the one for a multiterm atom
with HFS in the nonmagnetic case can be found in Belluzzi et al. (2015a). The
corresponding derivation for a two-term atom with HFS accounting for the PB
effect will be presented in a separate paper.

The line scattering contribution to the emission vector can be related
directly to the incident radiation, making use of the redistribution matrix
formalism (e.g., Domke & Hubeny 1988)

$\varepsilon_{i}^{\ell,\mbox{\scriptsize
sc}}(\nu,\mathbf{\Omega})=\,k_{M}\\!\int\\!\\!\mathrm{d}\nu^{\prime}\\!\oint\mathrm{d}\mathbf{\Omega}^{\prime}\\!\sum_{j=0}^{3}\bigl{[}\mathcal{R}(\nu^{\prime},\mathbf{\Omega}^{\prime},\nu,\mathbf{\Omega})\bigr{]}_{ij}\,I_{j}(\nu^{\prime},\mathbf{\Omega}^{\prime})\,,$
(6)

where the primed quantities correspond to the incident radiation. The labels
$i$ and $j$ indicate the Stokes components of the scattered and incident
radiation, respectively. The quantity $k_{M}$ is the frequency-integrated
absorption coefficient at the considered spatial point $\mathbf{r}$ (e.g.,
Sect. 10.16 of LL04). An expression for the redistribution matrix can be
obtained for the considered atomic system, because a closed analytical
solution exists for the master equation that characterizes the populations of
its various states and the quantum interference between pairs of them.

As explained in detail in ABT22, the RT code used for this investigation makes
use of the redistribution matrices presented in Bommier (2017, 2018).
Following the notation introduced in Hummer (1962), the redistribution matrix
can be given as a sum of the $\bm{\mathcal{R}_{\mbox{\sc{ii}}}}$ and
$\bm{\mathcal{R}_{\mbox{\sc{iii}}}}$ matrices. The
$\bm{\mathcal{R}_{\mbox{\sc{ii}}}}$ matrix quantifies the scattering processes
for which frequency coherence is preserved in the atomic rest frame, and
$\bm{\mathcal{R}_{\mbox{\sc{iii}}}}$ quantifies those for which the
frequencies of the incoming and outgoing radiation are uncorrelated in the
same reference frame, due to collisions that perturb the atomic system. The RT
calculations are carried out in the reference frame of the observer, taking
into account the frequency redistribution effects produced by small-scale
atomic motions via the Doppler effect. This introduces an angle-frequency
coupling which greatly increases the numerical cost of computing the emission
vector. In order to avoid this coupling, the following approximations are
used. For $\bm{\mathcal{R}_{\mbox{\sc{ii}}}}$, the angle-averaged
approximation introduced in Rees & Saliba (1982) is applied. The assumption
that the frequencies of the incident and scattered radiation are completely
uncorrelated in the observer’s reference frame is made for
$\bm{\mathcal{R}_{\mbox{\sc{iii}}}}$; this is often referred to as the
assumption of complete frequency redistribution (CRD) in the observer’s frame.
Under these approximations, the expressions for the redistribution matrices
for the above-mentioned atomic system are found in Appendix C.4 of ABT22,
which can also be easily generalized to the two-isotope case (see Appendix B).

Appreciable errors in numerical calculations due to the angle-averaged
approximation in $\mathcal{R}_{\mbox{\sc{ii}}}$ were reported in the past,
both when considering semi-infinite and isothermal atmospheric models
(Faurobert 1988; Sampoorna et al. 2017) and when synthesizing strong resonance
lines in semi-empirical atmospheric models (e.g., Janett et al. 2021). The
suitability of assuming CRD in the observer’s reference frame for
$\bm{\mathcal{R}}_{\mbox{\sc{iii}}}$ in the polarized case was called into
question by Bommier (1997), but more recent RT investigations by Sampoorna et
al. (2017) suggest that that the incurred error is minor when considering
atmospheres with a large optical depth relative to the considered line.
However, a quantitative determination of the accuracy of the approximations
for $\bm{\mathcal{R}}_{\mbox{\sc{ii}}}$ and
$\bm{\mathcal{R}}_{\mbox{\sc{iii}}}$ is beyond the scope of this
investigation. These approximations are suitable for the goal of this paper,
which is to determine which physical mechanisms shape the intensity and
polarization profiles of the K i D lines, rather than to accurately reproduce
observations.

###  2.2 The numerical scheme

The theoretical line profiles shown in the following section are obtained from
the numerical solution of the non-LTE RT problem for polarized radiation. The
employed synthesis code iteratively solves the RTE (Eq. (1)) and the equation
that relates the radiation field to the line emissivity through the
redistribution matrices (Eq. (6)) until a self-consistent solution is reached.
As explained in Sect. 2.6 of ABT22, the problem is solved through a two-step
process that consists of two distinct RT calculations.

The goal of the first step is to provide the population of the lower term
$N_{\ell}$, which is kept fixed in the second step, where it is used to
compute $k_{M}$. In this work, this preliminary step was carried out in the
unpolarized case and considering a multilevel atom (see Appendix A), making
use of the RH code of Uitenbroek (2001). This calculation provides a more
realistic value of $N_{\ell}$ than the one that would be obtained by
considering a two-term atomic model. This step also provides other quantities
of interest including the rates of elastic and inelastic collisions, the
continuum absorption coefficient $\eta^{c}_{I}$, the unpolarized continuum
thermal emissivity $\varepsilon^{c,\mbox{\scriptsize th}}_{I}$, and the
extinction coefficient for the scattering of the continuum $\sigma_{c}$. These
quantities are stored and used in step 2 of the calculation.

In the second (or main) step, the RT problem is solved while taking
polarization into account, considering in the most general case a two-term
atomic model with HFS and the two most abundant stable isotopes of potassium.
The step-2 RT calculations are carried out using the code described in Sect. 2
of ABT22, which makes use of expressions shown in the previous subsection.
These calculations are carried out using the Jacobi iterative scheme described
in the same paper, and Eq. (1) is solved numerically via the DELOPAR short-
characteristics method (see Trujillo Bueno 2003).

Figure 2: Intensity (upper panels) and Stokes $Q/I$ (lower panels) profiles as
a function of air wavelength, for the $0.8$ Å–wide spectral ranges centered on
the K i D2 (left panels) and D1 (right panels) lines. Calculations were
carried out using the radiative transfer (RT) code introduced in Sect. 2,
considering a two-term atomic model with HFS, accounting for partial frequency
redistribution (PRD) effects, and in the absence of a magnetic field. For all
the figures in this work, a line of sight (LOS) with $\mu=0.2$ is taken except
where otherwise noted. The results of calculations considering the two most
abundant isotopes of potassium (solid red curves) are compared to those in
which only 39K was considered (solid black curves). The atmospheric model C
of Fontenla et al. (1993), hereafter FAL-C, was considered for both
calculations. Throughout this work, the reference direction for positive
Stokes $Q$ is taken to be parallel to the limb.

###  2.3 Atmospheric model and geometry of the problem

In all calculations, 1D semi-empirical models of the solar atmosphere were
considered. Except where otherwise noted, model C of Fontenla et al. (1993),
hereafter FAL-C, was considered; this model is representative of a spatially
averaged region of the quiet Sun. The LOS of the emergent radiation is given
relative to the local vertical, through $\mu=\cos\theta$, in which $\theta$ is
the inclination or heliocentric angle. Except where otherwise noted, an LOS
with $\mu=0.2$ was considered; this corresponds to radiation emerging close to
the solar limb. Magnetic fields, when included (see Sect. 4), were taken with
a fixed strength and orientation at all height points of the model. Their
orientation is determined by the inclination relative to the local vertical,
$\theta_{B}$, and the azimuth $\chi_{B}$, or the angle relative to the plane
defined by the local vertical and the LOS. The reference direction for
positive Stokes $Q$ was taken to be parallel to the limb except where
otherwise stated (see Fig. 1 of ABT22).

##  3 The intensity and polarization of the K i D lines in the nonmagnetic
case

This section is dedicated to analyzing which physical mechanisms and
properties play an important role in the intensity and polarization profiles
of the K i D lines, especially D2, in the absence of magnetic fields. In order
to identify the impact of a specific physical mechanism, the results of
calculations in which it was taken into account and neglected are compared. In
the most general calculations, the two most abundant stable isotopes of
potassium, HFS, both $J$\- and $F$-state interference, and PRD effects in
scattering were all taken into account. The resulting intensity and $Q/I$
profiles are represented by the red curves in Fig. 2. These profiles are shown
as a function of air wavelength for two spectral ranges centered on the D1 and
D2 lines, each with a width of $0.8$ Å. The intensity signal at the center of
the D-lines presents a drop of roughly one order of magnitude relative to the
continuum value, and it is slightly deeper for the stronger D2 line. For the
considered LOS, a $Q/I$ signal with an amplitude of roughly $0.4\%$ is found
in the core of the D2 line. This scattering polarization signal arises from
the anisotropic radiation that illuminates the atom, which induces atomic
alignment.444Atomic alignment is a type of atomic level polarization and it
refers to the population imbalances between states with different magnetic
quantum numbers $\bigl{|}f\bigr{|}$ that belong to the same atomic level.
Atomic orientation refers to the population imbalances between the states with
quantum numbers $f$ and $-f$. The antisymmetric $Q/I$ pattern found within the
core of the D1 line arises from a related but distinct physical mechanism. It
originates because the incident anisotropic radiation field is spectrally
structured over the range spanned by the different HFS transitions that
contribute to the D1 line (see Belluzzi & Trujillo Bueno 2013; Alsina
Ballester et al. 2021). However, because the hyperfine splitting in both the
upper and lower levels of the D1 line is relatively small, the maximum
fractional linear polarization amplitude of the signal within the line core is
on the order of $10^{-5}$, which is at the detection limit of even the latest
generation of spectro-polarimeters (Ramelli et al. 2010). Thus, unlike the
linear polarization pattern of the Na i D1 line (e.g., Alsina Ballester et al.
2021), the scattering polarization signal of the K i D1 line is too small to
be of present diagnostic interest and thus it will be omitted from most of the
discussions in the rest of this paper.

###  3.1 The influence of multiple isotopes on the modeling

Potassium is mostly found in the form of two stable isotopes, 39K and 41K,
which have isotopic abundances of $93.3\%$ and $6.7\%$, respectively (see
Kramida et al. 2020). When considering a single isotope instead of both of
them, the numerical cost of computing the redistribution matrix decreases by
roughly a factor 2. A comparison between the results of the RT calculations
accounting for both isotopes (red curves) and only for 39K by setting its
abundance to $100\%$ (black curves) is shown in Fig. 2.

Figure 3: Intensity (left panel) and Stokes $Q/I$ (right panel) profiles as a
function of wavelength in the spectral range centered on the K i D2 line. The
RT calculations were carried out in the absence of a magnetic field for a two-
term atomic model with HFS, taking PRD effects into account. In the
calculations illustrated in this figure and all those shown below, only the
39K isotope was considered. The colored curves (see legend) represent the
results of calculations considering the various atmospheric models presented
in Fontenla et al. (1993) and Avrett (1995).  Figure 4: Intensity (left panel)
and Stokes $Q/I$ (right panel) profiles as a function of wavelength in the
spectral ranges centered on the K i D2 line. The RT calculations were carried
out in the absence of a magnetic field and for a two-term atomic model with
HFS. The results of the calculation accounting for PRD (black curves) are
compared to those obtained in the complete frequency redistribution (CRD)
limit (red curves) as described in the text. In this figure and all those
shown below, the calculations were carried out considering the FAL-C
atmospheric model.

No differences are found between the intensity profiles obtained from the two
calculations. On the other hand, accounting for the 41K isotope has a small
but appreciable impact on the linear polarization signal of D lines. At the
center of the D2 line, the amplitude of the $Q/I$ signal is slightly above
$0.40\%$ when it is included, and drops to slightly below $0.39\%$ when only
considering 39K. A similar relative difference is found in the core of the D1
line. These variations can be taken to be acceptably small, and thus only the
39K isotope will be considered for the calculations carried out in the rest of
the article. Moreover, the intensity profiles will be omitted from the rest of
the figures if they coincide with those represented by the black curves in
Fig. 2.

###  3.2 The influence of the atmospheric models

This section is dedicated to studying how the intensity and linear
polarization signals of the K i D lines vary according to the level of
activity of the considered region of the solar atmosphere. Figure 3 shows a
comparison between the $I$ and $Q/I$ profiles of the D2 line obtained from RT
calculations for various semi-empirical 1D atmospheric models in the absence
of magnetic fields. The corresponding profiles for the D1 line are not shown
because the behavior of the $I$ profiles is very similar to the ones for D2
and, as noted above, the amplitude of its $Q/I$ is too small to be of present
diagnostic interest. The considered models are A, C, F, and P of Fontenla et
al. (1993), hereafter the FAL models, which are representative of various
regions of the solar atmosphere, ordered from the lowest to the highest level
of activity. The M${}_{\mbox{\scriptsize CO}}$ model of Avrett (1995),
hereafter FAL-X, which represents a quiet region of the solar atmosphere with
lower temperatures than FAL-C, was also considered. As expected, the intensity
increases strongly with the level of activity, both in the continuum and the
core of either lines. On the other hand, the drop in the line center relative
to the continuum is smaller for models that correspond to more active regions.

The amplitude of the $Q/I$ signal in the core of the D2 line decreases when
considering models that correspond to regions with a higher level of activity.
This amplitude is directly related to the degree of anisotropy of the
radiation field at the atmospheric layers where the line forms. These profiles
become less peaked as the level of activity increases; for the FAL-P model, a
plateau is found around the line center.

###  3.3 The impact of frequency redistribution

When modeling the scattering polarization profiles of resonance lines that are
stronger than the potassium D lines, such as the Ca i line at $4227$ Å or the
Mg ii doublet, it is crucial to account for PRD effects in order to reproduce
the broad and large-amplitude signals produced in their wings (e.g., Auer et
al. 1980; Belluzzi & Trujillo Bueno 2012; Alsina Ballester et al. 2018). On
the other hand, the approximation of neglecting frequency correlations between
incoming and scattered radiation (i.e., CRD) is instead found to accurately
reproduce the intensity and $Q/I$ signals of lines weaker than K i D1 and D2
that do not present broad scattering polarization wings, such as the
photospheric Sr i line at $4607$ Å (e.g., Alsina Ballester et al. 2017).

This subsection analyzes the impact of PRD effects on the K i D2 line by
comparing the theoretical profiles obtained by fully accounting for such
effects, as in Sect. 3.1, and by making the CRD approximation. This
approximation was implemented in the RT calculations by modifying the line
broadening coefficient due to elastic collisions $\Gamma_{E}$ that enters the
branching ratios of the redistribution matrices so that it is much larger than
the radiative line broadening and thus practically all line scattering
processes are quantified by $\bm{\mathcal{R}}_{\mbox{\sc{iii}}}$ (see Appendix
C.5 of ABT22). The resulting intensity and $Q/I$ profiles of the D2 line are
shown in Fig. 4. The intensity profiles obtained through the two calculations
are found to be in very good agreement, which is consistent with Uitenbroek &
Bruls (1992) and Quintero Noda et al. (2017). The only notable difference is
that the drop in the line-center intensity is slightly less pronounced for the
CRD calculation than for the PRD one, which is common for absorption lines
(e.g., Alsina Ballester et al. 2017). The rates of elastic collisions are
relatively low where the D2 line-center optical depth is close to unity
(between roughly $500$ and $650$ km in the FAL-C model, depending on the
considered LOS) and most scattering processes are described by
$\bm{\mathcal{R}}_{\mbox{\sc{ii}}}$ (the coherence fraction, defined as in
Sect. 10.4 of Hubeny & Mihalas 2015, ranges between $0.6$ and $0.8$ at the
same heights in FAL-C). In spite of this, the difference between the PRD
intensity profile and the one obtained under the CRD approximation remains
very minor (see also Faurobert 1987); their similarity can be attributed to
the effects of Doppler redistribution (e.g., Thomas 1957). Although it is not
shown here, the impact of CRD on the D1 intensity profile is likewise minor.

On the other hand, the treatment of frequency redistribution has an
appreciable impact in the linear polarization profile of the D2 line. In the
line core, clear discrepancies are found between the $Q/I$ signals obtained
from the two calculations. The maximum amplitude reaches $\sim\\!0.45\%$ under
the CRD approximation and $\sim\\!0.39\%$ when accounting for PRD effects. At
the D2 line-core formation depths, the anisotropy of the radiation field is
smaller in the core than in the wings. This can explain why the line-core
$Q/I$ is slightly smaller when accounting for frequency correlations than in
the CRD case, in which only the wavelength-averaged radiation field is
considered. Although it is not shown here, it can be verified that the
differences between the $Q/I$ profiles obtained under the PRD and CRD
treatments would remain appreciable when accounting for the smearing due to
the resolution of a typical instrument (for instance, $R=2\cdot 10^{5}$ for
SCIP; see Katsukawa et al. 2020). Thus, in the calculations presented in the
following sections, PRD is considered except where otherwise noted.

Figure 5: Stokes $Q/I$ profile as a function of wavelength in the spectral
range centered on the K i D2 line. The RT calculations were carried out in the
absence of a magnetic field and considering a two-term atomic model with HFS.
For the figures shown in the rest of this work, PRD effects were taken into
account in the line scattering emissivity unless otherwise noted. Calculations
carried out neglecting the impact of depolarizing collisions (black curves)
are compared to those in which the $D^{(2)}(J_{u},F_{u})$ rates were set to
$\frac{1}{2}Q_{\mathrm{el}}$ for all HFS levels with quantum number $F\geq 1$
(red curves).  Figure 6: Stokes $Q/I$ profiles as a function of wavelength in
the spectral ranges centered on the K i D2 (left panel) and D1 (right panel)
lines. The RT calculations were carried out in the absence of a magnetic
field. A comparison is shown between the calculations considering a two-term
atomic model with HFS, both taking $J$-state interference into account (black
curves) and neglecting it (blue curves), and the calculations considering two-
level atomic models with HFS (red curves), in which there is no $J$-state
interference by definition. Overlapping curves are dashed to enhance
visibility.

###  3.4 The depolarizing effect of elastic collisions

In the formation regions of the K i D line cores, the density of perturbers
such as neutral hydrogen is low but not negligible. These collisions impact
the scattering polarization signals both through the frequency redistribution
discussed in the subsection above and by relaxing atomic level polarization
(i.e., collisional depolarization). In the absence of a magnetic field, the RT
code used in step 2 of the calculations (see Sect. 2) can account for the
depolarizing effect of the collisions that induce transitions between states
that belong to the same HFS level, making use of the redistribution matrices
presented in Appendix C.7 of ABT22, in which the impact of depolarizing
collisions is quantified by the $K$-multipole depolarizing rates
$D^{(K)}(J_{u},F_{u})$.

The intensity profiles are not impacted by the depolarizing effect of
collisions and thus they are not shown here. Their impact on the D2 $Q/I$
profiles is illustrated in Fig. 5, which shows a comparison between the
calculations setting $D^{(K)}=0$ for all $K$ values and accounting for
depolarizing collisions as follows. For all levels with $F\geq 1$, which can
in principle carry alignment, the rates $D^{(2)}$ were estimated using the
approximate relation $D^{(2)}=0.5\,\Gamma_{E}$. The rates $D^{(1)}$ for the
same levels were obtained using a relation derived under the assumption that
these collisions can be described through a Van der Waals interaction (see
Sect. 7.13 of LL04). These depolarizing collisions have a noticeable impact on
the D2 $Q/I$ profile, both in the dips in the near wing and in the peak in the
line core, where a decrease of about $8\%$ is found. Although not shown in the
figure, it can be verified that a comparable relative depolarization occurs in
the line-core peaks of D1.

It should be noted that the relations between the rates of depolarizing
collisions and the elastic collisional rates considered in this work represent
a rough estimate, and the calculation of the latter rates may be subject to
further inaccuracies. In addition, the redistribution matrix formalism
considered in this work can only account for the depolarizing effect of
collisions in the absence of magnetic fields.555In the presence of magnetic
fields that break the degeneracy of the $f$ states that belong to the same HFS
level, the collisional coupling between such states precludes the analytical
solution of the master equation (for details, see Bommier 2017). As a result,
the corresponding redistribution matrix cannot be derived. Moreover, the
depolarization due to collisionally induced transitions between states that
belong to the same term, but which have different $J$ or $F$ numbers, cannot
be taken into account even in the nonmagnetic case, even though they could be
expected to have an impact comparable to that of the transitions within the
same $F$ level (see Bommier 2017). Therefore, despite the clear impact that
depolarizing collisions have on the scattering polarization signals, they will
not be taken into account in the rest of this work. As such, the scattering
polarization amplitude of the K i D lines is somewhat overestimated. A more
rigorous analysis of the impact of the depolarizing collisions in the K i D
lines is left for a forthcoming publication.

###  3.5 The impact of the $J$\- and $F$-state interference

Figure 7: Stokes $Q/I$ profiles as a function of wavelength in the spectral
ranges centered on the K i D2 (left panel) and D1 (right panel) lines. The RT
calculations were carried out in the absence of a magnetic field. A comparison
is shown between the calculations considering a two-term atomic model with
HFS, both taking $F$-state interference into account (black solid curves) and
neglecting it (blue dashed-dotted curves), and the calculation for a two-term
atomic model without HFS (red dotted curves).

This subsection is focused on the impact of $J$\- state and $F$-state
interference (see Sect. 2.1) on the scattering polarization patterns of the K
i D-lines. First, the impact of $J$-state interference is investigated through
a comparison of the $Q/I$ patterns obtained through three different
calculations, which in all cases accounted for HFS and $F$-state interference.
The results of the comparison are highlighted in Fig. 6. Two of the
calculations were carried out considering two-term atomic models, accounting
for $J$-state interference (black curves) and neglecting it by artificially
setting to zero the terms in the redistribution matrix that couple states that
belong to different $J$ levels (blue curves; see Appendix C.7 of ABT22 for
details). Finally, calculations for the D1 and D2 lines were carried out
separately by considering two-level models, for which $J$-state interference
cannot be included by definition but $F$-state interference was taken into
account (red curves). For both lines, a perfect agreement is found between the
results of the two-level calculations and the two-term ones in which $J$-state
interference was artificially neglected. Fully accounting for this
interference has no appreciable impact on the D2 scattering polarization and
only a small one on the wings of D1. Regardless, the rest of the calculations
presented in this work considered a two-term atomic model in which $J$-state
interference was taken into account, unless otherwise noted.

The impact of HFS and $F$-state interference is highlighted in Fig. 7, which
presents a comparison between the $Q/I$ profiles obtained by considering two-
term atomic models with HFS, taking $F$\- and $J$-state interference into
account (black curves) and neglecting $F$-state interference (blue curves).
The latter was implemented in a manner similar to what was discussed in
Appendix C.7 of ABT22, but only neglecting the interference between the
$F$-levels that belong to the same $J$-level. The same figure also contains
the results of the calculations considering a two-term atomic model in which
the HFS is neglected by artificially setting the nuclear spin $I$ to zero,
while still accounting for $J$-state interference (red curves). The intensity
profiles, which are not impacted by the inclusion of HFS or by $F$-state
interference, are not shown.

Figure 8: Energies of the magnetic $f$ states associated with the
$4s^{2}\mathrm{S}_{1/2}$ (upper left panel),
$4p^{2}\mathrm{P}^{\mathrm{o}}_{1/2}$ (upper right panel), and
$4p^{2}\mathrm{P}^{\mathrm{o}}_{3/2}$ (the two lower panels) FS levels of K i,
relative to their corresponding baricenters. A range of magnetic field
strengths between $0$ and $200$ G is selected in all panels except the lower
left, in which a smaller range is displayed to highlight various level
crossings. The colors of the curves indicate the magnetic quantum number $f$
of each state, including $-3$ (purple), $-2$ (blue), $-1$ (green), $0$
(black), $1$ (yellow), $2$ (orange), and $3$ (red).

The $Q/I$ profile of D2 is substantially depolarized by the inclusion of HFS.
When not taking it into account, the scattering polarization amplitude
increases by roughly a factor $3$. On the other hand, by including HFS but
neglecting $F$-state interference, the resulting scattering polarization is
further depolarized, and it presents a signal roughly $4$ times smaller than
the one obtained without HFS. This behavior is consistent with the theoretical
HFS depolarization factors of the scattering phase matrix
$\bigl{[}D_{K}\bigr{]}_{\mbox{\scriptsize HFS}}$ for $K=2$ (see Sect 10.22 of
LL04), related to atomic alignment. When accounting for HFS but assuming that
the hyperfine splitting between $F$-levels is zero, the depolarizing effect of
HFS vanishes and $\bigl{[}D_{2}\bigr{]}_{\mbox{\scriptsize HFS}}=1$. In this
case, the various $F$ levels are degenerate, and therefore the quantum
interference between them is maximum. When there is a splitting between the
various $F$ levels, the interference between them decreases, causing a
depolarization. This depolarization increases with the hyperfine splitting
until the splitting is much larger than the natural width of the line, at
which point the quantum interference between $F$ levels is effectively zero.
At this limit, the depolarization for the K i D2 line is given by
$\bigl{[}D_{2}^{\infty}\bigr{]}_{\mbox{\scriptsize HFS}}=0.27$. When
considering the real HFS splitting of the upper level of the line, the
theoretical value of $\bigl{[}D_{2}\bigr{]}_{\mbox{\scriptsize HFS}}$ rises to
$0.36$. The polarization profiles shown in Fig. 7 are slightly more
depolarized by HFS than would be predicted from these factors alone, as a
consequence of transfer effects that reduce the anisotropy of the radiation
field in the solar atmosphere, thereby reducing the $Q/I$ signal further.

Despite the small scattering polarization amplitude of the D1 line, HFS has an
obvious impact on its linear polarization pattern. Indeed, the antisymmetric
profile around the line core is no longer found when neglecting HFS; in this
case the depolarized feature typical of intrinsically unpolarizable absorption
lines is produced instead. This is fully consistent with the physical origin
of the antisymmetric signal around the line core discussed at the beginning of
Sect. 3. Although not shown here, it can also be verified that this signal is
mainly a consequence of the hyperfine splitting of the lower term, which is
roughly one order of magnitude larger than that of the upper term. Indeed,
neglecting the $F$-state interference between states of the upper term has no
appreciable impact on the D1 $Q/I$ pattern.

##  4 The magnetic sensitivity of the K i D lines

Ultimately, the magnetic field modifies the intensity and polarization
profiles by inducing energy shifts in the states that are involved in the
transitions that contribute to the considered spectral line. On one hand,
these energy shifts give rise to frequency shifts between the various
components of the spectral line, leading to a displacement of the baricenters
of the $\sigma$ and $\pi$ components of the line; this produces the intensity
and polarization signatures commonly associated with the Zeeman effect. On the
other, the magnetically induced changes in the energy of the atomic states
also affect the atomic level polarization, which is responsible for scattering
polarization.

Moreover, in the presence of a magnetic field that is strong enough to produce
a splitting within a given $F$ level comparable to the separation between the
various $F$ levels, the eigenstates of the Hamiltonian for an atomic system
with HFS no longer coincide with those of atomic (electronic plus nuclear)
total angular momentum $\mathbf{F}$. Thus, the magnetic field introduces a
mixing between states characterized by different $F$, which is thus no longer
a good quantum number of the system. Due to this mixing, the dependency of the
eigenstates of the Hamiltonian (for which the $f$ remains a good quantum
number) on the magnetic field strength deviates from linearity. This
phenomenon is referred to as the PB effect for HFS (or Back-Goudsmit) effect.
In principle, the PB effect would also induce a mixing between states with
different $J$ when the magnetic splitting within $J$ levels becomes comparable
to the separation between the various $J$ levels. However, the energy
separation between the $J$ (or FS) levels responsible for the K i D lines (see
Appendix A) is large enough that, in the presence of magnetic fields with
strengths typically encountered in the Sun, $J$ can be considered a good
quantum number of the Hamiltonian. Thus, the various eigenstates of the
Hamiltonian can be safely associated with a specific $J$ level.

In Fig. 8, the energies of the various $f$ states of the ground level
($4s\,{}^{2}\mathrm{S}_{1/2}$) and the upper levels of both the D1
($4p\,{}^{2}\mathrm{P}^{\mathrm{o}}_{1/2}$) and D2
($4p\,{}^{2}\mathrm{P}^{\mathrm{o}}_{3/2}$) lines are shown as a function of
the field strength, relative to their corresponding baricenters. The ground
level and the upper level of the D1 line have the same quantum numbers and
their various $f$ states have a qualitatively similar magnetic dependency.
However, the hyperfine splitting is smaller for the upper level and, as a
result, deviations from linearity, especially in the form of repulsions
between $f$ states,666The crossing of the energies of states with different
$f$ numbers and the apparent repulsion between states with the same $f$ may
produce signatures in the scattering polarization that are often referred to
as level-crossing and antilevel-crossing effects, respectively (e.g., Bommier
1980). are appreciable for weaker magnetic fields, as low as $15$ G. For
magnetic fields stronger than $100$ G, a linear dependency with the field
strength is regained for the upper level of D1 as the transition from the
incomplete to the complete PB effect regime is made. For the ground level,
deviations from linearity are not clearly appreciable until field strengths of
$\sim\\!40$ G are considered and the complete PB effect regime is not reached
until well beyond $200$ G. On the other hand, the hyperfine splitting for the
upper level of D2 is even smaller than for the other FS levels. Level
crossings can be identified in $4p^{2}\mathrm{P}^{\mathrm{o}}_{3/2}$ for field
strengths as low as $3$ G, and repulsions can be appreciated in the presence
of even weaker fields. The complete PB effect regime is reached at around $40$
G.

Figure 9: Stokes $I$ (upper left panel), $V/I$ (lower left panel), $Q/I$
(upper right panel), and $U/I$ profile (lower right panel) as a function of
wavelength, calculated in the presence of a vertical ($\theta_{B}=0^{\circ}$)
magnetic field. The various colored curves represent different field strengths
(see legend). The figures in this subsection only show the spectral range
centered on the K i D2 line. For this figure, and the rest of those presented
in this work, a two-term atomic model with HFS is considered.

###  4.1 The influence of the magnetic field on the D2 scattering polarization

The influence of the magnetic field on the scattering polarization patterns of
the K i D2 line is analyzed in this subsection.

Figure 10: Stokes $V/I$ profiles as a function of wavelength, shown in a range
centered on the D2 and calculated in the presence of vertical
($\theta_{B}=0^{\circ}$) magnetic fields of $5$ (left panel) and $25$ G (right
panels). The black curves represent the results of RT calculations considering
a two-term atomic model with HFS. The red curves represent calculations in
which, additionally, all components of the radiation field tensor other than
$J^{0}_{0}$ were set to zero, which effectively suppresses atomic level
polarization fully (see text).  Figure 11: Stokes $Q/I$ (left panel), and
$U/I$ (right panel) profiles as a function of wavelength, calculated in the
presence of horizontal ($\theta_{B}=90^{\circ}$) magnetic fields, contained in
the plane defined by the local vertical and the LOS ($\chi_{B}=0^{\circ}$).
The various colored curves represent different field strengths (see legend).

The discussion is focused on the synthetic Stokes profiles of this line,
obtained for three different geometries for the magnetic field. In all cases,
the fields are taken with the same strength and orientation at all height
points of the model.

####  4.1.1 Vertical magnetic fields

The D2 line profiles that were obtained in the presence of vertical magnetic
fields ($\theta_{B}=0^{\circ}$) with various strengths between $0$ and $100$ G
are shown in Fig. 9. The reader is referred to Figs. 19 and 20 for the
profiles obtained in the presence of stronger magnetic fields with the same
geometry, for the D2 and D1 lines, respectively. The response function of the
D2 line for a vertical magnetic field is presented in Fig. 16 in Sect. 6. The
intensity profiles are insensitive to magnetic fields in the range of
strengths considered here and therefore are not shown in the rest of figures
in this section.

The $Q/I$ amplitude is found to increase with field strength, but this trend
begins to halt beyond $25$ G and only a small increase is found between $50$
and $100$ G. The magnetic enhancement of the scattering polarization signal in
lines produced by atomic systems with substantial hyperfine splitting was
already identified by Trujillo Bueno et al. (2002). If the magnetic field is
vertical, and the incident radiation field is axially symmetric around the
same direction, it only modifies the scattering polarization through the
interference between states with the same quantum number $f$ (as can be seen
from the expressions in Appendix C.4 of ABT22). Thus, the magnetic
enhancements are a consequence of the aforementioned repulsion between such
states and of the ensuing change in the interference between them (this is an
example of an antilevel-crossing effect).

Because vertical magnetic fields do not break the axial symmetry of the
problem, the scattering of anisotropic radiation does not give rise to $U/I$
signals in this case. The peaks in the wings of both the $Q/I$ and $U/I$
profiles are instead signatures associated with the Zeeman effect and are
sensitive to the transverse component of the magnetic field. For stronger
magnetic fields (see Fig. 19), the line-core $Q/I$ and $U/I$ are also
dominated by such Zeeman-type signals.

The antisymmetric circular polarization profiles, whose amplitude increases
with the longitudinal component of the magnetic field, are also signatures
associated with the Zeeman effect. Although it is not shown in this section,
it was verified that the thermal contribution to the line emissivity (see Eq.
(5)) has no appreciable impact on the scattering polarization signals, but it
does contribute to the Zeeman-type linear and circular polarization signals.
In the presence of relatively weak magnetic fields, it is particularly
important to take it into account when modeling $V/I$.

For the geometry under consideration, the circular polarization of D2 may be
impacted to a certain degree by the alignment-to-orientation (AtO) conversion
mechanism (see Kemp et al. 1984, also LL04). This is apparent from the
asymmetries found in the $V/I$ profile close to the line core in the presence
of magnetic fields of around $5$ G, shown in the left panel of Fig. 10.
However, even in this case the peak and area asymmetries of its Stokes $V$
signals are no larger than $2\%$ and $3\%$, respectively. Additional
calculations were carried out in which all the components of the radiation
field tensor (e.g., Sect. 5.11 of LL04) other than $J^{0}_{0}$ were
artificially set to zero at each iteration in step 2 of the RT problem (see
Sect. 2.2), which effectively sets the atomic level polarization to zero. As
can be seen from the figure, the abovementioned asymmetry is no longer found
in the core region in this case, which strongly indicates that it originates
from the AtO mechanism. On the other hand, when considering stronger magnetic
fields such that the complete PB effect regime is reached in the upper level
of D2, the circular polarization pattern is fully dominated by Zeeman-type
signatures, and asymmetries are not appreciable (see right panel). Asymmetries
in the circular polarization of the Na i D2 line were also reported in the
theoretical investigation of Sampoorna et al. (2019), in which the line was
modeled as a two-level atom with HFS. They were also identified as signatures
of the incomplete PB effect and were found to be considerable in the presence
of fields with strengths of up to roughly $30$ G.

####  4.1.2 Horizontal magnetic fields

Horizontal magnetic fields contained in the plane defined by the local
vertical and the LOS (i.e., $\theta_{B}=90^{\circ}$ and $\chi_{B}=0^{\circ}$),
with strengths up to $30$ G, are considered here. The resulting linear
polarization profiles are shown in Fig. 11. The response function of the D2
line for a magnetic field with this geometry is presented in Fig. 17 in Sect.
6. For the considered field strengths, the transverse component is rather
small and the linear polarization signals associated with the Zeeman effect
are not appreciable. However, in the presence of stronger magnetic fields,
such signatures become apparent in the linear polarization profile of both D
lines (see Figs. 21 and 22).

Circular polarization signals associated with the Zeeman effect are also found
for this geometry. However, the $V/I$ profiles are not shown in the figure; a
discussion on such signals, considering geometries for which the longitudinal
component of the magnetic field is large, can be found in the dedicated Sect.
4.2. No appreciable asymmetries are found around the core region of the $V/I$
profile, even for field strengths for which the upper $J$ level of D2 is well
within the incomplete PB effect regime. In principle, one may have expected
the AtO mechanism to have a greater impact than in the presence of the
vertical magnetic fields discussed above (e.g., Sect. 10.20 of LL04). The lack
of apparent asymmetries for this geometry can be attributed to the fact that
the horizontal magnetic field strongly reduces the overall atomic alignment,
thereby reducing the impact of this conversion mechanism. Its impact is
further masked by the fact that the circular polarization signals associated
with the Zeeman effect, which are proportional to the longitudinal component
of the magnetic field, have a considerably larger amplitude.

Figure 12: Stokes $Q/I$ profiles as a function of wavelength, calculated in
the presence of microstructured and isotropic magnetic fields, with strengths
up to $5$ G (left panel) and $100$ G (right panel). The various colored curves
represent the different field strengths (see legend).

For the relatively weak magnetic fields considered in Fig. 11, the $Q/I$
signal in the D2 core decreases progressively as the magnetic field increases,
in contrast to the enhancement found in the presence of a vertical magnetic
field. Because the magnetic field is inclined with respect to the symmetry
axis of the radiation field, the scattering polarization is also affected by
the interference between states of the upper term such that $|\Delta
f|=|f_{u}-f_{u}^{\prime}|\neq 0$. The impact of the magnetic field on such
interference produces a decrease in the scattering polarization amplitude.

The asymmetry introduced in the problem by the magnetic field gives rise to a
$U/I$ signal. Its amplitude increases for field strengths up to $3$ G, then
decreases until about $6$ G, and then increases again until reaching roughly
$10$ G. This nonmonotonic behavior is a characteristic of level-crossing
effects (see also Appendix C). Indeed, the field strengths at which the second
increase in the $U/I$ signal is found correspond to the crossing of two states
having $f=-2$ and $f=0$. As the magnetic field further increases, the energy
levels of the various states separate further and their interference
decreases, and thus the total scattering polarization amplitude continues to
decrease, both in Stokes $Q/I$ and $U/I$, eventually reaching a saturation
value when the complete PB effect regime is entered.

####  4.1.3 Microstructured and isotropic magnetic fields

In addition to deterministic magnetic fields (i.e., those with a single
orientation at any given point on the spatial grid), the numerical code used
for the step-2 calculations (see Sect. 2.2) can consider microstructured
magnetic fields (i.e, those whose orientation changes over scales smaller than
the mean free path of the line’s photons), as discussed in Appendix C.6 of
ABT22. The Stokes $Q/I$ profiles obtained from calculations considering
microstructured fields with an isotropic distribution of orientations and
strengths up to $100$ G are shown in Fig. 12. In this scenario, the magnetic
field has no net longitudinal component and thus the $V/I$ signal remains
zero. Because the magnetic field does not introduce any axial asymmetry, no
$U/I$ signal is produced either and thus only $Q/I$ is shown in the figure.
For field strengths up to roughly $15$ G, the $Q/I$ signal of the D2 line
decreases as the magnetic field becomes stronger. The $Q/I$ then reaches an
amplitude minimum, which is slightly above half the nonmagnetic value. As the
field strength increases further, the $Q/I$ increases by a small amount,
reaching a plateau as the upper level of the D2 enters the complete PB effect
regime. The scattering polarization amplitude remains almost constant beyond
$50$ G, which is a similar phenomenon to the well-know Hanle saturation that
has been extensively studied in two-level atoms (e.g., Sect. 5.12 of LL04).

The same behavior was theoretically described for the Na i D2 line in Sect.
10.22 of LL04, in which the quantity
$\bigl{[}M_{K}(B\to\infty)\bigr{]}_{\mbox{\scriptsize{hfs}}}/\bigl{[}M_{K}(0)\bigr{]}_{\mbox{\scriptsize{hfs}}}$
was introduced. This ratio characterizes the magnetically induced
depolarization of the components of the emission vector with a specific value
of the quantum number $K$ in the complete PB effect regime, relative to its
nonmagnetic value. For $K=2$, this ratio is a good indication of the decrease
in the linear polarization signal for the K i D2 line. Indeed, for the quantum
numbers, FS and HFS splitting, and radiative line broadening of the K i D2
line, this ratio is roughly $0.55$, which is consistent with the results shown
in Fig. 12.

Interestingly, the $Q/I$ amplitude obtained at field strengths beyond $50$ G
coincides with the one found when neglecting HFS in the presence of isotropic
magnetic fields with the same strengths (not shown). As discussed above, the
$Q/I$ amplitude of the D2 line obtained in the absence of a magnetic field is
substantially larger when HFS is neglected (see Fig. 7). Thus, in the case
without HFS, a microstructured and isotropic magnetic field at saturation
reduces the amplitude by the well-known factor $0.2$ (e.g., Trujillo Bueno &
Manso Sainz 1999) instead of by $0.55$. Indeed, the product of the
(nonmagnetic) depolarization factor due to HFS discussed in Sect. 3.5 and the
magnetic depolarization factor accounting for HFS discussed in the previous
paragraph is $0.36\times 0.55\simeq 0.2$.

Figure 13: Stokes $V/I$ profiles as a function of wavelength, for the spectral
ranges centered on the K i D2 (left panels) and D1 (right panels) lines,
respectively. Upper panels: an LOS of $\mu=1$ is considered in the presence of
vertical magnetic fields. Lower panels: an LOS of $\mu=0.2$ is considered in
the presence of horizontal fields with azimuth $\chi_{B}=0^{\circ}$. A field
strength of $200$ G is considered for both geometries. The results of RT
calculations accounting for HFS and accounting for the Paschen-Back (PB)
effect (black solid curves) are compared to calculations neglecting HFS in the
atomic model (red dashed-dotted curves) and calculations accounting for HFS
but making the linear Zeeman splitting (LZS) approximation as described in the
text (blue solid curves).

###  4.2 Circular polarization signals due to the Zeeman effect

This subsection is dedicated to analyzing the circular polarization signals
the K i D2 and D1 lines. The amplitude of these signals scales linearly with
the longitudinal component of the magnetic field up until strengths of a few
hundred gauss; beyond this point, the magnetic splitting becomes comparable to
the Doppler width and this linearity is lost (see Sect. 9.6 of LL04). Figures
showing the profiles obtained in the presence of stronger fields can be found
in Appendix. D. The two geometries considered here were selected so that the
magnetic field has a large longitudinal component. For the first geometry, an
LOS with $\mu=1$ and a vertical magnetic field was considered, whereas for the
other an LOS with $\mu=0.2$ and a horizontal magnetic field with
$\chi_{B}=0^{\circ}$ was taken. In both cases, a field strength of $200$ G was
selected. The resulting $V/I$ profiles for the D1 and D2 lines are indicated
with the black curves in Fig. 13.

When considering a vertical magnetic field and an LOS with $\mu=1$, secondary
$V/I$ peaks are found farther into the wings than the main peaks, with the
same sign. By carrying out test RT calculations under the same conditions, but
setting to zero all components of the radiation field tensor except for
$J^{0}_{0}$ at each iteration as discussed in Sect. 4.1.1 (not shown for this
geometry), it was verified that these secondary lobes are unaffected by the
other components (in contrast to what was found for the Mg ii $k$ line in
Alsina Ballester et al. 2016, where the $J^{1}_{Q}$ radiation field tensors
were found to have an appreciable impact in the wings). This implies that
these lobes are not produced by the AtO mechanism. On the other hand, test
calculations carried out without accounting for the impact of the magnetic
field on the thermal line contribution to the emissivity of Eq. (5) greatly
overestimated the amplitude of these secondary peaks. In addition, it was
verified that PRD effects only have a minimal impact on the circular
polarization profile through a comparison with CRD calculations, although
these results are not explicitly shown in this paper either.

The computational cost of evaluating the emission vector can be reduced
substantially by neglecting HFS (compare the expressions for the
redistribution matrices with and without HFS, which are given in Appendices
C.4 and C.8 of ABT22, respectively). Although this approach is found to be
unsuitable for modeling the scattering polarization signals of the D lines, it
allows for an accurate modeling of their intensity profiles (see Sect. 3.5).
Here, its suitability for modeling the $V/I$ signals is evaluated by comparing
the results of RT calculations in which HFS is taken into account and
neglected. Such a comparison is shown in Fig. 13 for the two abovementioned
geometries and taking a field strength of $200$ G, for which the complete PB
effect regime for HFS is reached in the upper FS levels of both lines. The
impact of HFS is barely appreciable in the $V/I$ signals and thus, for most
practical purposes, it can be neglected when modeling the circular
polarization signals of these lines. On the other hand, it is worth recalling
that HFS is required to reproduce the slight asymmetries in the D2 $V/I$
profile due to the AtO mechanism discussed in Sect. 4.1.1. Calculations
identical to the ones discussed here, but considering a field strength of $50$
G, were also carried out. In this case, the impact of HFS on the $V/I$
profiles was likewise found to be negligible.

Alternatively, when accounting for HFS, one may be tempted to simplify the
numerical calculations by making the so-called linear Zeeman splitting (LZS)
approximation, in which the energy of all the magnetic sublevels is assumed to
vary linearly with the field strength. This can be achieved in the RT
calculations by artificially setting to zero the off-diagonal elements of the
magnetic Hamiltonian that couple states with different $F$ or $J$ (see
Appendix C.1 of ABT22), thereby neglecting the mixing between states with
different $F$ (or $J$) quantum numbers that characterizes the PB effect. A
comparison of the $V/I$ profiles calculated considering the LZS approximation
(see blue curves in Fig. 13) and fully accounting for the PB effect (black
curves) reveals the approximation to be unsuitable. Indeed, the LZS
approximation yields a maximum amplitude that is too small by roughly a factor
2. Qualitatively similar results were found when considering a field with a
strength of $50$ G instead of $200$ G (not shown in this paper).

Figure 14: Stokes $V/I$ profiles as a function of wavelength, for the spectral
ranges centered on the K i D2 (left panels) and D1 (right panels) lines,
respectively. Upper panels: an LOS of $\mu=1$ is considered in the presence of
a $200$ G vertical magnetic field. Lower panels: an LOS of $\mu=0.2$ is
considered in the presence of a $200$ G horizontal field with azimuth
$\chi_{B}=0^{\circ}$. The results of RT calculations considering an atomic
model with HFS (black solid curves) are compared to those obtained through the
magnetograph formula, in which the effective Landé factors $\bar{g}$ were
obtained without accounting for HFS (red solid curves). The $\bar{g}$ values
for the D1 and D2 lines are shown in the corresponding panels.

A common approach to obtain information on solar magnetic fields from
observations of the circular polarization signals in spectral lines is the
magnetograph formula (see Sect. 9.6 of LL04), which is sometimes referred to
as the weak field approximation. This formula relates the circular
polarization signal to the wavelength derivative of the intensity, with a
factor that depends on the longitudinal component of the magnetic field and
the effective Landé factor $\bar{g}$. Given that the centers of the D1 and D2
lines are separated by $\sim\\!\\!30$ Å, this approach can be applied to each
of them individually, effectively treating them as if they arise from distinct
two-level atomic systems (see Sect. 3.5). Furthermore, bearing in mind that
HFS has no significant impact on the $V/I$ signal, the effective Landé factors
of the two lines (e.g., Sect. 3.3 of LL04) can be calculated without taking it
into account. Under the assumption of L-S (or Russel-Saunders) coupling, the
effective Landé factors for the D1 and D2 lines are $4/3$ and $7/6$,
respectively. The profiles obtained through the application of the
magnetograph formula as detailed here reproduce the results of the full RT
calculation accounting for HFS remarkably well. This is illustrated in Fig. 14
for the two abovementioned geometries. Thus, valuable information on the
longitudinal component of the magnetic field can be accessed through the
application of the magnetograph formula. Finally, it must be recalled that its
applicability is limited to the range of field strengths for which the
magnetic splitting between $f$ states is much smaller than the width of the
line profile (i.e., weak fields). Indeed, as the field strength increases
beyond $\sim\\!350$ G, the results obtained under the magnetograph formula
deviate increasingly from those obtained with full RT calculations (see the
figures in Appendix. D).

Figure 15: Center-to-limb variation (CLV) of the Stokes $I$ (left panel) and
$Q/I$ (right panel) signal at the wavelength $\lambda_{0}$ at the D2 line
center. The colored curves correspond to the results of calculations in which
$15$ G magnetic fields were considered, including a microturbulent and
isotropic field (green curve) and deterministic magnetic fields, both vertical
($\theta_{B}=0^{\circ}$; red curve) and horizontal and contained in the plane
defined by the local vertical and the LOS ($\theta_{B}=90^{\circ}$,
$\chi_{B}=0^{\circ}$; blue curve). The CLV obtained in the absence of a
magnetic field (black curve) is also shown. The thin black dashed line
indicates $Q/I=0$.

##  5 Center-to-limb variation at the D2 line center

In Sect. 4.1, special attention was paid to the intensity and scattering
polarization signals found at an LOS with $\mu=0.2$. However, it may be of
interest to consider also the radiation emerging closer to the disk center,
especially for comparisons with observations. Here, the CLV of the intensity
and $Q/I$ is investigated in the presence of magnetic fields of different
orientations, assuming them to be constant with height. The results of
calculations considering the FAL-C atmospheric model are shown in Fig. 15 for
a series of LOSs between $\mu=0.05$ and $1$, in steps of $0.05$, at an air
wavelength that corresponds to the center of the D2 line
($\lambda_{0}=7664.89$ Å). The results of the nonmagnetic case are compared to
those of the three magnetic field realizations investigated in Sect. 4.1,
taking a field strength of $15$ G in all cases. These realizations include two
different deterministic magnetic fields, one horizontal within the plane
defined by the local vertical and the LOS ($\theta_{B}=90^{\circ}$ and
$\chi_{B}=0^{\circ}$) and one vertical ($\theta_{B}=0^{\circ}$), as well as a
microstructured and isotropic field.

The intensity exhibits the same CLV in the four cases, which is consistent
with the relative lack of magnetic sensitivity discussed in Sect. 4.1. A clear
limb darkening is found for D2 and a similar behavior is found at the center
of the D1 line (not shown). This occurs because, for wavelengths close to the
center of these lines, the intensity of the radiation field sharply decreases
from the upper photosphere to the lower chromosphere, and the radiation
emerging closer to the limb is generally sensitive to conditions at higher
atmospheric regions.

Closely related to the limb darkening is the fact that the degree of
anisotropy of the radiation field increases with height at the same spatial
regions. Both the height dependence of the radiation anisotropy and the
increase of $I$ toward disk center contribute to the fact that $Q/I$ decreases
with $\mu$ much faster than would be expected from the well-known
$\sim\\!\\!(1-\mu^{2})$ trend (e.g., Trujillo Bueno 2003), which is often
assumed when considering slab models. It is also noteworthy that, although the
$Q/I$ amplitudes strongly vary among the considered magnetic field
realizations (as discussed in Sect. 4.1), the relative variation of the
amplitude with $\mu$ is quite similar for the four cases, at least under the
assumption that the strength and orientation of the magnetic field is constant
with height. Despite this, in the presence of a horizontal magnetic field, the
linear polarization signal does not fall to zero at the disk center ($\mu=1$)
but instead becomes negative due to the Hanle effect for forward scattering
(e.g., Trujillo Bueno 2001, also Sect. 5.13 of LL04). In any case, the fact
that the relative CLV of the $Q/I$ signal is only weakly sensitive to the
orientation of the magnetic field is an interesting finding from the
diagnostic perspective. Used in combination with the information on the
longitudinal component of the magnetic field, which is available through the
circular polarization signals, the scattering polarization can provide
constraints on the magnetic field vector and on the anisotropy of the
radiation field.

##  6 Response functions for the magnetic field with scattering polarization
and HFS

The intensity and polarization signals of spectral lines often present their
strongest sensitivity to different physical properties of the atmosphere at
different depths. Indeed, Quintero Noda et al. (2017) reported that the line-
core intensity of the K i D lines is mainly sensitive to the temperature in
the lower photosphere, whereas the sensitivities of the intensity to the LOS
velocity and of $V/I$ to the magnetic field were found to be strongest in the
upper photosphere. That investigation was focused on the so-called response
functions, which quantify the sensitivity of a given observable (in that case
the Stokes parameters) to a specific atmospheric property $X(\mathbf{r})$. In
a plane-parallel one-dimensional atmospheric model such that its properties
depend only on the height $z$, it is given by

$I_{i}(\lambda)=\int_{-\infty}^{z_{0}}\\!R_{i}^{X}(\lambda,z)\,X(z)\,\mathrm{d}z\,,$
(7)

where $I_{i}$ is the $i$-th Stokes parameter of the emergent radiation (see
Sect. 2.1), $z_{0}$ is the upper boundary of the atmospheric model, and
$R_{i}^{X}$ is the response function of $I_{i}$ to $X$. $I_{i}$ and
$R_{i}^{X}$ also depend on the LOS, but this dependency is omitted for
simplicity of notation. This section is focused on the response functions for
the magnetic field in the spectral region around the D2 line, in which the
impact of scattering polarization and HFS is taken into account for the first
time. The response of $I_{i}$ to the magnetic field at height $z$ was
determined by adding a perturbation to the magnetic field strength from the
lower boundary of the problem up to that same height, such that

$B(z^{\prime})=\Delta B\,H(z-z^{\prime})+B^{(0)}\,,$ (8)

where $H$ is the step function, which is zero for $z^{\prime}\\!>\\!z$ and
unity otherwise. $\Delta B$ is the magnetic perturbation, and $B^{(0)}$ is the
strength of the unperturbed magnetic field. Following Uitenbroek (2006) with
some changes in notation, the response function can be found as

$R_{i}(\lambda,z)=\frac{1}{\Delta B}\frac{\mathrm{d}}{\mathrm{d}z}\Delta
I_{i}^{z}(\lambda)\,,$ (9)

in which the $B$ superscript is dropped from the response function for
simplicity of notation. $\Delta I_{i}^{z}(\lambda)$ is the difference between
the value of the Stokes parameter $I_{i}(\lambda)$ obtained with a
perturbation up to height $z$ and the value obtained in the unperturbed case.
For a discrete spatial grid, the response function for a perturbation up to
grid point $k$ can be computed according to

$R_{i}(\lambda,z_{k})=\frac{1}{\Delta
B}\frac{I_{i}^{z_{k}}(\lambda)-I_{i}^{z_{k-1}}(\lambda)}{z_{k}-z_{k-1}}\,,$
(10)

where $z_{k}$ and $z_{k-1}$ are the heights at the grid point under
consideration and the adjacent one closer to the lower boundary.
${I_{i}^{z_{k}}}$ and ${I_{i}^{z_{k-1}}}$ are the $i$-th components of the
Stokes vector, computed considering the perturbation up to grid points $k$ and
$k-1$, respectively. The response functions for the four Stokes components
over intensity are shown in Figs. 16 and 17 for vertical and horizontal
magnetic fields, respectively.777The response functions shown in the figures
were smoothed by performing a cubic interpolation onto spatial and frequency
grids that are finer than those of the original problem. The figures show a
$0.8$ Å–wide spectral range centered on the D2 line. The response functions
were computed from the Stokes profiles obtained as in Sects 4.1.1 and 4.1.2,
for an LOS with $\mu=0.2$ and with $B^{(0)}=5$ G and $\Delta B=1$ G. For each
Stokes component, the $R_{i}(\lambda,z_{k})/I(\lambda)$ were normalized to
their largest absolute value, and therefore they do not directly provide
information on the impact of the magnetic field relative to the Stokes
profiles. In order to highlight this impact, the corresponding Stokes profiles
for each panel of Figs. 16 and 17 are overplotted with magenta curves, which
show those obtained in the unperturbed case (solid curves) and in the case
that the perturbation is included at all grid points (dashed-dotted curves).
Indeed, the comparison of the intensity profiles that were obtained with and
without such perturbations indicates that they are not appreciably impacted by
magnetic fields with the strengths considered in this section, whereas the
polarization patterns are clearly sensitive to such magnetic fields.

For both horizontal and vertical magnetic fields, the strongest response of
$Q/I$ is found in the core region for perturbations around $700$ km, which is
well above the temperature minimum and corresponds to the lower chromosphere
in the FAL-C model. A strong response in the line-core $U/I$ is found at
similar heights in the case of a horizontal magnetic field, which introduces
an axial asymmetry in the problem. On the other hand, the impact of a vertical
magnetic field on the line-core $U/I$ is much more modest and is attributed
mainly to the action of magneto-optical (MO) effects (e.g., Sect. 9.8 of
LL04). The near-wing $Q/I$ and $U/I$ signals present their strongest response
to perturbations at photospheric depths, although the amplitude of such
signals is smaller than in the core region, and thus they are of less
diagnostic interest. This response is attributed mainly to the action of MO
effects and to the modification of the scattering polarization discussed in
Sects. 4.1.1 and 4.1.2, which still has an appreciable impact at these
wavelengths. For the case of vertical magnetic fields, in which the response
of $U/I$ is weak in the line core, the relative response is found to be
stronger at near-wing wavelengths.

As expected, the main response to the circular polarization signals is not
found at the line center but instead at the wavelengths that correspond to the
main $V/I$ peaks. As such, the strongest response is to perturbations centered
at roughly $500$ km, which is close to the temperature minimum in the FAL-C
atmospheric model, in agreement with Quintero Noda et al. (2017). The slight
asymmetry with respect to the line center in the response of $V/I$, which is
more apparent for the case of a vertical magnetic field, can be attributed to
the AtO conversion mechanism (see Sect. 4.1.1).

Figure 16: Response functions for Stokes $I$ (upper left panel), $V$ (lower
left panel), $Q$ (upper right panel), and $U$ (lower right panel) to a $1$ G
perturbation applied to the FAL-C atmospheric model, permeated by a $5$ G
vertical magnetic field (see text), over intensity. An LOS with $\mu=0.2$ is
considered. The $R_{i}/I$ in each panel is normalized to the largest absolute
value. For each panel, the corresponding Stokes $I$, $V/I$, $Q/I$, or $U/I$
profiles are overplotted in magenta curves, in order to highlight the impact
of the magnetic field. The solid curve represents the profiles obtained in the
presence of the unperturbed magnetic field, whereas the dash-dotted curve
represent those obtained in the case that a perturbation is applied at all
height points. Figure 17: Response functions for Stokes $I$ (upper left
panel), $V$ (lower left panel), $Q$ (upper right panel), and $U$ (lower right
panel) to a $1$ G perturbation applied to the FAL-C atmospheric model,
permeated by a horizontal magnetic field with $\chi_{B}=0^{\circ}$, over
intensity. An LOS with $\mu=0.2$ is considered. The $R_{i}/I$ in each panel is
normalized to the largest absolute value. For each panel, the corresponding
Stokes $I$, $V/I$, $Q/I$, or $U/I$ profiles are overplotted in magenta curves,
in order to highlight the impact of the magnetic field. The solid curve
represents the profiles obtained in the presence of the unperturbed magnetic
field, whereas the dash-dotted curve represent those obtained in the case that
a perturbation is applied at all height points.

##  7 Concluding comments

The K i D resonance lines encode valuable information on the thermodynamical
and magnetic properties of the solar regions that comprise the photosphere and
the lower chromosphere. The D2 line, despite not being accessible via ground-
based observations, is theoretically expected to present substantial
scattering polarization signals that enhance its diagnostic value. In this
article, a recently developed non-LTE RT code (see ABT22) was employed to
determine which are the relevant physical mechanisms in shaping the Stokes
profiles of the K i D lines, focusing especially on D2.

The intensity profiles can be suitably modeled while neglecting HFS and
$J$-state interference and making the CRD approximation for scattering
processes. In addition, the magnetic field has no appreciable impact on the
intensity of the D lines until field strengths of several hundreds of gauss
are considered. The shape of these profiles depends mainly on the
thermodynamic properties of the atmospheric model and their variation with
height. A considerable limb darkening is also found in both D lines.

The circular polarization signals can also be suitably modeled under the CRD
approximation, without accounting for HFS or $J$-state interference. For a
magnetic field with a longitudinal component of $10$ G, the resulting $V/I$
profiles present a maximum amplitude on the order of $\sim\\!\\!1\%$, and this
amplitude increases linearly with the field strength until reaching a few
hundred gauss. The strongest response of the $V/I$ peaks is to the magnetic
fields found close to the temperature minimum. The AtO conversion mechanism
can introduce slight asymmetries in the $V/I$ pattern of the D2 line, which
are clearly appreciable in the presence of vertical magnetic fields with
strengths up to $15$ G. For stronger fields, such that the upper level of D2
enters the complete PB effect regime, the signatures of this mechanism become
less apparent. From a diagnostic perspective, it is noteworthy that the
magnetograph formula can be suitably applied to infer the longitudinal
component of weak magnetic fields from the $V/I$ patterns of both D lines,
while neglecting HFS when determining the effective Landé factors.

On the other hand, modeling the linear polarization profiles is significantly
more involved. Unlike for the intensity signal, a minor but appreciable error
is incurred in the scattering polarization when assuming that all potassium
atoms are found in the form of the most abundant isotope, ${}^{39}\\!$K. The
CRD treatment of the scattering polarization signals represents only a rough
approximation; it leads to an overestimation of the line-center amplitude that
is still appreciable when accounting for the spectral smearing due to solar
dynamics and the finite resolution of instruments such as SCIP. The impact of
$J$-state interference can be safely neglected, but both HFS and $F$-state
interference must be taken into account. In the absence of a magnetic field,
the scattering polarization amplitude of the D2 line is found to be on the
order of $0.4\%$ for an LOS with $\mu=0.2$. This value is found when
accounting for HFS, which depolarizes the signal by roughly a factor $3$. It
is also necessary to account for HFS in order to reproduce the antisymmetric
pattern found in the core region of the D1 line. However, because of the small
spectral separation between the HFS components of this intrinsically
unpolarizable line, its $Q/I$ peak-to-peak amplitude is on the order of
$10^{-5}$, which is at the detection limit of state-of-the-art spectro-
polarimeters. A preliminary investigation of the depolarizing effect of
collisions with neutral perturbers was also carried out, which indicated that
they appreciably reduce the scattering polarization amplitudes of both D
lines. A deeper analysis of this aspect is left for a forthcoming publication.

The response of the D2 line-core linear polarization is strongest for magnetic
fields at heights that correspond to the lower chromosphere. The impact of the
magnetic field is especially notable in the range of strengths up to $15$ G,
for which its upper FS level is still in the incomplete PB effect regime for
HFS. Above this range, the variation of the scattering polarization amplitude
with field strength becomes more modest and it eventually reaches saturation
at around $50$ G. On the other hand, in the presence of magnetic fields with a
net transverse component of around $50$ G, a symmetric linear polarization
pattern associated with the Zeeman effect begins to appear, and its amplitude
increases for stronger magnetic fields. The magnetic sensitivity of the
scattering polarization signals is also highly dependent on the orientation of
the magnetic field, which is highlighted in this work through three
illustrative cases. The presence of a vertical magnetic field induces an
enhancement of the scattering polarization amplitude. By contrast, a
horizontal magnetic field with $\chi_{B}=0^{\circ}$ produces a depolarization
and a rotation of the plane of linear polarization. Finally, the presence of a
microstructured and isotropic magnetic field also depolarizes the $Q/I$
signal, and its amplitude at saturation is just above half of that found in
the nonmagnetic case. The saturation amplitudes obtained when accounting for
HFS and neglecting it coincide, in agreement with theoretical predictions. The
CLV of the D2 scattering polarization, relative to its amplitude at the limb,
is quite similar for the various orientations and for the nonmagnetic case.
The only notable difference in behavior is found in the presence of horizontal
fields, for which a nonzero signal is found at small inclinations, which can
be attributed to the Hanle effect for forward scattering. These findings,
together with the above-mentioned sensitivity of the circular polarization
signals to the longitudinal component of the magnetic field, establish the
polarization signals of the K i D lines as valuable observables for inferring
information about the strength and geometry of the magnetic field in the solar
regions between the upper photosphere and lower chromosphere.

This theoretical work was focused on 1D static atmospheric models. However,
recent investigations on other resonance lines, such as the Sr i line at 4607
Å (del Pino Alemán et al. 2018) or the Ca i line at 4227 Å (Jaume Bestard et
al. 2021) emphasized that the horizontal inhomogeneities in thermodynamical
properties such as temperature and density can strongly influence their
scattering polarization signals, as can the horizontal components of the
macroscopic atmospheric velocities. Even in 1D models, it may be important to
account for the dynamic nature of the solar atmosphere (see the investigation
by del Pino Alemán et al. 2020, focused on the resonance and subordinate
ultraviolet lines of Mg ii). Moreover, the theoretical results of Quintero
Noda et al. (2017) showed that atmospheric LOS velocities also have a
considerable impact on the shape of the circular polarization signals of the K
i D-lines. Thus, it will be of interest to extend the present investigation to
consider dynamic and/or 3D models of the solar atmosphere.

Acknowledgements. The funding received from the European Research Council
(ERC) under the European Union’s Horizon 2020 research and innovation
programme (ERC Advanced Grant agreement No. 742265) and from the Swiss
National Science Foundation (SNSF) through Grant 200021_175997 is gratefully
acknowledged. Thanks are also extended to Luca Belluzzi (IRSOL) and Javier
Trujillo Bueno (IAC) for an attentive reading of the manuscript and for
valuable discussions.

## References

  * (1)
  * Alsina Ballester et al. (2016) Alsina Ballester, E., Belluzzi, L., & Trujillo Bueno, J. 2016, ApJ, 831, L15
  * Alsina Ballester et al. (2017) Alsina Ballester, E., Belluzzi, L., & Trujillo Bueno, J. 2017, ApJ, 836, 6
  * Alsina Ballester et al. (2018) Alsina Ballester, E., Belluzzi, L., & Trujillo Bueno, J. 2018, ApJ, 854, 150
  * Alsina Ballester et al. (2021) Alsina Ballester, E., Belluzzi, L., & Trujillo Bueno, J. 2021, Phys. Rev. Lett., 127, 081101
  * Alsina Ballester et al. (2022) Alsina Ballester, E., Belluzzi, L., & Trujillo Bueno, J. 2022, A&A, 664, A76
  * Asensio Ramos et al. (2007) Asensio Ramos, A., Martínez González, M. J., López Ariste, A., Trujillo Bueno, J., & Collados, M. 2007, ApJ, 659, 829
  * Arimondo et al. (1977) Arimondo, E., Inguscio, M., & Violino, P. 1977, Reviews of Modern Physics, 49, 31
  * Auer et al. (1980) Auer, L., Rees, D. E., & Stenflo, J.O. 1980, A&A, 88, 302
  * Avrett (1995) Avrett, E. H. 1995, in Infrared tools for solar astrophysics: What’s next?, ed. J. R. Kuhn & M. J. Penn (Singapore: World Scientific), 303
  * Belluzzi et al. (2007) Belluzzi, L., Trujillo Bueno, T., & Landi Degl’Innocenti, E. 2007, ApJ, 666, 588
  * Belluzzi & Trujillo Bueno (2012) Belluzzi, L. & Trujillo Bueno, J. 2012, ApJ, 750, L11
  * Belluzzi & Trujillo Bueno (2013) Belluzzi, L. & Trujillo Bueno, J. 2013, ApJ, 774, L28
  * Belluzzi et al. (2015a) Belluzzi, L., Landi Degl’Innocenti, E., & Trujillo Bueno, J. 2015, ApJ, 812, 73
  * Bendali et al. (1981) Bendali, N., Duong, H. T., & Vialle, J. L. 1981, J. Phys. B At. Mol. Opt., 14, 4231
  * Bommier (1980) Bommier, V. 1980, A&A, 87, 109
  * Bommier (1997) Bommier, V. 1997, A&A, 328, 726
  * Bommier (2017) Bommier, V. 2017, A&A, 607, A50
  * Bommier (2018) Bommier, V. 2018, A&A, 619, C1
  * Bruls & Rutten (1992) Bruls, J. H. M. J. & Rutten, R. J. 1992, A&A, 265, 257
  * Bruls et al. (1992) Bruls, J. H. M. J., Rutten, R. J., & Shchukina, N. G. 1992, A&A, 265, 237
  * Casini & Manso Sainz (2005) Casini, R. & Manso Sainz, R. 2005, ApJ, 624, 1025
  * del Pino Alemán et al. (2018) del Pino Alemán, T., Trujillo Bueno, J., Štěpán, J. & Shchukina, N. 2018, ApJ, 863, 164
  * del Pino Alemán et al. (2020) del Pino Alemán, T., Trujillo Bueno, J., Casini, R. & Manso Sainz, R. 2020, ApJ, 891, 91
  * Delbouille et al. (1973) Delbouille, L., Roland, G., & Neven, L. 1973, Atlas photometrique du spectre solaire de $\lambda$ 3000 a $\lambda$ 10000 (Liège: Université de Liège, Institut d’Astrophysique)
  * Domke & Hubeny (1988) Domke, H. & Hubeny, I., 1988, ApJ, 334, 527
  * Faurobert (1987) Faurobert, M. 1987, A&A, 178, 269
  * Faurobert (1988) Faurobert, M. 1988, A&A, 194, 268
  * Fontenla et al. (1993) Fontenla, J. M., Avrett, E. H., & Loeser, R. 1993, ApJ, 406, 319
  * Janett et al. (2021) Janett, G., Alsina Ballester, E., Guerreiro, N., Riva, S., Belluzzi, L., del Pino Alemaán, T. & Trujillo Bueno, J. 2021, A&A, 655, A13
  * Jaume Bestard et al. (2021) Jaume Bestard, J., Trujillo Bueno, J., Štěpán, J. & del Pino Alemán, T. 2021, ApJ, 909, 183
  * Hubeny & Mihalas (2015) Hubeny, I. & Mihalas, D. 2015, Theory of Stellar Atmospheres: An Introduction to Astrophysical Non-equilibrium Quantitative Spectroscopic Analysis (Princeton: Princeton University Press)
  * Hummer (1962) Hummer, D. G. 1962, MNRAS, 125, 21
  * Katsukawa et al. (2020) Katsukawa, Y., del Toro Iniesta, J. C., Solanki, S. K., et al. 2020, in SPIE Conf. Ser., 11447, 0Y
  * Kemp et al. (1984) Kemp, J. C., Macek, J. H., & Nehring, F. W. 1984, ApJ, 278, 863
  * Kramida et al. (2020) Kramida, A., Yu. Ralchenko, Reader, J., & and NIST ASD Team. 2020, NIST Atomic Spectra Database (ver. 5.8), Available Online: https://physics.nist.gov/asd. National Institute of Standards and Technology, Gaithersburg, MD.
  * Landi Degl’Innocenti & Landolfi (2004) Landi Degl’Innocenti, E. & Landolfi, M. 2004, Polarization in Spectral Lines (Dordrecht: Kluwer Academic Publishers)
  * Ney (1969) Ney, J. 1969, Zeitschrift für Physik, 223, 126
  * Quintero Noda et al. (2017) Quintero Noda, C., Uitenbroek, H., Katsukawa, Y., et al. 2017, MNRAS, 470, 1453
  * Quintero Noda et al. (2018) Quintero Noda, C., Villanueva, G. L., Katsukawa, Y., et al. 2018, A&A, 610, A79
  * Ramelli et al. (2010) Ramelli, R., Balemi, S., Bianda, M., et al. 2010, in SPIE Conf. Ser., 7735, 1Y
  * Rees & Saliba (1982) Rees, D. E. & Saliba, G. J. 1982, A&A, 115, 1
  * Reif (1965) Reif, F. 1965, Fundamentals of Statistical and Thermal Physics (Long Grove, Illinois: Waveland Press)
  * Sampoorna et al. (2009) Sampoorna, M., Stenflo, J. O., Nagendra, K. N., et al. 2009, ApJ, 699, 1650
  * Sampoorna et al. (2017) Sampoorna, M., Nagendra, K. N., & Stenflo, J. O. 2017, ApJ, 844, 97
  * Sampoorna et al. (2019) Sampoorna, M., Nagendra, K. N., Sowmya, K., Stenflo, J. O. & Anusha, L. S. 2019, ApJ, 883, 188
  * Seaton (1962) Seaton, M. J. 1962, Proceedings of the Physical Society, 79, 1105
  * Stenflo (1997) Stenflo, J. O. 1997, A&A, 324, 344
  * Thomas (1957) Thomas, R. N. 1957, ApJ, 125, 260
  * Traving (1960) Traving, G. 1960, Über die Theorie der Druckverbreiterung von Spektrallinien (Hamburg: Astronomische Gesellschaft)
  * Trujillo Bueno & Manso Sainz (1999) Trujillo Bueno, J., & Manso Sainz, R. 1999, ApJ, 516, 436
  * Trujillo Bueno (2001) Trujillo Bueno, J. 2001, in Advanced Solar Polarimetry – Theory, Observation, and Instrumentation, ed. M., Sigwarth, ASP Conf. Ser., 236, 161
  * Trujillo Bueno (2003) Trujillo Bueno, J. 2003, in Stellar Atmosphere Modeling, eds. I. Hubeny, D. Mihalas, & K. Werner, ASP Conf. Ser., 288, 551
  * Trujillo Bueno et al. (2002) Trujillo Bueno, J., Casini, R., Landolfi, M., & Landi Degl’Innocenti, E. 2002, ApJ, 566, L53
  * Uitenbroek (2001) Uitenbroek, H. 2001, ApJ, 557, 389
  * Uitenbroek (2006) Uitenbroek, H. 2006, in Solar MHD Theory and Observations: A High Spatial Resolution Perspective, eds. J. Leibacher, R. F. Stein, & H. Uitenbroek, ASP Conf. Ser., 354, 313
  * Uitenbroek & Bruls (1992) Uitenbroek, H. & Bruls, J. H. M. J. 1992, A&A, 265, 268
  * Unsöld (1955) Unsöld, A. 1955, Physik der Sternatmosphären, mit besonderer Berücksichtigung der Sonne (Berlin: Springer)

##  Appendix A The atomic model

As discussed in Sect. 2, the first step of each RT calculation carried out in
this article was to solve the non-LTE problem for the unpolarized case and a
multilevel atomic model. The considered model included 12 levels for K i as
well as the ground level of K ii. The calculations carried out using the RH
code of Uitenbroek (2001) thus involved 12 continuum transitions and 20 line
transitions, taking PRD effects into account only for the transitions to the K
i D1 and D2 lines. For the inelastic collisions (i.e., those that induce
transitions between different FS levels), only the contribution from free
electrons was taken into account, and it was computed with RH following Seaton
(1962). For the calculation of the elastic collisions using RH, the van der
Waals contribution from neutral hydrogen and helium atoms was considered
(computed following Unsöld 1955), as well as the quadratic Stark effect
contribution from free electrons and singly charged ions (computed following
Traving 1960).

Regarding the polarized calculations of the second step of the synthesis, a
two-term atom with an unpolarized and infinitely sharp lower level was
considered in the most general case, and HFS was also taken into account (see
Fig. 1). The FS levels of the considered system are given in Table 1, together
with their corresponding energies relative to the ground state, which are
given in cm-1. It is useful to recall that the D1 (D2) line originates from
the radiative transitions between the states of the ground level and the
states of the upper FS level with $J=1/2$ ($J=3/2$).

Table 1:  Fine structure parameters Level | Energy (cm-1)
---|---
$4s\;{}^{2}$S1/2 | $0.00$
$4p\;{}^{2}$P${}_{1/2}^{\mathrm{o}}$ | $12985.185724$
$4p\;{}^{2}$P${}_{3/2}^{\mathrm{o}}$ | $13042.89027$

The RT coefficients for the considered two-term atomic model depend on the
Einstein coefficient for spontaneous emission that couples the upper and lower
term, $A(\beta_{u}L_{u}S\rightarrow\beta_{\ell}L_{\ell}S)$. Its value was
determined from the Einstein coefficients for spontaneous emission of the two
D lines. The following relation (e.g., Sect. 7.8 of LL04) holds in the L-S
coupling scheme

$A(\beta_{u}L_{u}S\rightarrow\beta_{\ell}L_{\ell}S)=\sum_{J_{\ell}}A(\beta_{u}L_{u}SJ_{u}\rightarrow\beta_{\ell}L_{\ell}SJ_{\ell})\,.$

Bearing in mind that the D lines share the same lower FS level, in the L-S
scheme the Einstein coefficient should be equal for the two lines. In reality,
their experimental values slightly differ, being $3.73\cdot 10^{7}$ s-1 for D1
and $3.78\cdot 10^{7}$ s-1 for D2 (Kramida et al. 2020). In this paper, the
value of $A(\beta_{u}L_{u}S\rightarrow\beta_{\ell}L_{\ell}S)$ was thus taken
as their average. Throughout this work, the radiative line broadening
parameter $\Gamma_{R}$ that appears in the redistribution matrices (see ABT22)
was also taken to be equal to this value. The line broadening parameters for
elastic ($\Gamma_{E}$) and inelastic ($\Gamma_{I}$) collisions were taken to
be equal to the rates for elastic and inelastic collisions, respectively,
which were obtained in the first step of the RT calculation using RH.

Potassium is mainly found in the form of two stable isotopes, which are
${}^{39}\\!$K and ${}^{41}\\!$K. They have abundances of $93.3\%$ and $6.7\%$,
respectively (see Kramida et al. 2020), and they both have nuclear spin
$I=3/2$. In Table 2, the isotopic shifts and the HFS coefficients
${\mathcal{A}}_{\mbox{\scriptsize{HFS}}}$ and
${\mathcal{B}}_{\mbox{\scriptsize{HFS}}}$ are shown for each of the three
considered FS levels and for both isotopes. The isotopic shifts for
${}^{41}\\!\\!$ K and the values of the magnetic dipole
${\mathcal{A}}_{\mbox{\scriptsize{HFS}}}$ coefficients for the upper FS levels
were taken from Bendali et al. (1981), whereas the values for the electric
quadrupole ${\mathcal{B}}_{\mbox{\scriptsize{HFS}}}$ coefficients of the
$4p\;{}^{2}$P${}_{3/2}^{\mathrm{o}}$ level were taken from Ney (1969). The
${\mathcal{A}}_{\mbox{\scriptsize{HFS}}}$ coefficients for the ground level
were taken from Arimondo et al. (1977).

Table 2: Hyperfine structure parameters Level | Isotopic shift (cm-1) |  ${\mathcal{A}}_{\mbox{\scriptsize{HFS}}}$ (cm-1) |  ${\mathcal{B}}_{\mbox{\scriptsize{HFS}}}$ (cm-1)
---|---|---|---
${}^{39}\\!$ K
$4s\;{}^{2}$S1/2 | $0.000$ | $7.701\cdot 10^{-3}$ | $0.000$
$4p\;{}^{2}$P${}_{1/2}^{\mathrm{o}}$ | $0.000$ | $9.273\cdot 10^{-4}$ | $0.000$
$4p\;{}^{2}$P${}_{3/2}^{\mathrm{o}}$ | $0.000$ | $2.045\cdot 10^{-4}$ | $9.073\cdot 10^{-5}$
${}^{41}\\!$ K
$4s\;{}^{2}$S1/2 | $0.000$ | $4.236\cdot 10^{-3}$ | $0.000$
$4p\;{}^{2}$P${}_{1/2}^{\mathrm{o}}$ | $7.848\cdot 10^{-3}$ | $5.067\cdot 10^{-4}$ | $0.000$
$4p\;{}^{2}$P${}_{3/2}^{\mathrm{o}}$ | $7.877\cdot 10^{-3}$ | $1.134\cdot 10^{-4}$ | $1.114\cdot 10^{-4}$

##  Appendix B Radiative transfer coefficients with multiple isotopes

The expressions for the RT coefficients considered in this work for the second
step of the RT calculation can be found in the appendices of ABT22, where one
can also find the simpler expressions that correspond to approximations such
as neglecting the magnetic field, neglecting $F$\- or $J$-state interference,
or making the assumption of CRD. In that article, however, the expressions are
only given for the case in which a single isotopic species is considered. In
the present work, a number of calculations were carried out considering the
contribution from two isotopes. In the multi-isotope case, the line
contribution to the RT coefficients can be given as a linear combination of
the RT coefficients for each isotope, labeled with superscript $s$ and
weighted by their relative abundances $n_{s}$,

$\displaystyle\eta^{\ell}_{i}(\nu,\mathbf{\Omega})=\sum_{s}n_{s}\,\eta_{i}^{\ell\,(s)}(\nu,\mathbf{\Omega})\,,$
(11a)
$\displaystyle\rho^{\ell}_{i}(\nu,\mathbf{\Omega})=\sum_{s}n_{s}\,\rho_{i}^{\ell\,(s)}(\nu,\mathbf{\Omega})\,,$
(11b)
$\displaystyle{\varepsilon^{\ell}_{i}(\nu,\mathbf{\Omega})=\sum_{s}n_{s}\,\varepsilon^{\ell\,(s)}_{i}(\nu,\mathbf{\Omega})}\,.$
(11c)

Even when the nuclear spin of two different isotopes is the same, as is the
case for ${}^{39}\\!$K and ${}^{41}\\!$K, the energies of their various states
may differ due to isotopic shifts or differences in the HFS coefficients. As a
result, their $\eta_{i}^{\ell\,(s)}$, $\rho_{i}^{\ell,(s)}$, and
$\varepsilon_{i}^{(s)}$ coefficients may also differ. As discussed in Sect. 2,
the line emissivity can be separated into thermal and scattering
contributions. For each isotope, the thermal contribution can be obtained from
the corresponding $\eta_{i}^{\ell\,(s)}$ through a relation analogous to that
of Eq. (5). Regarding the line scattering contributions
$\varepsilon^{\ell,\,\mathrm{sc}\,(s)}_{i}$, it follows from Eq. (11c) that

$\bigl{[}\mathcal{R}\,(\nu^{\prime},\mathbf{\Omega}^{\prime};\nu,\mathbf{\Omega})\bigr{]}_{ij}=\sum_{s}n_{s}\,\bigl{[}\mathcal{R}^{(s)}(\nu^{\prime},\mathbf{\Omega}^{\prime};\nu,\mathbf{\Omega})\bigr{]}_{ij}\,,$
(12)

which are of course related to
$\varepsilon^{\ell,\mbox{\scriptsize{sc}}\,(s)}_{i}$ through an analogous
expression to that of Eq. (6). In addition, each $\mathcal{R}^{(s)}$ can
obviously be separated into corresponding
${\mathcal{R}}^{(s)}_{\mbox{\sc{ii}}}$ and
${\mathcal{R}}^{(s)}_{\mbox{\sc{iii}}}$ matrices.

##  Appendix C Hanle diagram for the scattering polarization of the D2 line
for a $90^{\circ}$ scattering geometry

Figure 18: Hanle diagram that shows the relation between the Stokes $Q$ and
$U$ components of the line scattering emission vector, normalized to the
intensity component, according to the strength and orientation of the magnetic
field. The emission vector was obtained as described in the text and it was
integrated over wavelength, taking a $3.9$ Å–wide range centered on the D2
line. The direction of emission is taken with an inclination of $90^{\circ}$
with respect to the local vertical (the local vertical is parallel to the
symmetry axis of the radiation field). Each of the curves shows the results of
calculations that were carried out in the presence of magnetic fields with
increasing strength, for various inclinations (see legend) with respect to the
local vertical. The curves on the right (left) half of the diagram correspond
magnetic fields with positive (negative) longitudinal components (see text).
The points upon each curve correspond to field strengths of $5$, $10$, $20$,
and $50$ G and are marked with triangles, diamonds, stars, and circles,
respectively. The point corresponding to the calculation for $B=0$ G, where
all the curves converge, is marked with the gray cross. The reference
direction for positive Stokes $Q$ is perpendicular to the local vertical.

The sensitivity of the scattering polarization signals of the K i D2 line to
deterministic magnetic fields, which is discussed for two specific
orientations in Sects. 4.1.1 and 4.1.2, may be represented in a more compact
manner through the Hanle diagram shown in Fig. 18. Instead of solving the full
non-LTE RT problem in the polarized case, the emission coefficient is
considered, for an LOS with $\mu=0.2$. It was calculated at a single spatial
point, taking the thermodynamic properties and the incident radiation field
that correspond to a height of $600$ km in the FAL-C atmospheric model. The
rationale for this approach is similar to that of the so-called last
scattering approximation, in which the emergent radiation is taken to be equal
to the source function at the depth at which $\tau=\mu$ (e.g., Sampoorna et
al. 2009). The incident radiation field was computed using RH, and it was
axially symmetric around the local vertical. The diagram shows the ratios of
the wavelength-integrated line scattering emission coefficients
$\tilde{\varepsilon}_{Q}/\tilde{\varepsilon}_{I}$ and
$\tilde{\varepsilon}_{U}/\tilde{\varepsilon}_{I}$, in which the
“$\ell,\mbox{sc}$” labels have been dropped for simplicity of notation. The
emission direction was selected with a $90^{\circ}$ inclination with respect
to the symmetry axis of the incident radiation field. The spectral integration
was carried out taking a $3.9$ Å–wide wavelength interval whose center
coincides with that of the D2 line. The figure illustrates the variation of
such quantities with the magnetic field for strengths up to $50$ G (where the
Zeeman effect still does not play an appreciable role in the linear
polarization). Each curve in the figure represents the results of calculations
in the presence magnetic fields with a different orientation. All considered
magnetic field vectors were contained in the plane defined by the LOS and the
local vertical, with inclinations $\theta_{B}$ of $0^{\circ}$, $15^{\circ}$,
$30^{\circ}$, $45^{\circ}$, and $90^{\circ}$. For all inclinations except for
the vertical, fields with a negative longitudinal component were taken in
addition to those with a positive longitudinal component, such that they point
in opposite directions. The orientation of fields with a positive component is
given by the specified inclination $\theta_{B}$ and azimuth
$\chi_{B}=0^{\circ}$, whereas the orientation of fields with a negative
longitudinal component is given by inclination $180^{\circ}-\theta_{B}$ and
azimuth $\chi_{B}=180^{\circ}$. The calculations were carried out considering
a two-term atomic model with HFS. For numerical simplicity, only the
${}^{39}\\!$K isotope is considered and the CRD approximation is used (see
Sect. 3.3).

In the presence of a vertical magnetic field, the emitted radiation is
polarized in the direction perpendicular to the vertical, and
$\tilde{\varepsilon}_{U}/\tilde{\varepsilon}_{I}$ remains zero. Thus, the
linear polarization amplitude, given solely by
$\tilde{\varepsilon}_{Q}/\tilde{\varepsilon}_{I}$, increases monotonically
with field strength, in agreement with the results shown in Fig. 9. Moreover,
for this geometry, the scattering polarization depends on the quantum
interference between states with the same quantum number $f$ and how they are
impacted by the magnetic field, but not on the interference between states
with different number $f$.

When the magnetic field is inclined, the interference between states with both
different and the same $f$ quantum number have an impact on the scattering
polarization. For the case of horizontal magnetic fields, the characteristic
small “curls” of level-crossing effects are found for field strengths between
$5$ and $10$ G, which is fully consistent with the behavior observed in Fig.
11 (see also the theoretical discussion and the application to the Na i D2
line in Sect. 10.22 of LL04). As discussed above, this behavior is related to
level-crossing phenomena. For stronger fields, the linear polarization
amplitude of the scattered radiation is found to decrease monotonically, and
it approaches saturation for fields with strengths around $50$ G. For fields
with an inclination of $45^{\circ}$, the behavior is qualitatively similar to
the one found in the presence of $90^{\circ}$ magnetic fields. For smaller
inclinations, such as $15^{\circ}$ or $30^{\circ}$, the scattering
polarization presents traits of the behavior found both for horizontal and for
vertical fields. Similar to the behavior found for horizontal magnetic fields,
the amplitude of $\tilde{\varepsilon}_{U}/\tilde{\varepsilon}_{I}$ sharply
increases with the field strength while the fields are relatively weak, until
a strength is reached at which this trend is reversed and its amplitude begins
to decrease again. However, no curls are found for such magnetic field
orientations. The amplitude of
$\tilde{\varepsilon}_{Q}/\tilde{\varepsilon}_{I}$ is found to increase with
the field strength – similar to the behavior for a vertical magnetic field –
beyond a given value ($\sim\\!\\!1.5$ G for a $15^{\circ}$ inclination and
$\sim\\!\\!5$ G for a $30^{\circ}$ inclination). Below such field strengths,
however, $\tilde{\varepsilon}_{Q}/\tilde{\varepsilon}_{I}$ is found to
slightly decrease with field strength instead.

##  Appendix D Stokes profiles in the presence of various magnetic fields

This appendix contains four figures, which illustrate the sensitivity of the
Stokes profiles of the K i D lines to magnetic fields that are stronger than
those shown in the main text (up to $750$ G), as obtained with the
abovementioned non-LTE RT code. Figs. 19 and 20 show the profiles obtained for
the same geometry as in Sect. 4.1.1, but in the presence of stronger vertical
magnetic fields, for the D2 and D1 lines, respectively. Figs. 21 and 22 show
the profiles obtained for the same geometry as in Sect. 4.1.2, but in the
presence of stronger horizontal magnetic fields (contained in the plane
defined by the LOS and the local vertical), for the D2 and D1 lines,
respectively.

In the panels for $V/I$, the profiles that are obtained using the magnetograph
formula (see Sect. 4.2) are also shown for the same field strengths (i.e., up
to $750$ G). As expected, the relative difference between such profiles and
the ones obtained through full RT calculations increases with field strength
and begins to be significant at around $350$ G. The discrepancies are clearer
for the case of horizontal magnetic fields, for which the longitudinal
component is larger. In the case of a vertical magnetic field, it is
interesting to point out that larger discrepancies between such calculations
are found for the D1 line than for the D2 line (compare Figs. 19 and 20).
Finding a definitive explanation for this behavior is beyond the scope of the
present work, but it is worth recalling that the suitability of the
magnetograph formula requires the magnetic field to be weak. More precisely,
the magnetic splitting must be much smaller than the typical width of the line
profiles (see Sect. 9.6 of LL04). It is thus noteworthy that, compared to the
D2 line, the effective Landé factor (related to the magnetic splitting) is
larger for D1, and its absorption profile in intensity is slightly narrower
and appears to be more sensitive to the magnetic field.

Figure 19: Stokes $I$ (upper left panel), $V/I$ (lower left panel), $Q/I$
(upper right panel), and $U/I$ (lower right panel) profiles as a function of
wavelength. The various solid colored curves represent the results of RT
calculations (see main text) carried out in the presence of vertical
($\theta_{B}=0^{\circ}$) magnetic fields with strengths up to $750$ G (see
legend). The considered spectral range is centered on the K i D2 line. For
this figure and the following ones in this appendix, the Stokes profiles are
shown for an LOS with $\mu=0.2$, resulting from calculations in which the two-
term atomic model described in Sect. 2 was considered, accounting for HFS and
including only the 39K isotope. The colored dotted curves in the lower left
panel represent the $V/I$ profile obtained through the magnetograph formula,
for the field strengths shown in the legend. Figure 20: Stokes $I$ (upper left
panel), $V/I$ (lower left panel), $Q/I$ (upper right panel), and $U/I$ (lower
right panel) profiles as a function of wavelength. The various solid colored
curves represent the results of RT calculations (see the main text) carried
out in the presence of vertical ($\theta_{B}=0^{\circ}$) magnetic fields with
strengths up to $750$ G (see legend). The considered spectral range is
centered on the K i D1 line. The colored dotted curves in the lower left panel
represent the $V/I$ profile obtained through the magnetograph formula, for the
field strengths shown in the legend.  Figure 21: Stokes $I$ (upper left
panel), $V/I$ (lower left panel), $Q/I$ (upper right panel), and $U/I$ (lower
right panel) profiles as a function of wavelength. The various solid colored
curves represent the results of RT calculations (see main text) in the
presence of horizontal ($\theta_{B}=90^{\circ}$) magnetic fields with
$\chi_{B}=0^{\circ}$ and strengths up to $750$ G (see legend). The considered
spectral range is centered on the K i D2 line. The colored dotted curves in
the lower left panel represent the $V/I$ profile obtained through the
magnetograph formula, for the field strengths shown in the legend. Figure 22:
Stokes $I$ (upper left panel), $V/I$ (lower left panel), $Q/I$ (upper right
panel), and $U/I$ (lower right panel) profiles as a function of wavelength.
The various solid colored curves represent the results of RT calculations (see
main text) in the presence of horizontal ($\theta_{B}=90^{\circ}$) magnetic
fields with $\chi_{B}=0^{\circ}$ and strengths up to $750$ G (see legend). The
considered spectral range is centered on the K i D1 line. The colored dotted
curves in the lower left panel represent the $V/I$ profile obtained through
the magnetograph formula, for the field strengths shown in the legend.