# Simple numerical X-ray polarization models of reflecting axially symmetric structures around accreting compact objects

J Podgorný, M Dovčiak, F Marin

► To cite this version:

J Podgorný, M Dovčiak, F Marin. Simple numerical X-ray polarization models of reflecting axially symmetric structures around accreting compact objects. Monthly Notices of the Royal Astronomical Society, 2024, 530 (3), pp.2608-2626. 10.1093/mnras/stae1009. hal-04285043

HAL Id: hal-04285043

https://hal.science/hal-04285043v1

Submitted on 26 Sep 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Simple numerical X-ray polarization models of reflecting axially symmetric structures around accreting compact objects

J. Podgorný<sup>1,2,3*</sup> M. Dovčiak<sup>2</sup> and F. Marin<sup>1</sup>

Accepted 2024 April 8. Received 2024 April 4; in original form 2023 October 23

## ABSTRACT

We present a series of numerical models suitable for X-ray polarimetry of accreting systems. First, we provide a spectropolarimetric routine that integrates reflection from inner optically thick walls of a geometrical torus of arbitrary size viewed under general inclination. In the studied example, the equatorial torus is illuminated by a central isotropic source of X-ray power-law emission, representing a hot corona. Nearly neutral reprocessing inside the walls is precomputed by Monte Carlo code STOKES that incorporates both line and continuum processes, including multiple scatterings and absorption. We created a new XSPEC model, called XSSTOKES, which in this version enables efficient X-ray polarimetric fitting of the torus parameters, observer's inclination and primary emission properties, interpolating for arbitrary state of primary polarization. Comparison of the results to a Monte Carlo simulation allowing partial transparency shows that the no-transparency condition may induce different polarization by tens of per cent. Allowing partial transparency leads to lower/higher polarization fraction, if the resulting polarization orientation is perpendicular/parallel to the rotation axis. We provide another version of XSSTOKES that is suitable for approximating nearly neutral reflection from a distant optically thick disc of small geometrical thickness. It assumes local illumination averaged for a selected range of incident angles, representing a toy model of a diffuse corona of various physical extent. Assessing both XSSTOKES variants, we conclude that the resulting polarization can be tens of per cent and perpendicularly/parallelly oriented towards the rotation axis, if the reflecting medium is rather vertically/equatorially distributed with respect to a compact central source.

**Key words:** accretion, accretion discs – polarization – radiative transfer – scattering – galaxies: active – X-rays: general.

## 1 INTRODUCTION

X-ray polarimetry is undergoing a rebirth due to the successful launch and operation of the Imaging X-ray Polarimetry Explorer (IXPE; Weisskopf et al. 2022). Out of many scientific cases of X-ray polarimetry, where reflection from axially symmetric structures plays a role, we name the extragalactic active galactic nuclei (AGNs) with a central supermassive black hole, and the Galactic accreting stellar-mass black holes, neutron stars, and white dwarfs. Apart from the polar scatterers, such as jets and ionization cones, the compact accreting objects are often surrounded by distant equatorial reprocessing material that changes the properties of the central X-ray emission. This can be the broad-line regions or the dusty parsec-scale torus of AGNs (Antonucci 1993; Urry & Padovani 1995), or equatorial outflows arising from outer accretion disc surrounding the supermassive black holes or orders-of-magnitude lighter objects (see e.g. Koljonen & Tomsick 2020; Miller et al. 2020; Neilsen et al. 2020; Ratheesh et al. 2021). A hot coronal plasma producing primary X-ray power-law emission is located in the inner-most accretion regions (Sunyaev & Titarchuk 1980; Haardt & Maraschi 1991;

Haardt 1993). Various geometries of the corona are continuously considered in literature with theoretical polarization typically up to a few % (Beheshtipour, Krawczynski & Malzac 2017; Marinucci et al. 2018; Poutanen, Veledina & Zdziarski 2018; Tamborra et al. 2018; Krawczynski & Beheshtipour 2022; Ursini et al. 2022). These predictions are observationally confirmed by IXPE with a preference for equatorially elongated coronae for particular sources (Krawczynski et al. 2022; Marinucci et al. 2022; Gianolli et al. 2023; Ingram et al. 2023; Tagliacozzo et al. 2023; Veledina et al. 2023b).

The spectropolarimetric modelling of distant reprocessing of the coronal emission reaches a range in complexity and computational effectivity. From analytical and semi-analytical models (e.g. Chandrasekhar 1960; Brown & McLean 1977; Sunyaev & Titarchuk 1985; Matt 1993; Poutanen & Svensson 1996; Poutanen, Nagendra & Svensson 1996; Bianchi et al. 2010; Veledina et al. 2023a) to complex radiative transfer equation solvers (Matt, Fabian & Ross 1993; Dorodnitsyn & Kallman 2010, 2011) to Monte Carlo (MC) simulations (e.g. Matt et al. 1989; Ghisellini, Haardt & Matt 1994; Matt et al. 1996; Goosmann & Matt 2011; Marin, Goosmann & Petrucci 2016; Marin et al. 2018a; Marin, Dovčiak & Kammoun 2018b; Ratheesh et al. 2021; Ursini et al. 2023; Tomaru, Done & Odaka 2024). Admittedly, the new models presented in this paper are serving as first-order predictions and represent a largely

<footnote n="1"><sup>1</sup>Université de Strasbourg, CNRS, Observatoire Astronomique de Strasbourg, UMR 7550, F-67000 Strasbourg, France</footnote>

<footnote n="2"><sup>2</sup>Astronomical Institute, Academy of Sciences of the Czech Republic, Boční II, CZ-14131 Prague, Czech Republic</footnote>

<footnote n="3"><sup>3</sup>Astronomical Institute, Charles University, V Holešovičkách 2, CZ-18000 Prague, Czech Republic</footnote>

<footnote>*E-mail: jakub.podgorny@asu.cas.cz</footnote>
simplistic, yet computationally efficient scenario. No special- or general-relativistic effects are taken into account. We study a nearly neutral toroidal geometry that reflects a point-like isotropic power-law emission located in the centre. Only a single reprocessing at one part of the optically thick inner walls is taken into account, although locally, the effects of multiple scatterings and energy-dependent absorption are treated. Across the geometrical torus surface, we numerically integrate precomputed local spectropolarimetric tables that were originally developed for reflection from accretion discs in AGNs. We refer the reader to Podgorný et al. (2022) for a full description of these tables. The aim of this work is to achieve an approximative model enabling fast estimates with the data fitting tool XSPEC (Arnaud 1996). We compare these results to more sophisticated MC results of partially ionized equatorial obscurers presented in Podgorný, Marin & Dovčiak (2023b, hereafter Paper I) that used the STOKES code (Goosmann & Gaskell 2007; Marin et al. 2012; Marin, Goosmann & Gaskell 2015; Marin 2018) for the same radiative transfer problem self-consistently, i.e. without the need for pre-computation and assuming some level of transparency of the obscurer. In this way, we can show that the allowed relative contribution of reflection on the inner walls of an accreting funnel determines the output polarization properties to a large extent, depending on geometrical properties of the scattering region and primary radiation characteristics.

Apart from a general numerical integrator across a toroidal structure, we use a convertor of American Standard Code for Information Interchange (ASCII) tables to Flexible Image Transport System (FITS) format (Hanisch et al. 2001) in the Office for Guest Investigator Programs (OGIP) standard (Arnaud 1995) suitable for XSPEC in its latest version that includes polarization. This results in the above mentioned torus reflection model suitable for XSPEC.

One other variant of the XSPEC model is presented, achieved in a similar manner. It approximates net polarization from centrally illuminated faraway regions of cold matter distributed near the equatorial plane with low height relative to the radius. Given the averaging across an arbitrary range of impinging angles of the local reflection tables computed in Podgorný et al. (2022), this model approximates the emitter of X-ray power-law, situated inside and/or above the disc plane with low to high extension in physical size.

The paper is organized as follows. In Section 2 and Appendices A, B, and C, we describe the new models developed, i.e. the torus reflection integrator, the table conversion routine, and the two XSPEC fitting models: for reflection from a torus and for reflection from a distant disc. In Section 3, we discuss the results of the torus reflection model and compare them to a detailed MC approach and to an analytical approach. In Section 4, we discuss the results of the disc reflection model and compare them to an analytical approach. The dependence of the resulting polarization state on incident polarization state for both studied geometries is further examined in Appendix D. In Section 5, we conclude.

## 2 MODELLING

We define the linear polarization degree $p$ and polarization position angle $\Psi$ in the usual way from the Stokes parameters $I$, $Q$, and $U$

$$p = \frac{\sqrt{Q^2 + U^2}}{I}, \qquad (1)$$

$$\Psi = \frac{1}{2} \arctan_2 \left( \frac{U}{Q} \right),$$

where $\arctan_2$ denotes the quadrant-preserving inverse of a tangent function and $\Psi = 0$ means that the polarization vector is oriented parallel to the system axis of symmetry projected to the polarization plane. $\Psi$ increases in the counterclockwise direction from the point of view of an incoming photon. Due to symmetry, the polarization genesis from axially symmetric reflecting surface is such that the observed photons are polarized on average parallel or perpendicular to the main axis. Thus, we will use the notation of positive or negative polarization degree $p$ for such resulting $\Psi$, respectively. When describing the polarization of the source emission, we will use $\Psi_0$ and $p_0$ – with the same positive or negative notation for polarization fraction inside figures, as only parallelly or perpendicularly oriented polarization with respect to the principal axis will be used in the provided examples. Note that due to general-relativistic effects in the close vicinity of the compact object, this might not always be the case for realistic central emission (see e.g. Krawczynski & Beheshtipour 2022; Ursini et al. 2022).

### 2.1 Simple toroidal reflector

Paper I introduced various geometrical archetypes for studying reprocessing of Comptonized emission with a power-law index $\Gamma$ in a distant equatorial scattering region. The simulations were done using the STOKES code: an MC method with various X-ray line and continuum processes implemented with emphasis on polarization computations. The code takes into account all major fluorescent and resonant lines in the X-ray band. It takes into account photoelectric absorption, as well as multiple Compton down-scatterings. Compton up-scatterings are neglected in the used version. A broad parametric range was explored in Paper I, including the effects of partial transparency and partial ionization. Here, we will take just part of this work and compare it to a much simpler approach, trying to capture the main polarization driving mechanisms. We will use an identical geometrical setup to the Case C described in Paper I for easy one-to-one comparisons. This means a perfectly circular torus profile ($a = b$ subcase of an elliptical torus, see Paper I for the model parameters and details) with a half-opening angle $\Theta$ viewed under some inclination $i$ from the pole. Such obscurer has a convex inner boundary with respect to the central source. The emission is isotropic and is located in the centre of the torus and is approximated as a point source. Note that this is again a huge simplification to more realistic hot X-ray emitting coronae near the central accreting engine (see references in Section 1). Direct emission, i.e. light that arrives to the observer without any interactions, is not added to the reflected component.

Fig. 1 shows the torus reflection set-up. For clarity, we show only the upper half-plane of the torus, even though all the results shown in this paper take the reflecting area below the equator into account as well, if not mentioned otherwise. We refer to Appendices A and B for detailed numerical implementation of the resulting XSPEC model XSSTOKES, in this variant named XSSTOKES_TORUS, and description of the corresponding routines. The assumption of axial symmetry allows swift interpolation for arbitrary state of the primary polarization given by $p_0$ and $\Psi_0$. Only a single reprocessing from the surface is calculated. In other words, we only account for those photons that reach the inner walls of the torus from the central source, they are locally reprocessed by means of precomputed nearly neutral multiple-scattering reflection tables, they emerge at the same surface location, and reach the observer under the assumed global inclination angle $i$. No self-irradiation of the torus is allowed, nor partial transparency effects. The torus is optically thick. This allows to study the impact of multiple scatterings between different torus surface
<figure><img src="image_2.png" /></figure>

**Figure 1.** A circular toroidal reflector that is considered for the results presented in Section 3. Being located in the center of the coordinate system, the X-ray power-law of arbitrary incident polarization and power-law index $\Gamma$ is isotropically illuminating the inner side of the torus surface. Here we show only the upper half-space above the equatorial plane for clarity, but the model allows to choose if only the upper part of the torus above the equator (with $z > 0$) may be illuminated, or if the surface below the equator (with $z < 0$) is also taken into account. The observer is viewing the axially symmetric system in the $yz$-plane and may be generally inclined under inclination $0° < i < 90°$ measured from the rotation axis. The material reflects once and we only account for the surface regions that are directly illuminated by the central source, i.e. here in the upper half-plane represented by the yellow shaded area. The illuminated part has to be in addition visible in the observer's line of sight to be accounted for in the integration. The lower boundaries, i.e. the terminators, of the areas that are obscured by the opaque torus for an observer in two generic $i_{\text{type-1}}$ and $i_{\text{type-2}}$ inclinations are schematically drawn in orange and pink colours, respectively. The visible reflecting areas for a generic type-1 and type-2 observer are then shaded in orange and pink, respectively. The torus parameters $r$, $R$ and $r_{\text{in}}$ and the $u$ and $v$ surface coordinates are in detail described in Appendix B.

regions when the photon escapes the scattering medium in between two scattering events and the impact of partial transparency of the surface layers near grazing angles that were both accounted for in Paper I.

The central point-like source illuminates up to the tangent point between the torus and a photon direction emitted in a Newtonian picture from the center under the half-opening angle $\Theta$, i.e. the shadow boundary given by the opaque toroidal structure. The viewing angle given by $i$ can span any value from type-1 ($i < \Theta$) to type-2 ($i > \Theta$) values. But note that the visible fraction of the illuminated part of the inner surface gets shrunk considerably for high inclinations.<fnref n="1" /> This allows to estimate the polarized flux contribution from reflection off the opposite side of the torus for highly obscured type-2 AGNs or ultra-luminous X-ray (ULX) sources (Revnivtsev et al. 2002; Fabrika

<figure><img src="image_3.png" /></figure>

**Figure 2.** The reflection geometry considered for the results presented in Section 4. A distant nearly neutral geometrically thin disc residing in the equatorial plane is illuminated by a diffuse X-ray corona (in yellow, its actual shape is arbitrary) of various physical extent. The size of the corona is effectively parametrized by $M_i = \cos \delta_{i,\text{limit}}$, which is the upper limit of $\cos \delta_i$ up to which we uniformly integrate the impinging radiation represented by the dashed arrows. The blue arrow indicates the viewing inclination $i$ of the observer with respect to the disc normal, i.e. the emission angle $\delta_e$ of the local reflection situated in the disc plane. The local reflection is precomputed and integrated uniformly also across the azimuthal directions $\Phi_e$.

2004; Abramowicz 2005; Casares & Jonker 2014; Kaaret, Feng & Roberts 2017; Motta et al. 2017a, b; Jiang, Stone & Davis 2019).

For the local reflection at each infinitesimal surface area (in the code numerically approximated by a small rectangular area with an orientation locally tangent to the torus surface) on the inner illuminated part of the torus surface, we used the most neutral version of the X-ray spectropolarimetric reflection tables created for constant-density plane–parallel accretion discs of AGNs. These tables, fully described in Podgorný et al. (2022), were computed combining the non-LTE radiative transfer iterator TITAN (Dumont et al. 2003) and STOKES. The reflection includes multiple Compton down-scatterings and photoelectric absorption with high accuracy. The X-ray illuminated partially ionized slab is computed all the way until optical depths of $\tau_e \approx 7$, while we only count the photons that are eventually not absorbed and escape back to the surface. Hence, we obtain a more detailed ‘reflection’ (a reprocessing) from an infinitesimal surface on the torus than by a single-scattering reflector.

## 2.2 Simple disc reflector

The second version of the XSSTOKES model, named XSSTOKES_DISC, is intended to approximate X-ray polarization due to reflection from a static nearly neutral disc in the equatorial plane for unobscured AGNs. Its numerical implementation, which follows similar steps to the torus reflection variant, is described in Appendix C. Fig. 2 shows the examined reflection geometry. We assume uniform integration (i.e. with no weighting) of the same nearly neutral local reflection tables from Podgorný et al. (2022) in all azimuthal emission angles, $\Phi_e$, and in a selected range of high incident angles, $\delta_i$: $0 \le \mu_i = \cos \delta_i \le M_i$, where $M_i \in [0.2; 1]$. Since the incident angle $\delta_i$ is measured from the disc normal, the upper limit $M_i$ on its cosine acts as a scaling factor on the coronal physical size. If $M_i = 1$, we integrate over the entire range of impinging angles, meaning the corona is significantly extended, reaching above the disc possibly also in the radial direction from the central compact object. The choice of low $M_i$ ($\lesssim 0.4$) represents a case of a radially distant or truncated disc, as if it was illuminated by e.g. a compact central corona or hot inner accretion flow with low or moderate vertical extension located in the central parts, and/or if the disc in the outer rings had a considerable

<footnote n="1">¹For a sketch, see the orange and pink lines in Fig. 1, representing the surface terminators, i.e. the boundaries of the visible surface of the inner part of the torus for a particular type-1 and type-2 viewing angle. The reflecting region that the integrating routine accounts for to compute the total output is then given by the intersection of the illuminated part (given by the torus half-opening angle grazing boundary – displayed in yellow in Fig. 1) and the visible part to an observer inclined at $i$.</footnote>
<figure><img src="image_4.png" /><figcaption>**Figure 3.** Top: the spectra, $EF_E$, normalized to value at 50 keV. Bottom: the corresponding polarization degree, $p$, versus energy. We compare the XSSTOKES_TORUS results (left) in the same geometry with the results of STOKES MC simulations in highly ionized regime for equatorial column densities $N_H = 10^{25} \text{ cm}^{-2}$ (middle) and $N_H = 10^{24} \text{ cm}^{-2}$ (right) taken from figure 2 of Paper I. Various inclinations $i$ and half-opening angles $\Theta$ for both type-1 and type-2 observers are shown in the colour code. The dark blue curve representing a highly obscured scenario is not shown for the XSSTOKES_TORUS model, because in such case the inner reflecting walls are hidden for the observer in this model. The primary input was set to $\Gamma = 2$ and $p_0 = 2$ per cent for all displayed results. The detailed parametric dependencies are shown in following figures when integrated in energy, which also helps to reduce the numerical noise in MC simulations.</figcaption></figure>

changing elevation with respect to the equatorial plane. But note that the latter scenario, if the reflecting medium deviates non-linearly from the equatorial plane, produces a range of emission inclination angles for a particular distant observer. Because we keep a particular emission angle $i$ (adopted as $\delta_e$ from the original local reflection tables) as a free parameter, which drives the polarization results to a significant extent, such thick disc scenarios should be rather approximated by the reflecting torus model described in the previous section. The remaining free parameters of the reflecting disc model are then the power-law index $\Gamma$ and arbitrary incident polarization $p_0$ and $\Psi_0$, for which we interpolate in the same way as for the torus reflection.

# 3 REFLECTION FROM A TORUS

In this section, we will show the results of the new model XSSTOKES_TORUS, representing reflection from a circular torus, and compare it mainly to the MC results extensively discussed in Paper I.

## 3.1 Spectra and energy profiles of polarization

Fig. 3 shows the energy dependence of flux and polarization from both models. The torus in XSSTOKES_TORUS has identical meridional profile with the Case C geometry taken from Paper I, to which we compare. Thus, curvature differences and relative size effects are eliminated from the comparisons. Despite much lower numerical noise in XSSTOKES_TORUS (only given by the precomputed reproducing inside the walls, the convergence of the numerical integration is ensured), we see the expected depolarization in spectral lines in

both models, regardless the net amplitude and sign of continuum polarization, which is geometry dependent and model dependent.

For the STOKES MC simulations plotted for the same free electron density, the energy profile and overall amplitude and sign of the continuum polarization is driven by the relative presence of absorption (cf. the energy dependence of spectra and polarization in all curves on the centre and right panels of Fig. 3 and also the differences in between these two panels). It was discussed in Paper I that more absorption (higher $N_H$ and/or lower X-ray energies) in partially transparent models causes higher contribution of perpendicular polarization due to dominant scattering rather in the meridional plane, as unabsorbed photons need to travel on average rather near the rotation axis before being scattered and reaching the observer. More transparency allows photons passing through the sides, where scattering rather in the equatorial plane contributes to parallel polarization, which dilutes the perpendicular polarization or even dominates. Details of such competition in the total view depends on geometrical parameters. The obscuring material is generally more transparent (hence parallelly polarized) at high energies than at low energies.

The partial ionization is treated in the MC simulations simplistically by only uniformly adding free electrons on top of a homogeneous distribution of neutral atoms. This results in correct energy-independent amplification of reflected X-ray flux for higher free electron density due to uniformly larger albedo at all energies via scattering. But regarding the energy-dependent absorption and the spectral shape, the model inevitably overestimates absorption in the soft X-rays for higher ionization cases presented, where we would expect the total absorption opacity to be driven by all ions in some complex ionization structure depending on position inside the obscuring medium. Regardless of a particular geometry, especially
for high ionization such simplified treatment of partial ionization
results in lack of unabsorbed soft photons for both reflection
and transmission (higher soft polarization for both perpendicularly
and parallelly polarized contributions), as compared to even more
realistic scenarios. One should have this in mind not just for
understanding the diversity of results between the two different
models, but also before claiming the compared MC models more
realistic in all aspects than XSSTOKES\_TORUS. In the soft X-rays, the
XSSTOKES\_TORUS model produces better predictions for less ionized
and denser obscurers than the MC models presented due to its proper
treatment of partial ionization and *near* neutrality of the walls (with
all ions considered for reprocessing, not just free electrons on top
of neutral atoms). For more ionized and/or less dense obscurers, the
MC models are more appropriate with the caveat of over-estimated
typically negative total polarization in the soft X-rays, especially
for high ionization. The correct limit of full ionization with STOKES
with absorbers removed from the MC model will be additionally
discussed below for various densities of free electrons.

The energy profile of the continuum polarization from XSSTOKES\_TORUS is easier to explain, as we impose no transparency and only study the reflected radiation from the torus surface. The resulting polarization profile with energy follows that of the local reflection tables from Podgorný et al. (2022): multiple scattering in the Compton hump near 20 keV dilutes the polarization as photons on average scatter through more directions than elsewhere. The increase of polarization at energies above the Compton hump is given by lower number of scatterings of those photons that reached the observer at such energies from the original power-law distribution (each high-energy photon down-shifts in energy at each Compton scattering event as opposed to elastic Thomson scattering). The increase of polarization at energies below the Compton hump is given by enhanced photoelectric absorption at lower energies that effectively traps photons that would scatter multiple times before reaching the observer, which would have led into more diversity of scattering directions in the net view, hence depolarization. The direction and total amplitude of such reflection-induced polarization profile is then given by the geometrical parameters (see below). From the soft spectra, it is visible that even the most neutral reflection tables from Podgorný et al. (2022) that we adopted in XSSTOKES\_TORUS do not represent completely photo-electrically absorbed soft X-rays that we see in the STOKES MC simulations. This results in leveling of the continuum polarization fraction with energy at about 2–5 keV in XSSTOKES\_TORUS. We see such plateau of polarization with energy for any sign of resulting polarization. The sign does not change with energy for any combination of model parameters, as we have only reflection in this model, not diluted by transmitted photons with different polarization orientation towards hard X-rays. If the absorbing atoms were fully neutral in XSSTOKES\_TORUS, the photoelectric absorption cross-section behaving as ~$E^{-3}$ would cause a similarly increasing polarization from 5 keV towards the lower energies (but again in both positive and negative resulting polarization, as the no-transparency condition holds compared to the MC results).

**3.2 Continuum polarization dependence on geometry, partial transparency, and ionization**

To disentangle the effects of partial transparency and ionization in
more detail and with respect to the varying torus geometry and
observer's inclination, we will proceed by studying energy-integrated
results in particular bands in the absence of spectral lines. We show
in Figs 4 and 5 the same integrated polarization in 3.5-6 keV

and 30–60 keV as in figures A3 and A4 in Paper I, but with the
XSSTOKES\_TORUS added. We also plot the XSSTOKES\_TORUS results
without taking the bottom half-space of the reflecting torus into
account (mode *B* = 0 in the model, expecting some optically thick
material present inside the torus cavity, see Appendix *B* for details).
This is only to show that the contribution from the illuminated areas
below the equator is important for low inclinations when they are
observable and the overall change in predicted polarization is not
very significant. The new model is in both variants compared to
the MC simulations for low, moderate and high partial ionization
levels (see Paper I for details for the values of free electron densities
relative to neutral atoms). The highest resemblance between the
two models generally happens for the high ionization and high
densities of the MC simulations, which may seem surprising at first,
as the results should match for low ionization rather. The key model
difference is the remaining partial transparency in STOKES that dilutes
the reflection-induced perpendicular polarization even for *N*<sub>H</sub> =
10<sup>25</sup> cm<sup>-2</sup>. If we had used even higher equatorial column density
in the MC simulations, all curves (for any ionization level presented)
would move towards more perpendicularly polarized results (i.e.
towards the XSSTOKES\_TORUS model representing the opaque limit),
as the grazing angle column densities for the surface layers would
gain sufficiently high optical depths, which is critical for the effective
reduction of symmetry in scattering directions and the perpendicular
polarization gain. Such discrepancy in polarization due to partial
transparency is naturally larger for higher *i* and lower *Θ*. With 3D
travelling allowed inside the torus and self-irradiation included in
the MC models, we notice high parallel polarization contribution
for high inclinations and low half-opening angles even for *N*<sub>H</sub> =
10<sup>25</sup> cm<sup>-2</sup> and the highly ionized case. This is because in such highly
obscured configurations, the photons are still allowed to scatter
multiple times in the upper regions of the torus before escaping to the
observer, which defines the dominant plane of last scattering events
and the prevailing parallel polarization orientation. The upper panels
of Figs 4 and 5 show almost no difference in ionization level, because
the densities of the absorbers are for all ionization cases too low to
enforce a more restricted global geometry (causing obscuration and
beaming) and the torus is optically thin. The direction of change of
polarization towards more negatively polarized results with higher
ionization in MC simulations in the bottom panels of Figs 4 and 5
follows from the competition between reflected and transmitted X-
rays in the MC model. For higher ionization, there are more reflected
photons from the surface due to high relative fraction of free electrons
with respect to the absorbers and the back-side reflection dominates
over transmission, which induces rather perpendicularly polarized
photons (for low and intermediate *Θ*; at higher *Θ* reflection from
the left and right sides of the torus from observer's perspective
occupies greater projected area contribution, which again induces
parallel polarization).

This effect of relative flux contribution from different projected
areas of the scattering medium in the partially transparent model
is much more important than the change in polarization due to the
average number of scatterings per photon. If the partial transparency
was forbidden in the pure MC model, then the change of free
electron density relative to the density of absorbers would only
affect the average number of scatterings allowed when the photons
enter the surface and escape. Such impact of changing ionization on
polarization via average number of scatterings is smaller and in the
reverse direction for net negative polarization (more scattering orders
for higher ionization mean lower polarization for any resulting sign).
And it is in fact seen in the comparison of the two different energy
bands for the XSSTOKES\_TORUS model, which has the no-transparency
<figure><img src="image_5.png" /><figcaption>**Figure 4.** Comparison of the STOKES MC simulations from figures A3 and A4 of Paper I (with different line styles assigned to different ionization levels) with the XSSTOKES_TORUS results (solid). We plot the polarization degree *p* versus inclination *i* for Θ = 25° (left), Θ = 45° (middle), and Θ = 75° (right). We show the results integrated in 3.5–6 keV (blue) and 30–60 keV (black) and for $N_H = 10^{24}$ cm⁻² in STOKES (top) and $N_H = 10^{25}$ cm⁻² in STOKES (bottom). The results of the XSSTOKES_TORUS model that do not take into account reflection below the equator (parameter *B* = 0) are additionally shown in 3.5–6 keV (yellow) and 30–60 keV (red). Otherwise the results of the XSSTOKES_TORUS model are displayed for the entire illuminated torus surface (parameter *B* = 1) and the STOKES results always allow photons to travel anywhere inside the 3D scattering structure, even escaping and reprocessing multiple times. The primary input was set to Γ = 2 and $p_0$ = 2 per cent for all displayed cases. The XSSTOKES_TORUS simulations do not cover the entire space in *i* and Θ, because for high *i* and small Θ, the reflecting area is obscured.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>**Figure 5.** The same as in Fig. 4, but energy-averaged polarization degree, *p*, versus half-opening angle Θ is shown for *i* = 22.3°, *i* = 43.3°, *i* = 68.0°, and *i* = 85.7° (left to right).</figcaption></figure>

condition and differentiates only the number of scatterings per energy band due to change of absorption to scattering opacity ratio with energy. It is also supported by the additional single-scattering results discussed below.

## 3.3 Imaging results

In order to strengthen the above analysis, we show in Fig. 6 the

projected torus images for various inclinations and half-opening angles from the computations that underlie the XSSTOKES_TORUS model. In Figs 7 and 8 are the corresponding MC examples for high neutral density with high ionization and low neutral density with low ionization, respectively, that show the biggest integrated polarization state differences in the selected MC examples. With high density of both neutral species and free electrons in the MC model we obtain high perpendicular polarization from the opposite
<figure><img src="image_7.png" /><figcaption>**Figure 6.** The images in Cartesian coordinates X and Y on the sky of the projected torus (with its rotation axis aligned with Y) from the TORUS_INTEGRATOR, which precomputes the tabular dependencies of the XSSTOKES_TORUS model. The location of the central isotropic source is marked by the black star. In the colour-coded pixels, we show the projected contributions of the torus surface that are both illuminated by the central source and directly observable, with the colour corresponding to the *pF/F* quantity, i.e. the polarized flux divided by the flux of the source towards the inclined observer, if the source was unobscured. Each of the contributing projected surface areas is additionally marked with a black bar with length proportional to the locally induced linear polarization degree and tilt corresponding to the locally induced linear polarization direction. Vertically aligned bars represent the polarization orientation aligned with the system rotation axis. The six panels represent different combinations of the torus half-opening angles Θ and observer's inclinations *i*. The results are integrated in 3.5–6 keV.</figcaption></figure>
<figure><img src="image_8.png" /><figcaption>**Figure 7.** The same as in Fig. 6, but the data are taken from the STOKES MC simulation for the highly ionized case with $N_H = 10^{25} \text{ cm}^{-2}$ and $\tau_e = 7$. Pixels with low number of photons show high numerical noise and we do not provide the polarization bar for clarity. In this regime, we obtain the highest resemblance with the XSSTOKES_TORUS model, because the torus walls show low transparency and the reflection is enhanced. Depending on the viewing angle and torus half-opening angle, parallel or orthogonal polarization direction dominates in the spatially integrated view.</figcaption></figure>
<figure><img src="image_9.png" /><figcaption>**Figure 8.** The same as in Fig. 6, but the data are taken from the STOKES MC simulation for the low ionized case with $N_H = 10^{24}$ cm$^{-2}$ and $\tau_e = 0.007$. In this regime, the entire scattering region is highly transparent and we observe predominantly parallel polarization with the system axis, because most photons arriving to the observer scatter in the equatorial plane.</figcaption></figure>

side of the reflecting inner torus surface, which provides relatively strong flux contribution with respect to angular distributions of photons per visible surface area. For high half-opening angles and all viewing angles, the reflection from the left and right sides from

observer's perspective occupies larger projected areas relative to the back side producing perpendicularly polarized signal. Thus, for high half-opening angles even for the XSSTOKES_TORUS model the integrated results are parallelly polarized, although we observe
lower total polarization fraction by more than half compared to the integrated MC results due to the difference in partial transparency. The higher the half-opening angle, the more equatorially distributed is the scattering medium with respect to the central source. In the limit of high half-opening angles, the torus is representing a disc ring and should match its polarization properties (see Section 4).

## 3.4 Special cases of full ionization and full neutrality

Next, we removed the absorbers from the STOKES MC simulations and made additional simulations with free electrons only for a) multiple scatterings allowed (the correct full ionization limit) and b) for single-scattering results (the fully neutral limit reached for high electron densities). Because in the toroidal geometries the line-of-sight density near grazing inclinations is significantly lower than the equatorial density (unlike e.g. wedge-shaped geometries for obscurers), high equatorial electron optical depths are needed in the MC simulations to ensure optically thick surface layers seen under grazing inclination angles. The results for both multiple scatterings and single-scattered photons are in Fig. 9 for various equatorial Thomson optical depths $\tau_e = 2r\sigma_T n_e$ (where $\sigma_T$ is Thomson cross-section and $n_e$ is the homogenous electron number density), compared directly to the XSSTOKES_TORUS model. Indeed, the higher the equatorial $\tau_e$, the more perpendicular polarization contribution we obtain from the MC simulations, as the scattering geometry is reduced to an optically thick funnel. The single-scattered photons show higher polarization degree than the multiple-scattering results (for any sign of the resulting polarization state that is given by $\Theta$ and $i$, as this is a general effect related to the level of asymmetry in scattering directions in the medium). Only for the lowest $\tau_e$ there is almost no difference<fnref n="2" /> and the simulations resemble the optically thin pure-scattering polarization dependencies on inclination in the literature for similar geometries (Sunyaev & Titarchuk 1985; Tomaru et al. 2024).

The high-density single-scattering results from the MC simulations allow the scattering to occur in very small volumes, practically on the surface of the torus, thus best matching the XSSTOKES_TORUS model. However, the XSSTOKES_TORUS takes into account some energy-dependent level of average scattering orders thanks to its pre-computed ionization structure. To cross-validate the models in terms of geometry, we replaced the local reflection in XSSTOKES_TORUS with energy-independent Chandrasekhar's analytical formulae for reflection gained via Rayleigh single-scattering (Chandrasekhar 1960). Finally, these curves (in red in Fig. 9) reproduce the high-density single-scattering MC simulations reasonably well.<fnref n="3" /> Their shape also well follows the original XSSTOKES_TORUS model with even higher perpendicular polarization induced due to the neglecting of higher scattering orders. To prove that the general behaviour of polarization is alike for all $i$ and $\Theta$, we plot in Fig. 10 the entire parameter space in $\{i, \Theta\}$ with XSSTOKES_TORUS when using both local reflection prescriptions. Plotting the full geometrical parameter space is also useful for comparisons with other models in the literature that assume different than toroidal obscurers for the (nearly) neutral high-density

conditions. We obtain similar polarization dependencies on geometry as models in Ursini et al. (2023) and Veledina et al. (2023a) that both adopted a reflecting cone.

## 3.5 Effects of changing primary radiation properties

Lastly, let us compare the effects of changing primary radiation properties. Fig. 11 shows the same dependencies on changing primary polarization and $\Gamma$ for XSSTOKES_TORUS and for the full MC simulation with absorbers (to provide the MC simulations we select a few cases from fig. 10 of Paper I). The effects on polarization have comparable extent and the same qualitative behavior. This also cross-validates the new model. The dependency of the net polarization on changing primary polarization state is natural from the scattering theory (see Appendix D) and we observe similar results for reflection from accretion discs (see Section 4 or the results in Podgorný et al. 2023a). The dependence of the net polarization on changing $\Gamma$ is given by different weighting of the spectrum on different energies.

# 4 REFLECTION FROM A FARAWAY DISC

In this section, we briefly discuss the results of the XSSTOKES_DISC routine, suitable for studying X-ray polarization signatures from distant rings of AGN accretion discs without any special- or general-relativistic distortion.

## 4.1 Energy dependence of polarization

Fig. 12 shows the resulting polarization with energy for various model parameters and two values of $M_i$. The $M_i = 0.3$ case represents a centrally illuminating corona with fairly low relative height with respect to the disc radial extension. The $M_i = 1$ case represents a completely diffuse corona around the disc with many photons arriving also vertically along the disc normal. The XSSTOKES_DISC routine for low $M_i$ ($\le 0.8$) predicts parallel (i.e. positive) polarization, because the reflecting matter is distributed equatorially with respect to the source, which forms the dominant plane of scattering (with polarization direction from the Compton effect perpendicular to it). For e.g. $M_i = 0.3$, the level of received net polarization fraction can be from 0 per cent up to ~30 per cent, mainly depending on the inclination of the observer, which is the main driver of polarization in this simplistic model.

The spectral lines are depolarized, as expected, and the energy profile of polarization degree follows that of the local reflection tables from Podgorný et al. (2022), seen already in Fig. 3 with the XSSTOKES_TORUS model. The obtained difference in polarization degree is expected on the output for changing the incident emission by additional small polarized fraction $p_0$. The received emission has larger polarization compared to a parallelly polarized result computed for unpolarized primary, if the incident polarization is oriented also parallelly (effectively adding some fraction of polarization), and is depolarized compared to a parallelly polarized result computed for unpolarized primary, if the incident polarization is oriented perpendicularly (effectively subtracting some fraction of polarization). The opposite is true for perpendicularly polarized results for unpolarized primary. This is consistent with the impact of primary polarization on reflected emission from the accretion disc that was presented for inner regions of the disc including general-relativistic effects in the lamp-post disc-corona system in Podgorný et al. (2023a) and with the reflection on the torus (see Fig. 11). We refer to Appendix D for more theoretical background, showing that

<footnote n="2">²Even when multiple scatterings are allowed, the photons scatter on average once before reaching the observer. Photons that did not scatter even once (direct primary radiation) are not registered in the simulation.</footnote>

<footnote n="3">³The remaining differences between the solid red and dotted brown curves in Fig. 9 could be due to the fact that STOKES in the adopted set-up adds photons symmetrically with respect to the equatorial plane to reduce MC numerical noise and computational times. Further investigations of this effect remains to be done.</footnote>
<figure><img src="image_10.png" /><figcaption>**Figure 9.** The polarization degree *p* versus inclination *i* for $\Theta = 25^\circ$ (left), $\Theta = 45^\circ$ (middle), and $\Theta = 75^\circ$ (right), as in Fig. 4. We compare the STOKES MC simulations computed with homogeneously distributed free electrons only (different line colours are assigned to different equatorial Thomson optical depths $\tau_e$) and the XSSTOKES_TORUS results integrated in 3.5–6 keV (solid light blue) and 30–60 keV (solid black). The STOKES simulations were computed with multiple scatterings allowed (dashed lines, the full ionization model) and with single scatterings (dotted lines), both integrated in 3.5–6 keV, but note that the polarization produced without absorbers in this range is energy independent. The primary input was set to $\Gamma = 2$ and $p_0 = 2$ per cent for all displayed cases. We also analogically provide the results of the XSSTOKES_TORUS model when a more simple energy-independent prescription is used for local reflection: the Chandrasekhar’s single-scattering analytical formulae (red).</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>**Figure 10.** The polarization degree *p* versus observer’s inclination *i* versus torus half-opening angle $\Theta$. We provide the full parameter space from the XSSTOKES_TORUS model, using the local reflection tables from Podgorný et al. (2022) in 3.5–6 keV (left) and when a simple energy-independent prescription from the Chandrasekhar’s single-scattering formulae is taken instead (right). The polarization pattern with changing geometry matches, only the obtained polarization fraction is different, which is more observable in Fig. 9 that provides a few slices in $\Theta$ of these heatmaps. The results are provided for $\Gamma = 2$ and 2 per cent parallely polarized primary. The values of $\Theta(i)$ below the $\Theta_{\text{limit}}(i)$ are directly not observable, thus marked in white. See Appendices A and B for more information.</figcaption></figure>

for small $p_0$ the difference in obtained polarization with respect to the results for unpolarized primary scales linearly with $p_0$ and is not greater than $p_0$.

## 4.2 Dependence of continuum polarization on inclination and coronal size

To see the inclination dependence of polarization clearly and to examine the dependency on $M_i$, Fig. 13 shows the XSSTOKES_DISC results for $M_i = 0.3, 0.8$, and 1.0, respectively, integrated in two different energy bands with absence of spectral lines. The results for low $M_i$ are consistent with the high half-opening angle limit seen in the MC simulations and in the XSSTOKES_TORUS model, both assuming central isotropic illumination, i.e. a nearly linearly increasing polarization fraction with inclination and parallel polarization direction in all subcases (compare with Figs 4 and 9,

right panels). The reflection from the distant disc provides only a higher polarization fraction due to effectively higher asymmetry of the system compared to the circular tori. The results for low $M_i$ are consistent with fig. 11 from Ratheesh et al. (2021), which attempted for a similar reflection scenario with the models of Matt et al. (1989) and Matt, Perola & Piro (1991). The geometrical difference with respect to our case was higher isotropy in illumination of the disc, hence receiving about 50 per cent lower net polarization compared to our results for $M_i = 0.3$. If we increase the level of isotropy in illumination of the disc by increasing $M_i$ in our model, the polarization fraction drops monotonically and eventually reaches perpendicular orientation with increasing polarization fraction again towards the extreme values of $M_i = 1$, as the photons arriving vertically to the disc begin to dominate the resulting polarization. When the corona is fully covering the disc and has non-negligible optical depth, however, we would expect the Comptonized photons
<figure><img src="image_12.png" /><figcaption>**Figure 11.** The XSSTOKES_TORUS results (top) for different cases of primary radiation, compared in the same way with the STOKES MC simulations (bottom) for $N_H = 10^{25} \text{ cm}^{-2}$ and high ionization taken from fig. 10 in Paper I. We plot the energy-averaged polarization degree, *p*, versus inclination *i* for $\Theta = 25^\circ$ (left), $\Theta = 45^\circ$ (middle), and $\Theta = 75^\circ$ (right). We show the results in 3.5–6 keV (solid) and 30–60 keV (dashed). The magenta curves correspond to the 2 per cent parallelly polarized primary with $\Gamma = 2.0$. The red and yellow corresponds to the unpolarized and 2 per cent perpendicularly polarized primary with $\Gamma = 2.0$, respectively. The green and black curves correspond to the 2 per cent parallelly polarized primary with $\Gamma = 1.2$ and $\Gamma = 2.8$, respectively.</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>**Figure 12.** The polarization degree, *p*, versus energy for distant disc reflection computed by XSSTOKES_DISC for $M_i = 0.3$ (top, parallelly polarized) and $M_i = 1$ (bottom, perpendicularly polarized). We show the results for various cosines of the observer's inclination: $\mu_e = 0.925$ (left), $\mu_e = 0.675$ (middle), $\mu_e = 0.125$ (right). The colour code represents different incident polarizations of the primary power law with $\Gamma = 2$ for the two cases of $M_i$: unpolarized, 2 per cent parallelly polarized, and 2 per cent perpendicularly polarized.</figcaption></figure>

that reflect from the disc to re-scatter again in the corona before reaching the observer and change their polarization state once more. Hence, the results for large $M_i$ are less realistic and show only the theoretical direction of the expected change in polarization by disc reflection when increasing the coronal size above the disc.

## 4.3 Comparison with analytical computations

In Fig. 14, we show the energy-independent Chandrasekhar’s single-scattering results for reflection (Chandrasekhar 1960) for the same three cases of incident polarization and $M_i$ values, displayed in the same manner as in Fig. 13. We numerically integrated the analytical predictions in all azimuthal emission angles $\Phi_e$ and selected ranges of incident angles. The analytical reflection model matches in the total polarization degree and direction predictions by XSSTOKES_DISC

rather in the lower energy band studied for any $M_i$, as there the XSSTOKES_DISC results are absorption dominated; and at nearly all X-ray energies for low $M_i$, where the XSSTOKES_DISC code provides rather energy-independent results.

## 5 CONCLUSIONS

We developed a series of new routines that help to predict X-ray polarization arising from reflection on distant axially symmetric scatterers illuminated by a central isotropic power-law emission of arbitrary polarization. A simple non-relativistic integration across the inner walls of a circular torus, using local reflection tables originally computed for coronal power-law impinging on constant-density AGN accretion disc, can in some configurations well represent the expected outcome from reprocessing in cold AGN dusty tori. This
<figure><img src="image_14.png" /><figcaption>**Figure 13.** The energy-averaged polarization fraction, *p*, computed with XSSTOKES_DISC in 3.5–6 keV (solid lines) and 30–60 keV (dashed lines) versus observer's inclination *i* for $M_i = 0.3$ (top), $M_i = 0.8$ (middle), and $M_i = 1$ (bottom). The colour code represents different incident polarizations of the primary power law with $\Gamma = 2$ for the three cases of $M_i$: unpolarized, 2 per cent parallelly polarized, and 2 per cent perpendicularly polarized.</figcaption></figure>

<figure><img src="image_15.png" /><figcaption>**Figure 14.** The polarization degree, *p*, versus observer's inclination *i* for the energy-independent Chandrasekhar's single-scattering approximation integrated uniformly in all azimuthal emission angles $\Phi_e$ and in selected ranges of cosines of incident angles $0 \le \mu_i \le M_i$, as in the XSSTOKES_DISC model. We display the results for different primary polarizations and $M_i$ values in the same way as in Fig. 13 for easy comparison.</figcaption></figure>

was tested against MC simulations that in addition to our new simple model allow for partial transparency, changeable ionization and self-irradiation effects. Using a much simpler approach, we obtained in the most similar cases still about twice higher net polarization fraction (tens of per cent), if the dominant resulting polarization direction was perpendicular to the axis of symmetry, and about twice lower (a few per cent), if the net polarization direction was parallel. Detailed investigation shows that the main driver of the difference in the model predictions is the partial transparency related to the absorber's structure. Contribution from the inner walls alone to the total AGN emission is difficult to estimate when decomposing observational signal in type-2 AGNs and leads to increase in perpendicularly polarized X-ray contribution. Searching for the least similar case, we showed that the MC simulations for optically thin covering media reach lower tens of per cent (reprocessed) polarization with parallel orientation, which is rather independent of the opening angle, but dependent on inclination.

The difference in predicted polarization between the two extreme cases (the optically thin MC case and the new model representing reflection from optically thick inner walls) is generally smaller for high half-opening angles and low inclination of the observer, when the partial transparency plays less role. Our analysis of certain regimes in the MC code shows that it is possible to span continuously through all values of polarization in between the two extremes by varying the torus density and ionization. Albeit many of the intermediate results presented are only illustrative to explain the role of different model parameters, the broad analysis also cross-validates the implementation of relative size and position parameters of the equatorial scatterer in the new model. Computation of more realistic models with non-homogeneous ionization profiles of all species and the focus on spectral lines, non-stationarity or geometries other than a torus is beyond the scope of this work and cannot be examined briefly due to large number of parameters.

None the less, the routines developed for these estimates can be already of wider use. The torus integrating routine is wavelength independent and the calculations can be easily modified to elliptical torus profiles. The local reflection tables from Podgorný et al. (2022) used for the distant X-ray reprocessing discussed in this paper can be also easily replaced by any other reflection tables in a similar FITS format. For example, by ionization-dependent tables, or the same nearly neutral computations but for different densities, or analytical prescriptions, as already briefly shown. Therefore, we suggest a possible usefulness of the torus integration routine for studying physical objects also other than dusty AGN tori, such as thick accretion discs or obscuring outflows of accreting stellar-mass black holes, neutron stars or white dwarfs.

One could also separately precompute the resulting FITS spec-
tropolarimetric tables for arbitrary axially symmetric reflector for three independent incident polarization states, using any method and e.g. the ASCII to FITS convertor that we applied. Employing new model parameters, it is then easy to adapt the follow-up XSSTOKES interpolation routine, which represents a fast XSPEC compatible fitting model interpolating for arbitrary incident polarization state. In order to test such possibility, we provided another example of a simple non-relativistic distant disc reflector of a central power-law originating in arbitrarily extended inner coronal region. The results for small extension of the X-ray source are consistent with the centrally illuminated reflecting toroidal structures studied for large half-opening angles and with other X-ray polarization studies of reflection from accretion discs, assuming compact coronal geometries.

ACKNOWLEDGEMENTS

All authors thank Michal Bursa, who created the documentation, the
basis and final form of the XSPEC TABLE MODEL GENERATOR routine,
which JP only checked for consistency with a similar routine inde-
pendently developed. The authors acknowledge thorough reading of
the manuscript by the referee and very helpful comments leading to
substantial improvement of this work. The authors thank also Giorgio
Matt for useful discussions in the early stages of the work and the
Strasbourg Astronomical Observatory for providing the necessary
computational capacities. JP and MD acknowledge the support from
the Czech Science Foundation project GACR 21-06825X and the
institutional support from the Astronomical Institute RVO:67985815.
The background for Fig. 1 was obtained with the GEOGEBRA tool
available at https://www.geogebra.org/m/kxwUhFqx.
## DATA AVAILABILITY

The XSPEC software is publicly available in the HEASARC data base (https://heasarc.gsfc.nasa.gov/xanadu/xspec/). The XSSTOKES_TORUS and XSSTOKES_DISC C routines for XSPEC and their source tables and documentation are available at https://github.com/jpodgorny/xsstokes_torus and https://github.com/jpodgorny/xsstokes_disc, respectively. The Python 3 routine TORUS_INTEGRATOR and its documentation is available at https://github.com/jpodgorny/torus_integrator. The Python 3 routine XSPEC TABLE MODEL GENERATOR and its documentation is available at https://github.com/mbursa/xspec-table-models. The STOKES code version v2.07 is currently not publicly available and it will be shared upon reasonable request.

## REFERENCES

Abramowicz M. A., 2005, in Merloni A., Nayakshin S., Sunyaev R. A., eds, Growing Black Holes: Accretion in a Cosmological Context. Springer, Berlin, 257

Antonucci R., 1993, ARA&A, 31, 473

Arnaud K. A., 1995, in Office of Guest Investigator Programs Memo OGIP/92-009. NASA Goddard Space Flight Center, Laboratory for High Energy Astrophysics

Arnaud K. A., 1996, in Jacoby G. H., Barnes J., eds, ASP Conf. Ser. Vol. 101, Astronomical Data Analysis Software and Systems V. Astron. Soc. Pac., San Francisco, p. 17

Beheshtipour B., Krawczynski H., Malzac J., 2017, ApJ, 850, 14

Bianchi S., Matt G., Tamborra F., Chiaberge M., Guainazzi M., Marinucci A., 2010, in X-ray Polarimetry: A New Window in Astrophysics by R. Bellazzini, E. Costa, G. Matt and G. Tagliaferri. Cambridge Univ. Press, San Francisco, p. 130

Brown J. C., McLean I. S., 1977, A&A, 57, 141

Casares J., Jonker P. G., 2014, Space Sci. Rev., 183, 223

Chandrasekhar S., 1960, Radiative Transfer. Dover Publications, New York

Dorodnitsyn A., Kallman T., 2010, ApJ, 711, L112

Dorodnitsyn A., Kallman T., 2011, Ap&SS, 336, 245

Dovčiak M., Muleri F., Goosmann R. W., Karas V., Matt G., 2011, ApJ, 731, 75

Dumont A.-M., Collin S., Paletou F., Coupé S., Godet O., Pelat D., 2003, A&A, 407, 13

Fabrika S., 2004, Astrophys. Space Phys. Rev., 12, 1

Ghisellini G., Haardt F., Matt G., 1994, MNRAS, 267, 743

Gianolli V. E. et al., 2023, MNRAS, 523, 4468

Goosmann R. W., Gaskell C. M., 2007, A&A, 465, 129

Goosmann R. W., Matt G., 2011, MNRAS, 415, 3119

Haardt F., 1993, ApJ, 413, 680

Haardt F., Maraschi L., 1991, ApJ, 380, L51

Hanisch R., Farris A., Greisen E., Pence W., Schlesinger B., Teuben P., Thompson R., Warnock A., 2001, A&A, 376, 359

Ingram A. et al., 2023, MNRAS, 525, 5437

Jiang Y.-F., Stone J. M., Davis S. W., 2019, ApJ, 880, 67

Kaaret P., Feng H., Roberts T. P., 2017, ARA&A, 55, 303

Koljonen K. I. I., Tomsick J. A., 2020, A&A, 639, A13

Krawczynski H., Beheshtipour B., 2022, ApJ, 934, 4

Krawczynski H. et al., 2022, Science, 378, 650

Marin F., 2018, A&A, 615, A171

Marin F., Goosmann R. W., Gaskell C. M., Porquet D., Dovčiak M., 2012, A&A, 548, A121

Marin F., Goosmann R. W., Gaskell C. M., 2015, A&A, 577, A66

Marin F., Goosmann R. W., Petrucci P. O., 2016, A&A, 591, A23

Marin F., Dovčiak M., Muleri F., Kislat F. F., Krawczynski H. S., 2018a, MNRAS, 473, 1286

Marin F., Dovčiak M., Kammoun E. S., 2018b, MNRAS, 478, 950

Marinucci A., Tamborra F., Bianchi S., Dovčiak M., Matt G., Middei R., Tortosa A., 2018, Galaxies, 44, 6

Marinucci A. et al., 2022, MNRAS, 516, 5907

Matt G., 1993, MNRAS, 260, 663

Matt G., Perola G. C., Costa E., Piro L., 1989, in Hunt J., Battrick B., eds, ESA Special Publication Vol. 296, Two Topics in X-Ray Astronomy, Volume 1: X Ray Binaries. Volume 2: AGN and the X Ray Background. ESA, p. 991

Matt G., Perola G. C., Piro L., 1991, A&A, 247, 25

Matt G., Fabian A. C., Ross R. R., 1993, MNRAS, 264, 839

Matt G., Feroci M., Rapisarda M., Costa E., 1996, Radiat. Phys. Chem., 48, 403

Miller J. M. et al., 2020, ApJ, 904, 30

Motta S. E., Kajava J. J. E., Sánchez-Fernández C., Giustini M., Kuulkers E., 2017a, MNRAS, 468, 981

Motta S. E. et al., 2017b, MNRAS, 471, 1797

Neilsen J., Homan J., Steiner J. F., Marcel G., Cackett E., Remillard R. A., Gendreau K., 2020, ApJ, 902, 152

Podgorný J., Dovčiak M., Marin F., Goosmann R., Różańska A., 2022, MNRAS, 510, 4723

Podgorný J., Dovčiak M., Goosmann R., Marin F., Matt G., Różańska A., Karas V., 2023a, MNRAS, 524, 3853

Podgorný J., Marin F., Dovčiak M., 2023b, MNRAS, 526, 4929 (Paper I)

Poutanen J., Svensson R., 1996, ApJ, 470, 249

Poutanen J., Nagendra K. N., Svensson R., 1996, MNRAS, 283, 892

Poutanen J., Veledina A., Zdziarski A. A., 2018, A&A, 614, A79

Ratheesh A., Matt G., Tombesi F., Soffitta P., Pesce-Rollins M., Di Marco A., 2021, A&A, 655, A96

Revnitsev M., Sunyaev R., Gilfanov M., Churazov E., 2002, A&A, 385, 904

Sunyaev R. A., Titarchuk L. G., 1980, A&A, 86, 121

Sunyaev R. A., Titarchuk L. G., 1985, A&A, 143, 374

Tagliacozzo D. et al., 2023, MNRAS, 525, 4735

Tamborra F., Matt G., Bianchi S., Dovčiak M., 2018, A&A, 619, A105

Tomaru R., Done C., Odaka H., 2024, MNRAS, 527, 7047

Urry C. M., Padovani P., 1995, PASP, 107, 803

Ursini F., Matt G., Bianchi S., Marinucci A., Dovčiak M., Zhang W., 2022, MNRAS, 510, 3674

Ursini F. et al., 2023, MNRAS, 519, 50

Veledina A. et al., 2023a, preprint (arXiv:2303.01174), accepted for publication in Nat. Astron.

Veledina A. et al., 2023b, ApJ, 958, L16

Weisskopf M. C. et al., 2022, J. Astron. Telesc. Instrum. Syst., 8, 1

## APPENDIX A: NUMERICAL IMPLEMENTATION OF THE TORUS REFLECTION

In this section, we provide details on the computational routines that lead to the physical model of reflection on a geometrical torus, described in Section 2.1. The parametrization is given in Fig. 1.

We first use a simple integrator of local reflection tables across the inner walls of the torus. The local reflection tables (Podgorný et al. 2022) store numerically computed Stokes parameters *I*, *Q*, and *U* dependent on energy (in 300 logarithmically spaced energy bins between 0.1 and 100 keV), incident power-law index Γ, local incident and emission cosines of inclination angles $\mu_i$ and $\mu_e$, and the azimuthal emission angle $\Phi_e$ – all for three independent polarization states of the incident radiation: unpolarized and 100 per cent polarized perpendicularly and with a 45° offset from the local surface’s projected normal (see below). The Python 3 module, called TORUS_INTEGRATOR, that computes the total reflection output in ASCII format is available in the Data Availability section alongside user instructions and documentation. The detailed calculations are described in Appendix B. Inside this routine, which is not yet the XSSTOKES_TORUS model for XSPEC, the user can define an isotropically emitting power-law point source located at the center of the coordinates with $1.2 \le \Gamma \le 3.0$ and a state of incident polarization given by the primary polarization degree $p_0$ and primary polarization direction $\Psi_0$. These model parameters
should follow the values given by the local reflection tables, as the interpolation is not performed for these parameters. Then the user sets any torus half-opening angle $25^{\circ} \le \Theta < 90^{\circ}$ measured from the pole and any observer's inclination $0^{\circ} < i < 90^{\circ}$ measured from the pole. In the current setup, the results are independent of the distance of the torus from the centre, i.e. the torus inner radius $r_{in}$.

There are two options via a parameter $B$, whether the integrating routine takes into account the entire observable and reflecting torus surface ($B=1$), or only the illumination and observation of the upper half-plane of the torus ($B=0$, expecting some optically thick absorbing material extending from the outer accretion disc to $r_{in}$). The computational grid for local reflection that is interpolated linearly is given in the angular coordinates $u \in (0, 2\pi]$ and $v \in [\pi - \Theta, \pi + \Theta]$ (for $B=1$) or $v \in [\pi - \Theta, \pi]$ (for $B=0$) and by linear binning defined by user via $2N_u$ and $N_v$ points in the corresponding $u$ and $v$ ranges. We have a good experience with convergence to an exact result for $N_u > 30$ and $N_v > 60$ in the most computationally demanding corners of the parameter space. We provide access in the Data Availability section to precomputed full tables for XSSTOKES_TORUS with $N_u = 50$ and $N_v = 80$, which were used for the results presented in this paper. The energy resolution of the output remains from the local reflection tables and the output is stored in ASCII file format with lower and upper energy bin edges and the Stokes $I, Q$, and $U$ columns. The TORUS_INTEGRATOR has also a built-in imaging function, so that the user can have more insight into the spatially integrated results.

In the next step, the ASCII files are converted into FITS files conforming to the OGIP standard of the XSPEC version 12.13.0 suitable for polarization, because only in this format the subsequent XSSTOKES_TORUS model reads them. In the Data Availability section, we provide the Python 3 conversion script called XSPEC TABLE MODEL GENERATOR that was used for the conversion. A reduction of the code to a pure spectral FITS file useful for previous XSPEC versions is straight forward within.

Finally, we provide in the Data Availability section the XSSTOKES_TORUS C routine compatible with XSPEC, including the necessary FITS table dependencies obtained in the previous step. Table A1 (top) introduces the available parameters. Note that in this final XSPEC model, we have to rescale the half-opening angle due to the no-transparency condition. When the illuminated surface is fully obscured (see Appendix B), the TORUS_INTEGRATOR stores zeros for the resulting Stokes parameters, which can cause interpolation issues in XSPEC. Therefore, we introduce a transformation

$$ \Theta' = \frac{\Theta - \Theta_{\min}(i)}{\Theta_{\max} - \Theta_{\min}(i)} \qquad (A1) $$

that allows the new interpolation parameter $\Theta'$ to vary between 0 and 1, effectively spanning the allowed values of $\Theta$ that depend on $i$. The $\Theta_{\max}$ value is chosen as $90^{\circ}$ and the $\Theta_{\min}(i)$ value is chosen as $\max\{25^{\circ}, \Theta_{\lim}(i)\}$. The theoretical $\Theta_{\lim}(i)$ curve for the torus terminator is shown on Fig. A1 and is numerically precomputed and stored in a text file. The XSSTOKES_TORUS C routine allows automatic conversion back to $\Theta$ for the model output provided.

Thanks to the axial symmetry of our toroidal set-up and the neglecting of relativistic effects, the incident polarization direction does not change with respect to the local reflection frame for any point on the torus surface. The reflected Stokes vector $\vec{S} = (I, Q, U)$ (we assume Stokes $V=0$) for arbitrary primary polarization state can be decomposed into a basis of Stokes vectors computed for three independent primary polarization states (e.g. Chandrasekhar 1960). Because we have one and the same $p_0$ and $\Psi_0$ for all reflecting surface points and because of the linearity of Stokes parameters, we

can precompute the total integrated Stokes vector $\vec{S}_{tot}$ for only three independent incident states of polarization, each stored in a FITS file, and compose the result for arbitrary incident polarization. We have chosen to store the computations with TORUS_INTEGRATOR and XSPEC TABLE MODEL GENERATOR for unpolarized and 100 per cent perpendicularly ($\Psi_0 = \pi/2$) and 100 per cent diagonally ($\Psi_0 = \pi/4$) polarized radiation. In this way we are able to use equation (2) from Podgorný et al. (2023a) in XSSTOKES_TORUS in the same form. It allows to effortlessly interpolate arbitrary incident polarization in XSPEC for any global $p_0$ and $\Psi_0$ parameters. In the same way, the core of the XSSTOKES_TORUS routine can serve for any axially symmetric reflecting model with $\vec{S}$ produced for three independent polarization states: $\vec{S}_{tot}(p_0 = 0, \Psi_0 = \text{undefined})$, $\vec{S}_{tot}(p_0 = 1, \Psi_0 = \pi/2)$, and $\vec{S}_{tot}(p_0 = 1, \Psi_0 = \pi/4)$ for different parameters (related to the global geometry and local reprocessing). See Appendix B on how each component of $\vec{S}_{tot}$ is obtained for the reflecting torus geometry to give

$$ \vec{S}_{tot}(p_0, \Psi_0) = \vec{S}_{tot}(0, -) + p_0\{[\vec{S}_{tot}(0, -) - \vec{S}_{tot}(1, \pi/2)] \cos 2\Psi_0 + [\vec{S}_{tot}(1, \pi/4) - \vec{S}_{tot}(0, -)] \sin 2\Psi_0\}. \qquad (A2) $$

We additionally introduce $\Delta\Psi$ as the orientation of the system with respect to the global axis of symmetry, which is also a free parameter in XSSTOKES_TORUS and to which the output Stokes $Q_{tot}$ and $U_{tot}$ parameters can be rotated as a last step.

## APPENDIX B: TOROIDAL INTEGRATING ROUTINE: DETAILED DESCRIPTION

We will provide a few computational details of the routine TORUS_INTEGRATOR that is introduced in Appendix A. The code uses standard relations between the Cartesian coordinate system {$x, y, z$} given by the base vectors $\vec{e}_x = (1, 0, 0)$, $\vec{e}_y = (0, 1, 0)$, $\vec{e}_z = (0, 0, 1)$ and the torus surface coordinates {$u, v$} given by the base vectors $\frac{\partial}{\partial u} = (-\sin u, \cos u, 0)$, $\frac{\partial}{\partial v} = (-\sin v \cos u, -\sin v \sin u, \cos v)$:

$$ \begin{aligned} x &= (R + r \cos v) \cos u, \\ y &= (R + r \cos v) \sin u, \\ z &= r \sin v, \end{aligned} \qquad (B1) $$

where $R = r + r_{in}$ is the distance between (0,0,0) and the center of the toroidal circle, and

$$ r = r_{in} \frac{\cos \Theta}{1 - \cos \Theta} \qquad (B2) $$

is the radius of the toroidal circles in the meridional plane (see Fig. 1). The surface is given by another standard implicit formula

$$ \Phi = (x^2 + y^2 + z^2 + R^2 - r^2)^2 - 4R^2(x^2 + y^2) = 0. \qquad (B3) $$

The local reflection tables need to be interpolated at each point in the {$u, v$} grid in their three angular dependencies $\mu_i = \cos \delta_i$, $\mu_e = \cos \delta_e$, and $\Phi_e$ properly defined in Dovčiak et al. (2011) and depicted here in Fig. B1 (left). The code precomputes these angles at each grid point given their definitions in the local frame and given the local surface normal $\vec{n} = \frac{\nabla\Phi}{|\nabla\Phi|}$, the incident vector $\vec{I} = (x, y, z)$, the emission vector $\vec{E} = (0, \sin i, \cos i)$, and their respective projections to the local tangent plane through scalar products.

The code ensures that the grid points with $\delta_i \notin [0, \pi/2]$ and $\delta_e \notin [0, \pi/2]$ are not accounted for. For $B=0$ we limit $\pi - \Theta \le v \le \pi$, i.e. we do not account for those regions that lie below the equatorial plane where some outer disc material could be extending,
<table><caption>**Table A1.** The XSPEC parameters available in the two attached XSSTOKES model versions.</caption><thead><tr><th>Model name</th><th>Parameter (unit)</th><th>Description</th><th>Initial</th><th>Min</th><th>Bottom</th><th>Max</th><th>Top</th><th>Step</th><th>Interpolation</th><th>Free</th></tr></thead><tbody><tr><td rowspan="7">xsstokes.torus</td><td>Γ</td><td>Primary power-law photon index</td><td>2.0</td><td>1.2</td><td>1.2</td><td>3.0</td><td>3.0</td><td>0.1</td><td>Linear</td><td>Yes</td></tr><tr><td>cos (i)</td><td>Cosine of observer's inclination</td><td>0.775</td><td>0.025</td><td>0.025</td><td>0.975</td><td>0.975</td><td>0.01</td><td>Linear</td><td>Yes</td></tr><tr><td>Θ'</td><td>Rescaled half-opening angle</td><td>0.5</td><td>0</td><td>0</td><td>1</td><td>1.</td><td>0.05</td><td>Linear</td><td>Yes</td></tr><tr><td>B</td><td>Integrating below the equator Yes/no</td><td>1</td><td>0</td><td>0</td><td>1</td><td>1.</td><td>0.1</td><td>Linear</td><td>No</td></tr><tr><td>p<sub>0</sub></td><td>Primary polarization degree</td><td>0</td><td>0</td><td>0</td><td>1.</td><td>1.</td><td>0.01</td><td>Linear</td><td>Yes</td></tr><tr><td>Ψ<sub>0</sub> (°)</td><td>Primary polarization direction</td><td>0</td><td>-90</td><td>-90</td><td>90.</td><td>90.</td><td>5</td><td>Linear</td><td>Yes</td></tr><tr><td>ΔΨ (°)</td><td>System orientation</td><td>0</td><td>-90</td><td>-90</td><td>90.</td><td>90.</td><td>5</td><td>Linear</td><td>No</td></tr><tr><td rowspan="7">xsstokes.disc</td><td>z</td><td>Overall Doppler shift</td><td>0</td><td>-0.999</td><td>-0.999</td><td>10</td><td>10</td><td>0.1</td><td>Linear</td><td>No</td></tr><tr><td>Stokes</td><td>Output definition (see documentation)</td><td>1</td><td>-1</td><td>-1</td><td>10</td><td>10</td><td>1</td><td>Linear</td><td>No</td></tr><tr><td>M<sub>1</sub></td><td>Coronal size scaling</td><td>0.3</td><td>0.2</td><td>0.2</td><td>1.0</td><td>1.0</td><td>0.01</td><td>Linear</td><td>Yes</td></tr><tr><td>Γ</td><td>Primary power-law photon index</td><td>2.0</td><td>1.2</td><td>1.2</td><td>3</td><td>3</td><td>0.1</td><td>Linear</td><td>Yes</td></tr><tr><td>cos (i)</td><td>Cosine of observer's inclination</td><td>0.775</td><td>0.025</td><td>0.025</td><td>0.975</td><td>0.975</td><td>0.01</td><td>Linear</td><td>Yes</td></tr><tr><td>p<sub>0</sub></td><td>Primary polarization degree</td><td>0</td><td>0</td><td>0.</td><td>1.</td><td>1.</td><td>0.01</td><td>Linear</td><td>Yes</td></tr><tr><td>Ψ<sub>0</sub> (°)</td><td>Primary polarization direction</td><td>0</td><td>-90</td><td>-90.</td><td>90.</td><td>90.</td><td>5</td><td>Linear</td><td>Yes</td></tr><tr><td>ΔΨ (°)</td><td>System orientation</td><td>0</td><td>-90.</td><td>-90.</td><td>90.</td><td>90.</td><td>5</td><td>Linear</td><td>No</td></tr><tr><td rowspan="7">xsstokes.disc</td><td>z</td><td>Overall Doppler shift</td><td>0</td><td>-0.999</td><td>-0.999</td><td>10</td><td>10</td><td>0.1</td><td>Linear</td><td>No</td></tr><tr><td>Stokes</td><td>Output definition (see documentation)</td><td>1</td><td>-1</td><td>-1</td><td>10</td><td>10</td><td>1</td><td>Linear</td><td>No</td></tr></tbody></table>

<figure><img src="image_16.png" /><figcaption>**Figure A1.** The blue curve is the limiting half-opening angle $\Theta_{\text{limit}}$ with inclination $i$, above which the reflecting area of the torus is directly observable. Such curve naturally appears for the torus geometry with a convex inner boundary with respect to the central source. Any half-opening angle below this curve for a given $i$ leads to a full eclipse. The computation is described in Appendix B. The shaded area represents the range of $\Theta(i)$ between $\Theta_{\text{min}}(i)$ and $\Theta_{\text{max}}(i)$, where all presented codes smoothly operate and where we define $\Theta'(\Theta)$.</figcaption></figure>

<figure><img src="image_17.png" /><figcaption>**Figure B1.** Left: The definitions of angles and vectors in the locally reflecting plane, tangent to the torus surface. Right: The definitions of angles and vectors in the polarization plane, perpendicular to the photon momentum direction. These are needed for the calculations of rotation of the polarization direction by changing frame of reference.</figcaption></figure>

and for any $v$ smaller than the shadow boundary given by $\Theta$. For $B=1$ we limit $\pi - \Theta \le v \le \pi + \Theta$, symmetrically with respect to the equatorial plane. The region of integration has to be also visible by the observer, which is for each $u$ and $i$ given by the limiting curve of no-transparency condition $0 = \vec{n} \cdot \vec{E}$. Therefore, after a few simple steps we obtain a prescription for this curve

$$v_{\text{limit}}(u, i) = -\arctan(2 \sin u \tan i) + \pi. \qquad (\text{B4})$$

Lastly, we also have to account for self-obscuration of the reflected rays by the opposite side of the torus, closer to the observer (the scenario for highly inclined observers). To find the torus terminator, we define a grazing vector $\vec{G}$ that begins at $\vec{X}_1 = (x_1, y_1, z_1)$ at the opposite half-space from the observer given by $\pi \le u \le 2\pi$ and some $v_{\text{self-obs}}$ per each $u$. The grazing vector points in the $\vec{E}$ direction towards the observer and ends at a point $\vec{X}_2 = (x_2, y_2, z_2)$ tangential to the torus surface, i.e. defined by $v_{\text{limit}}$ for unknown $0 \le u_t \le \pi$. Thus, parametrically for $\vec{X}_1 + t\vec{E} = \vec{X}_2$ we write

$$ \begin{aligned} (R + r \cos v_{\text{self-obs}}) \cos u + t E_1 &= (R + r \cos v_{\text{limit}}) \cos u_t \\ (R + r \cos v_{\text{self-obs}}) \sin u + t E_2 &= (R + r \cos v_{\text{limit}}) \sin u_t \\ r \sin v_{\text{self-obs}} + t E_3 &= r \sin v_{\text{limit}}. \end{aligned} \qquad (\text{B5}) $$

Therefore, $v_{\text{self-obs}}(u, i)$ is found when we search for a solution $\{v_{\text{self-obs}}, t, u_t\}$ of a set of equations

$$ \begin{aligned} 0 &= (R + r \cos v_{\text{self-obs}}) \cos u - (R + r \cos v_{\text{limit}}(u_t, i)) \cos u_t \\ 0 &= (R + r \cos v_{\text{self-obs}}) \sin u + t \sin i - (R + r \cos v_{\text{limit}}(u_t, i)) \sin u_t \\ 0 &= r \sin v_{\text{self-obs}} + t \cos i - r \sin v_{\text{limit}}(u_t, i). \end{aligned} \qquad (\text{B6}) $$

The acquisition of the curve shown in Fig. A1 is straightforward from here. When increasing the half-opening angle $\Theta$ from 0 for a given $i$, the first observable point from the reflecting area will be located at $u = 3\pi/2 = u_t + \pi$ (in the direction away from the observer) at $v_{\text{self-obs}}(3\pi/2, i) = \pi - \Theta_{\text{limit}}$ (when crossing the upper shadow boundary). The set of equations (B6) then reduces to

$$ \begin{aligned} 0 &= \cos \Theta_{\text{limit}} + \tan i (\sin v_{\text{limit}}(\pi/2, i) - \sin \Theta_{\text{limit}}) \\ &\quad - \frac{2}{\cos \Theta_{\text{limit}}} - \cos v_{\text{limit}}(\pi/2, i), \end{aligned} \qquad (\text{B7}) $$
where

$$v_{\text{limit}}(\pi/2, i) = -\arctan(2 \tan i) + \pi. \qquad \text{(B8)}$$

The function $\Theta_{\text{limit}}(i)$ can be evaluated numerically from here and tabulated.

Each local scattering surface in the user-defined grid is given by boundaries $v_1(u, v)$, $v_2(u, v)$, $u_1(u, v)$, $u_2(u, v)$ that are defined in linear binning via $N_v$ and $2N_u$ points (the number of bins in $u$ covers only the $[\pi/2, 3\pi/2]$ interval, because the other half is symmetrically added). Or the local surface is set to zero, if the central bin point $\{u, v\}$ does not fall within the restricting boundary conditions above, which is a good approximation for sufficiently high resolution. We then approximate the contributing local scattering surfaces by a tangent rectangle and compute its area:

$$A_{u,v} = \int_{u_1}^{u_2} \int_{v_1}^{v_2} r(R + r \cos v) dv du \\ \approx r(R + r \cos v)(v_2 - v_1)(u_2 - u_1). \qquad \text{(B9)}$$

At each $\{u, v\}$ we perform a tri-linear interpolation in $\mu_i$, $\mu_e$, and $\Phi_e$ of the tabular Stokes parameters $I$, $Q$, and $U$, commonly denoted as $\tilde{S}(\mu_i, \mu_e, \Phi_e; E, \Gamma, p_0, \Psi_0)$, in order to obtain $\tilde{\bar{S}}_{u,v}(\mu_i(u, v), \mu_e(u, v), \Phi_e(u, v); E, \Gamma, p_0, \Psi_0)$. The Stokes parameters stored in the tables from Podgorný et al. (2022) also depend on energy $E$, power-law index $\Gamma$ and primary polarization state ($p_0, \Psi_0$), but in the current version we require the exact stored values to be requested for the final ASCII files in TORUS_INTEGRATOR, in order not to interpolate further in these for computational efficiency.

The polarization vector of the interpolated reflected rays is in addition rotated from the local frame to the global frame. In global coordinates, the Stokes parameters are set with respect to the torus axis of symmetry. The incident electric vector orientation does not have to be rotated to conform to the polarization definition in the local frame due to the axial symmetry of the entire torus surface and emission placed in the central point (see Appendix A). It holds that the polarization fraction after the rotation $p_1$ is equal to the $p_0$ in the local reflection frame, and similarly for the intensity: $I_1 = I_0$. Thus, for the remaining Stokes parameters we compute $Q_1 = \sqrt{Q_0^2 + U_0^2} \cos(2\Psi_1)$ and $U_1 = \sqrt{Q_0^2 + U_0^2} \sin(2\Psi_1)$. In order to obtain the $\Psi_1(\Psi_0)$ function we will use Definition (1). See Fig. B1 (right) for a schematic drawing of the angles and vectors in the polarization plane. We define $\Psi_0$ with respect to the projected normal $\vec{n}_p = \vec{n} - (\vec{n} \cdot \vec{E})\vec{E}$ and $\Psi_1$ with respect to the projected global axis of symmetry $\vec{z}_p = \vec{z}_e - (\vec{z}_e \cdot \vec{E})\vec{E}$. Then $\vec{e}_y = \vec{E} \times \frac{\vec{n}_p}{|\vec{n}_p|}$, $\vec{e}_x = \frac{\vec{n}_p}{|\vec{n}_p|}$, and $\vec{e}_z = \vec{E}$ are the base vectors in the polarization plane and the polarization vector is locally given by $\vec{w}_{\text{loc}} = (\cos \Psi_0, \sin \Psi_0, 0)$. The conditions $\cos \Psi_0 = \vec{e}_x \cdot \vec{w}$, $\cos \Psi_0 = \sin \Psi_0 = \vec{e}_y \cdot \vec{w}$, and $\vec{w} \cdot \vec{E} = 0$ give

$$\vec{w}_{\text{loc}} = (\vec{e}_x, \vec{e}_y, \vec{e}_z) \cdot \vec{w} \equiv \beta \cdot \vec{w}. \qquad \text{(B10)}$$

Hence, we need to invert this matrix equation to obtain $\vec{w} = \beta^{-1} \cdot \vec{w}_{\text{loc}}$, in order to also calculate $\vec{w}_k = -\vec{E} \times \vec{w}$. Then

$$\Psi_1 = \begin{cases} \arccos\left(\frac{\vec{z}_p \cdot \vec{w}}{|\vec{z}_p||\vec{w}|}\right), & \text{if } \arccos\left(\frac{\vec{z}_p \cdot \vec{w}_k}{|\vec{z}_p||\vec{w}_k|}\right) \le \frac{\pi}{2} \\ -\arccos\left(\frac{\vec{z}_p \cdot \vec{w}}{|\vec{z}_p||\vec{w}|}\right), & \text{if } \arccos\left(\frac{\vec{z}_p \cdot \vec{w}_k}{|\vec{z}_p||\vec{w}_k|}\right) > \frac{\pi}{2} \end{cases} \qquad \text{(B11)}$$

We finish by numerically integrating the Stokes parameters from locally tangent planes projected to the line of sight across all $\{u, v\}$

that fulfil the aforementioned shadow and visibility conditions:

$$\tilde{\bar{S}}_{\text{tot}}(i, \Theta, p_0, \Psi_0, \Gamma, E) = K \sum_{u,v} A_{u,v} \mu_e(u, v) \mu_i(u, v) \frac{1}{\Theta(u, v)^2} \tilde{\bar{S}}_{u,v} \qquad \text{(B12)}$$

with weighting according to the locally illuminating flux dependent on distance from the center $\rho(u, v)$ as $\sim \frac{1}{e^{(u,v)/3}}$. Because of the weighting with $\rho(u, v)$ that scales linearly with $r_{\text{in}}$, the results are independent of $r_{\text{in}}$. In our approximation, we take for all surface points the most neutral version of the local reflection tables and the ionization parameter is not dependent on the local flux received. The output $\tilde{\bar{S}}_{\text{tot}}$ is renormalized via $K$ constant for storage convenience. We save the results in a user-defined directory in the ASCII file format. Such $\tilde{\bar{S}}_{\text{tot}}$ tables, if converted to FITS, are then ready to be used inside XSSTOKES_TORUS for any incident polarization, following equation (A2).

## APPENDIX C: NUMERICAL IMPLEMENTATION OF THE DISC REFLECTION

In this section, we provide details on the computations that lead to the physical model of reflection on a distant accretion disc, described in Section 2.2. We first created an ASCII version of the most neutral part of the disc reflection tables from Podgorný et al. (2022) that store the original tables uniformly added in all $\Phi_e$ and $0 \le \mu_i = \cos \delta_i \le M_i$ for three independent incident polarization states and nine linearly spaced values of $M_i \in [0.2; 1]$. Then they were converted to FITS using the XSPEC TABLE MODEL GENERATOR. We preserved the energy binning and dependency on $\mu_e = \cos(i)$ and $\Gamma$. These constitute the XSPEC fitting parameters in the follow-up XSSTOKES_DISC C routine, alongside polarization. This routine operates on the same basis as the XSSTOKES_TORUS routine and requires the aforementioned FITS tables as dependencies. It interpolates for arbitrary incident polarization $p_0$ and $\Psi_0$ through equation (A2) from three precomputed tables in independent incident polarization states. It is possible to adjust the final Stokes parameters $Q_{\text{tot}}$ and $U_{\text{tot}}$ by setting a global system orientation $\Delta\Psi$ with respect to the disc normal. Table A1 (bottom) summarizes the resulting model parameters available for data fitting at once.

## APPENDIX D: THE EFFECT OF CHANGING PRIMARY POLARIZATION

Theoretical models of X-ray reflection in accreting systems are often assuming unpolarized source of irradiation, which is not supported by theoretical studies of Comptonization in coronae (e.g. Poutanen et al. 2018; Krawczynski et al. 2022), nor by the recent IXPE observations (Krawczynski & Beheshtipour 2022; Gianolli et al. 2023; Veledina et al. 2023b). Thus, here we provide an overview of the effect of changing incident polarization in axially symmetric reflectors, where we can use equation (A2) (or any other variant of it for different basis) that decomposes the signal into the basis of three independent incident polarization states. Such investigations are useful for predictions of the change of resulting polarization in an existing reflection model that uses unpolarized irradiation, given that the incident polarization changes by $p_0$.

Let us denote the total (integrated) Stokes vector for particular incident polarization states as $\tilde{\bar{S}}_{\text{tot}}(0, -) \equiv \tilde{\bar{S}}_U$, $\tilde{\bar{S}}_{\text{tot}}(1, \pi/2) \equiv \tilde{\bar{S}}_\perp$, and $\tilde{\bar{S}}_{\text{tot}}(1, \pi/4) \equiv \tilde{\bar{S}}_\times$. Then combining equations (1) and
<figure><img src="image_18.png" /><figcaption>**Figure D1.** Comparison of the dependency of resulting polarization on incident polarization for the energy-independent single-scattering Chandrasekhar formulae integrated in the torus (top) and disc (bottom) geometries used in the XSSTOKES model variants presented in this paper. From left to right we compare different values of Θ (the torus half-opening angle) and Mᵢ (the disc illumination range) for the two reflection geometries, respectively. The results are shown for various observer's inclinations in the colour code, which is another geometrical parameter that affects the net polarization response to incident polarization change. We plot the difference between the actual resulting polarization and the obtained polarization for unpolarized primary, p - pᵢ, versus the polarization p₀ of the incident radiation, which is allowed to be either aligned with the rotation axis (positive) or orthogonal to it (negative). The solid lines are showing the exact result, the dashed lines represent linear approximation valid for small p₀, obtained from equation (D4). The results for high Θ of the torus approach the results for small Mᵢ for the disc, as the scattering geometries become equivalent. The curves for high inclinations and small Θ for the torus are not shown, because the reflecting area is fully hidden, given the model geometrical setup.</figcaption></figure>

(A2) we have for the resulting total linear polarization degree:

$$
\begin{align}
p &= \frac{\sqrt{Q_{\text{tot}}^2 + U_{\text{tot}}^2}}{I_{\text{tot}}} \nonumber \\
  &= \left\{ \left\{ \frac{Q_{\text{U}} + p_0[(Q_{\text{U}} - Q_{\perp}) \cos 2\Psi_0 + (Q_{\times} - Q_{\text{U}}) \sin 2\Psi_0]}{I_{\text{U}} + p_0[(I_{\text{U}} - I_{\perp}) \cos 2\Psi_0 + (I_{\times} - I_{\text{U}}) \sin 2\Psi_0]} \right\}^2 \right. \nonumber \\
  &\qquad \left. + \left\{ \frac{U_{\text{U}} + p_0[(U_{\text{U}} - U_{\perp}) \cos 2\Psi_0 + (U_{\times} - U_{\text{U}}) \sin 2\Psi_0]}{I_{\text{U}} + p_0[(I_{\text{U}} - I_{\perp}) \cos 2\Psi_0 + (I_{\times} - I_{\text{U}}) \sin 2\Psi_0]} \right\}^{\frac{1}{2}} \right\}. \tag{D1}
\end{align}
$$

Assuming that $p_0$ is small to the linear order, this reduces to

$$
\begin{align}
p &= \frac{\sqrt{Q_U^2 + U_U^2}}{I_U} + p_0 \left[ \cos 2\Psi_0 \left( \frac{I_\perp \sqrt{Q_U^2 + U_U^2}}{I_U^2} - \frac{Q_U Q_\perp + U_\perp U_U}{I_U \sqrt{Q_U^2 + U_U^2}} \right) \right. \nonumber \\
  &\qquad \left. + \sin 2\Psi_0 \left( \frac{Q_U Q_\times + U_\times U_U}{I_U \sqrt{Q_U^2 + U_U^2}} - \frac{I_\times \sqrt{Q_U^2 + U_U^2}}{I_U^2} \right) \right] + o(p_0^2) \tag{D2} \\
\approx{}& p_U + p_0 \left[ \cos 2\Psi_0 \left( \frac{I_\perp p_U}{I_U} - \frac{Q_U Q_\perp + U_\perp U_U}{p_U I_U^2} \right) \right. \nonumber \\
  &\qquad \left. + \sin 2\Psi_0 \left( \frac{Q_U Q_\times + U_\times U_U}{p_U I_U^2} - \frac{I_\times p_U}{I_U} \right) \right]. \nonumber
\end{align}
$$

where we used $p_U \equiv \sqrt{Q_U^2 + U_U^2}/I_U$ for the emergent polarization for unpolarized primary radiation. Due to sym-

metry, we may further assume $U_U = U_\perp = U_\times = 0$. Denoting also $p_\perp \equiv Q_\perp/I_\perp$ and $p_\times \equiv Q_\times/I_\times$, one arrives at a simple decomposition of the total polarization degree:

$$
p = p_U + p_0 \left[ \cos 2\Psi_0 \frac{I_\perp}{I_U} (p_U - p_\perp) + \sin 2\Psi_0 \frac{I_\times}{I_U} (p_\times - p_U) \right] \quad (D3)
$$

The resulting total polarization direction $\Psi$ is given by the sign of $Q_{\text{tot}}$, which is mainly driven by $Q_U$ computed for unpolarized primary.

If we expect the primary polarization direction $\Psi_0$ to be only 0 or $\pi/2$ (e.g. neglecting relativistic effects), we may use the notation for positive or negative polarization degree, respectively, and further reduce the expression:

$$
p = p_U + p_0 \frac{I_\perp}{I_U} (p_U - p_\perp). \qquad (D4)
$$

Only two components are needed to estimate the resulting polarization degree for small $p_0$: the result for unpolarized primary and 100 per cent perpendicularly polarized primary in our case. These are to be precomputed either analytically or numerically for a particular reflection geometry.

Fig. D1 shows the full dependencies of $p - p_U$ on $p_0$ computed with XSSTOKES for the geometries assumed in this paper and using
the energy-independent Chandrasekhar's single-scattering formulae for local reflection for simplicity. We also show the estimate for small $p_0$, using equation (D4). It holds that $(p_U - p_\perp) \in [-2; 2]$, but only for specific cases $\frac{l_\perp}{l_U} \approx 1$, while usually $0.5 \lesssim \frac{l_\perp}{l_U} \lesssim 2$. The overall factor $k = \frac{l_\perp}{l_U}(p_U - p_\perp)$ is $0 \lesssim k \lesssim 1$, which means that for small $p_0$, we may conclude that a smaller fraction of this primary polarization $p_0$ is typically added or subtracted (following its sign) to the result for $p_U$ computed for unpolarized primary. If one releases the assumption of parallelly/perpendicularly oriented

primary polarization direction with respect to the rotation axis, the deviation of the net result $p - p_U$ by $k \cdot p_0$ is modulated by the $\cos 2\Psi_0$ and $\sin 2\Psi_0$ functions, according to equation (D3). Even when the parallelly/perpendicularly polarized primary assumption is in place, the difference $p - p_U$ is not symmetric with respect to $p_0 = 0$ for larger $p_0$, i.e. the obtained full functions on Fig. D1 are not odd.

This paper has been typeset from a *TEX/LA*TEX file prepared by the author.