# Field-level inference of galaxy intrinsic alignment from the SDSS-III BOSS survey

Eleni Tsaprazi, Nhat-Minh Nguyen, Jens Jasche, Fabian Schmidt, Guilhem Lavaux

► To cite this version:

Eleni Tsaprazi, Nhat-Minh Nguyen, Jens Jasche, Fabian Schmidt, Guilhem Lavaux. Field-level in-ference of galaxy intrinsic alignment from the SDSS-III BOSS survey. Journal of Cosmology and Astroparticle Physics, 2022, 08 (08), pp.003. 10.1088/1475-7516/2022/08/003 . hal-03500410

HAL Id: hal-03500410

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

Submitted on 31 Jul 2025

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
PAPER • OPEN ACCESS

# Field-level inference of galaxy intrinsic alignment from the SDSS-III BOSS survey

To cite this article: Eleni Tsaprazi et al JCAP08(2022)003

View the [article online](#) for updates and enhancements.

You may also like

- Imprint of inflation on galaxy shape correlations

Fabian Schmidt, Nora Elisa Chisari and
Cora Dvorkin

- DISCOVERING BRIGHT QUASARS AT INTERMEDIATE REDSHIFTS BASED ON OPTICAL/NEAR-INFRARED COLORS

Xue-Bing Wu, Wenwen Zuo, Jinyi Yang et al.

- An EFT description of galaxy intrinsic alignments

Zvonimir Vlah, Nora Elisa Chisari and
Fabian Schmidt
# Field-level inference of galaxy intrinsic alignment from the SDSS-III BOSS survey

Eleni Tsaprazi,ª Nhat-Minh Nguyen,ᵇ Jens Jasche,ª,ᶜ
Fabian Schmidtᵇ and Guilhem Lavauxᶜ

ªThe Oskar Klein Centre, Department of Physics, Stockholm University, Albanova University Center, SE 106 91 Stockholm, Sweden

ᵇMax-Planck-Institut für Astrophysik, Karl-Schwarzschild-Straße 1, D-85748 Garching, Germany

ᶜSorbonne Université, CNRS, UMR 7095, Institut d'Astrophysique de Paris, 98 bis bd Arago, 75014 Paris, France

E-mail: eleni.tsaprazi@fysik.su.se, minh@mpa-garching.mpg.de, jens.jasche@fysik.su.se, fabians@mpa-garching.mpg.de, guilhem.lavaux@iap.fr

Received December 11, 2021

Revised April 27, 2022

Accepted June 28, 2022

Published August 5, 2022

**Abstract.** As a large-scale overdensity collapses, it affects the orientation and shape of galaxies that form, by exerting tidal shear along their axes. Therefore, the shapes of elliptical galaxies align with the tidal field of cosmic structures. This intrinsic alignment provides insights into galaxy formation and the primordial universe, complements late-time cosmological probes and constitutes a significant systematic effect for weak gravitational lensing observations. In the present study, we provide constraints on the linear alignment model using a fully Bayesian field-level approach, using galaxy shape measurements from the SDSS-III BOSS LOWZ sample and three-dimensional tidal fields constrained with the LOWZ and CMASS galaxy samples of the SDSS-III BOSS survey. We find 4σ evidence of intrinsic alignment, with an amplitude of $A_I = 2.9 \pm 0.7$ at 20 Mpc.

**Keywords:** cosmic web, galaxy evolution, galaxy formation, weak gravitational lensing

**ArXiv ePrint:** 2112.04484

<figure><img src="image_2.png" /></figure>
# Contents

<table><tr><td>1</td><td>Introduction</td><td>1</td></tr><tr><td>2</td><td>The linear intrinsic alignment model</td><td>3</td></tr><tr><td>3</td><td>The data model</td><td>4</td></tr><tr><td>4</td><td>Data</td><td>5</td></tr><tr><td>4.1</td><td>The large-scale tidal shear</td><td>5</td></tr><tr><td>4.2</td><td>Galaxy shapes</td><td>6</td></tr><tr><td>5</td><td>The intrinsic alignment posterior</td><td>6</td></tr><tr><td>6</td><td>Results</td><td>9</td></tr><tr><td>7</td><td>Discussion and conclusions</td><td>12</td></tr><tr><td>A</td><td>Smoothing correction of the linear alignment amplitude</td><td>15</td></tr><tr><td>B</td><td>Posterior derivation</td><td>17</td></tr><tr><td>C</td><td>Validation tests</td><td>18</td></tr><tr><td>C.1</td><td>Mock data test</td><td>19</td></tr><tr><td>C.2</td><td>Gelman-Rubin test</td><td>19</td></tr><tr><td>C.3</td><td>Posterior moments</td><td>20</td></tr><tr><td>C.4</td><td>Sensitivity to prior</td><td>21</td></tr><tr><td>C.5</td><td>Posterior predictive check</td><td>21</td></tr></table>

## 1 Introduction

Galaxy formation typically follows the gravitational collapse of large-scale overdensities. During the collapse, gravitational tidal forces lead to anisotropies in the shape and orientation of galaxies. Therefore, the shape and orientation of galaxies carries information on the tidal field at their location and over the course of their formation history. Growing evidence over the last two decades suggests that the intrinsic orientation of elliptical galaxies is indeed subject to a large-scale coherent alignment, often referred to as *intrinsic alignment* (e.g. [1–7]). This large-scale correlation is attributed to the alignment of galaxy shapes for pressure-supported elliptical galaxies (tidal stretching) and that of angular momenta in rotation-supported, spiral galaxies (tidal torquing) with the large-scale tidal shear (e.g. [3, 8, 9]). As weak lensing analyses infer the total projected mass from projected galaxy shapes, intrinsic shape alignments can interfere with weak lensing measurements, which are based on the assumption that intrinsic galaxy shapes are uncorrelated. It is now widely recognized that intrinsic alignment is a non-negligible source of contamination for weak lensing surveys. Intrinsic alignment contamination can strongly bias cosmological conclusions drawn from weak lensing observations
(e.g. [10]). Therefore, mitigating it is necessary. This statement applies to existing as well as future surveys, like the Kilo-Degree Survey, Dark Energy Survey, Hyper-Suprime Cam, Euclid, the Legacy Survey of Space and Time and the Square Kilometer Array [11–16]. Further, intrinsic alignment is a probe of specific types of primordial non-Gaussianity [10, 17–19], redshift-space distortions, Baryon Acoustic Oscillations [20] and the stochastic gravitational wave background [21, 22].

The evolution of intrinsic alignment in time can constrain the response of galaxy shapes to external tidal fields. While galaxy shapes are nonlinear functions of their environment and tidal shear (e.g. [23–28]), a first-order expansion leads to the linear alignment model which is expected to be valid on large scales [8, 29, 30]; specifically, scales larger than the Lagrangian radius of galaxy host halos and the scale where large-scale structure becomes nonlinear, i.e. $R \gtrsim 20–30h^{-1}$ Mpc [31, 32].

The linear alignment model has been extensively applied to observational analyses. Past works have found significant correlations of intrinsic galaxy shapes on scales up to $60h^{-1}$ Mpc [2–6]. Potential luminosity evolution of linear alignment is a topic of active research (e.g. [6, 33]), which suggests a trend of stronger alignments for brighter galaxies. Linear alignment is also found to be stronger for redder galaxies than bluer ones, but relatively constant within red samples (e.g. [4, 6, 34–37]). This trend has also been observed in a range of intrinsic alignment models in recent analyses (e.g. [38]).

Previous studies constrained intrinsic alignment models by compressing galaxy shape catalogs to shape-shape and shape-position correlations (e.g. [4–6]). In this paper, we instead propose a field-level approach. We infer the linear alignment amplitude directly from the cross-correlation of luminous red galaxy shapes in the LOWZ sample of the SDSS-III BOSS DR11 survey with the local, large-scale tidal shear at the location of each galaxy.

First, we obtain our tidal shear estimates from an ensemble of dark matter density fields, constrained with SDSS-III BOSS galaxy data using the BORG algorithm [39–43]. Then, we cross-correlate these estimates with the observed galaxy shapes and constrain the linear alignment model on scales of $\ge 15.6h^{-1}$ Mpc, within the redshift range of $0.21 < z < 0.36$. The lower limit is the resolution of the density fields in our study. By construction, the BORG density resimulations incorporate the full statistics of the large-scale structure, while accounting for uncertainties in the galaxy data. In the present study, we use the LOWZ galaxy ellipticity catalog of the SDSS-III BOSS DR11 survey [6, 44–49]. As our analysis involves the tidal field at mildly nonlinear scales and the latter was evolved using 2LPT, the expression “linear alignment” that is used here, typically corresponds in the literature to the “nonlinear alignment (NLA) model”.

Throughout our analysis, we assume $H_0 = 67.74 \text{ km s}^{-1} \text{ Mpc}^{-1}$, $\Omega_m = 0.2889$, $\Omega_b = 0.048597$, $\Omega_r = 0$, $\Omega_k = 0$, $\Omega_\Lambda = 0.7111$, $w = -1$, $n_s = 0.9667$, $\sigma_8 = 0.8159$, consistent with the parameters assumed in the density field inference [42]. The paper is structured as follows. In section 2, we review the linear alignment model and describe how we relate our constrained tidal field to the linear alignment prediction. In section 3, we present our data model for galaxy shapes. In section 4, we describe the large-scale dark matter density, tidal field and shape data. In section 5, we describe our Bayesian inference framework and our method to sample from the posterior of the alignment amplitude. In section 6 and section 7, we report and discuss our results, respectively.
## 2 The linear intrinsic alignment model

Elliptical galaxies can be stretched or squeezed under the influence of external tidal fields (e.g. [29]). According to the linear alignment model, this contribution to galaxy shapes is linearly proportional to the tidal field at the location of galaxies. Here, we determine the linear alignment amplitude by correlating measured components of galaxy shapes (ellipticities), $e^I$, and the local gravitational tidal shear tensor

$$T_{ij} \equiv \frac{\partial^2 \Phi}{\partial x_i \partial x_j}, \qquad (2.1)$$

where {$x_i : i \in \{1, 2, 3\}$} are comoving Cartesian coordinates and $\Phi$ the gravitational potential. Galaxy ellipticities are two-dimensional, while the tidal tensor is three-dimensional. In what follows, three-dimensional spatial vectors are denoted by $\mathbf{x}$. We label galaxies and tidal tensor samples using the subscripts $g$ and $s$, respectively. $\langle X \rangle$ denotes an ensemble average of $X$ over tidal tensor samples, while $\bar{X}$ denotes a spatial average. Curly brackets indicate ensemble over the bracketed quantity's index. We therefore project the latter, at the location of each galaxy, onto a two-dimensional surface perpendicular to the line of sight, $\hat{\mathbf{n}}$. We select an orthonormal basis $(\hat{\mathbf{n}}, \hat{\theta}, \hat{\varphi})$ such that

$$\hat{\theta} = \cos \theta \cos \varphi \hat{\mathbf{x}} + \cos \theta \sin \varphi \hat{\mathbf{y}} - \sin \theta \hat{\mathbf{z}}, \qquad (2.2)$$

$$\hat{\varphi} = -\sin \varphi \hat{\mathbf{x}} + \cos \varphi \hat{\mathbf{y}}, \qquad (2.3)$$

with $(\hat{\mathbf{x}}, \hat{\mathbf{y}}, \hat{\mathbf{z}})$ being the orthonormal basis of the Cartesian coordinates, $\theta$ the declination and $\varphi$ the right ascension of the galaxy. We then decompose the local tidal tensor into [17, 50]

$$T_{\pm} = \sum_{i=1}^{3} \sum_{j=1}^{3} m_{\pm}^{i} m_{\mp}^{j} T_{ij}, \qquad (2.4)$$

where $T_{\pm} \equiv T_1 \pm iT_2$ are complex spin-±2 fields. Under a rotation by $\psi$ around the line of sight $\hat{\mathbf{n}}$, the two fields $T_{\pm}$ transform as $T'_{\pm}(\hat{\mathbf{n}}) \to T'_{\pm}(\hat{\mathbf{n}}) = e^{i2\psi}m_{\pm}(\hat{\mathbf{n}})$ and $m_{\pm}^i \equiv \hat{\varphi}^i \mp i\hat{\theta}^i/\sqrt{2}$, $i$ being the imaginary unit $\sqrt{-1} \equiv i$. The two fields $m_{\pm}$ transform as spin-±1 fields, i.e. $m'_{\pm}(\hat{\mathbf{n}}) \to m'_{\pm}(\hat{\mathbf{n}}) = e^{i\psi}m_{\pm}(\hat{\mathbf{n}})$. The resulting quantities $T_{\pm}$ are the components of the trace-free part of $T_{ij}$ projected on the plane that is perpendicular to the line of sight to each galaxy. In the ellipticity catalog that we use, $e_1^{\text{obs}}$ and $e_2^{\text{obs}}$ are defined as ellipticity components along the right ascension $\hat{\varphi}$ and declination $\hat{\theta}$ respectively, such that positive $e_1^{\text{obs}}$ correspond to east - west elongation and positive $e_2^{\text{obs}}$ to northeast - southwest elongation [44]. We adopt the same convention. Upon the decomposition, we end up with projected tidal fields at the locations of galaxies, which are different for every tidal field realization.

Due to the correlation length of the tidal field, the linear alignment signal can persist up to scales much larger than those relevant to galaxy formation. In order to probe linear alignment on a range of scales, we estimate the smoothed tidal tensor from the dark matter density contrast, $\delta$, in Fourier representation for different smoothing scales, $R$, through the Poisson equation

$$T_{ij}(\mathbf{k}, R, z) = \frac{4\pi G \rho_{\text{cr}} \Omega_{m,0}}{a(z)} \left[ \frac{k_i k_j}{|\mathbf{k}|^2} W_{\text{SK}}(\mathbf{k}, R) \delta(\mathbf{k}, z) \right], \qquad (2.5)$$
where $\mathbf{k}$ is the wavevector, $\rho_{cr}$ the critical density of the Universe, $\Omega_{m,0}$ the matter density parameter today, $a = 1$ the cosmic scale factor and $z$ the redshift of each galaxy. $W_{SK}$ represents the tophat filter with which we choose to smooth the density field and is given by

$$W_{SK}(\mathbf{k}, R) = \begin{cases} 1 & \text{if } |\mathbf{k}| \le 1/R \\ 0 & \text{otherwise.} \end{cases} \qquad (2.6)$$

We will refer to this filter as ‘sharp-k’, derived from a sharp cut of Fourier modes whose magnitudes are above the cut-off $1/R$. We use it to prevent the contamination of a given scale with information from smaller scales, where unmodeled nonlinear processes could bias our signal. By additionally filtering the tidal field with the sharp-k filter, we obtain estimates of the tidal field that retain information above the cut-off scale $R$.

Then, the ellipticity of a galaxy $e^I$ at position $\mathbf{x}$ can be written as a function of the tidal field

$$e_1^I \pm i e_2^I = -\frac{C}{4\pi G} T_{\pm}, \qquad (2.7)$$

where $e_1^I, e_2^I$ denote ellipticities measured along the galaxies’ right ascension and declination. $G$ is the gravitational constant and $C$ the linear alignment amplitude. We note that in our normalization convention the intrinsic alignment amplitude is taken to be at the time of observation. In the flat-sky limit and fixing the line of sight to the $z$ axis, equation (2.7) reduces to the relation

$$e^I = [e_1^I, e_2^I] = -\frac{C}{4\pi G} [\partial_x^2 - \partial_y^2, 2\partial_x\partial_y] \Phi(\mathbf{x}). \qquad (2.8)$$

### 3 The data model

The observed galaxy ellipticities, $e_\alpha^{\text{obs}}$, receive contributions from processes other than linear alignment, which at lowest order are additive:

$$e_{\alpha}^{\text{obs}} = e_{\alpha}^{I} + \epsilon_{\alpha}^{\text{msm}} + \epsilon_{\alpha}^{\text{WL}} + \epsilon_{\alpha}^{\text{rnd}}, \qquad (3.1)$$

where $\alpha \in \{1, 2\}$ is the index for the two ellipticity components, $\epsilon^{\text{msm}}$ is the shape measurement error and $\epsilon^{\text{WL}}$ is due to weak lensing from foreground matter. The median redshift of our sample is $\sim 0.3$. The expected contribution from weak lensing to the observed ellipticity is $\langle (\epsilon^{\text{WL}})^2 \rangle \lesssim 10^{-4}$ (e.g. [51]). Therefore, the typical lensing contribution to the ellipticity components is less than $\sim 0.01$, whereas the mean standard deviation of the intrinsic alignment contribution to galaxy shapes in our inference is $\sim 0.07$. We therefore choose to ignore the weak lensing contribution. When applying this method to higher-redshift sources, lensing could be accounted for by integrating the inferred matter distribution in the inference along the line of sight to each galaxy. $\epsilon^{\text{rnd}}$ is a stochastic contribution to galaxy shapes, which captures small-scale physical alignment processes that are not considered in the linear alignment model.

Estimating the random noise as the standard deviation of $e^{\text{obs}}$, we find that $\epsilon^{\text{rnd}}$ is at least one order of magnitude larger than the shape measurement uncertainties. We therefore assume that the total ellipticity uncertainty is dominated by random noise, leading to a variance that is universal across our galaxy sample. Our single-galaxy data model then reads

$$e_{\alpha}^{\text{obs}} = -\frac{C(R)}{4\pi G} T_{\pm}(R) + \epsilon_{\alpha}^{\text{rnd}}(R), \qquad (3.2)$$
where $R$ is the scale of the smoothed tidal field and $\epsilon_{\alpha}^{\text{rnd}}$ is drawn from a Gaussian distribution with a variance that only depends on $R$. We assume that the random component is uncorrelated between different galaxies. To simplify notations, we will refer to $C$ as the amplitude at a given smoothing scale. Our smoothing of the tidal field $T_{\pm}$ implies that the random noise component $\epsilon^{\text{rnd}}$ becomes scale-dependent. We also expect this scale dependence to arise from small-scale physics, which would bias our inference non-trivially on scales smaller than the original resolution of the tidal fields.

While galaxy shapes are measured at the scale of a single galaxy, we smooth the tidal fields derived from the inferences at a larger scale. This introduces an unphysical scale dependence to the linear alignment amplitude when the smoothing scale $R$ is not much larger than the inference resolution. In order to compare our results for the amplitude of the linear alignment to previous literature results, we correct $C(R)$ for the smoothing kernel which is implicitly introduced in the original inference. We describe our corrections in appendix A.

# 4 Data

In this section, we describe the datasets that enter the right- and left-hand side of our data model in equation (3.2). Those include, respectively the tidal field components $T_{\pm}(R)$ (section 4.1) for the right-hand side and the observed galaxy shapes $e_{\alpha}^{\text{obs}}$ (section 4.2) for the left-hand side.

## 4.1 The large-scale tidal shear

In order to derive the $T_{\pm}(R)$ components of the tidal field at the location of each galaxy, as seen from Equations (2.4)–(2.5), we need the dark matter density field, $\delta(k)$. In this work, the latter is supplied by the density resimulations of the SDSS-III BOSS volume with a gravity-only model. The resimulation is based on an inference of initial conditions constrained with the SDSS-III LOWZ and CMASS galaxy data [42, 48] by the BORG algorithm [39–43]. We choose to include neither light-cone effects nor redshift-space distortions, as these effects would significantly complicate the conversion from density to rest-frame tidal field. Given the narrow redshift range of the volume used here, light-cone effects are expected to be negligible. Neglecting the displacement into redshift space will have an impact on comoving scales comparable to the typical displacement, which is less than $20h^{-1}$ Mpc, while we will focus on scales $R \gtrsim 20h^{-1}$ Mpc below.

BORG performs a Bayesian inference of the initial conditions within a given region of the observed universe, constrained by galaxy observations and survey characteristics. To achieve this task, it assumes a model of structure formation and galaxy bias. The former is used to evolve initial conditions in time. The latter allows BORG to compare the present-day density fields with the galaxy observations. The density field posterior is approximated by Markov Chain Monte Carlo (MCMC) samples, which incorporate all observational uncertainties. This process results in statistically plausible samples of the present-day, three-dimensional dark matter density field, as traced by the input galaxy survey. The MCMC samples provide a full statistical description of the complex dark matter distribution.

Provided with the inferred initial conditions of the SDSS-III BOSS volume [42], we resimulate the present-day matter density field in comoving rest-frame using second-order Lagrangian Perturbation Theory. The resolution of the density and tidal fields is $\sim 15.6h^{-1}$ Mpc ($\sim 1^{\circ}$ at the median redshift of the ellipticity sample). The inference domain is a box of side length $L = 4000h^{-1}$ Mpc and grid resolution $N = 256$. In this study, we estimate the tidal
fields from 837 MCMC BORG density resimulations, separated by 10 MCMC steps, extracted from the original chain [42]. Our results are robust to the number of density field realizations used.

We use the tidal fields inferred at redshift $z = 0$. We multiply the projected ellipticity of each galaxy, $T_\pm$, by $B(z) = (1+z)D(z)$, $D(z)$ being the linear growth factor, according to equation (2.5), in order to account for the redshift dependence of the intrinsic alignment amplitude. We adopt the instantaneous alignment scenario (e.g. [32, 52]) to report our results and the primordial alignment scenario to compare them to the findings by [6]. We verify the validity of this step as follows. With the above procedure, we obtain, for a single tidal field realization, an intrinsic alignment amplitude of $2.3 \pm 0.6$. We then resimulate the tidal field for this realization using 2LPT to the median redshift of the sample, $z = 0.26$. We then derive the intrinsic alignment amplitude at $z = 0.26$ and find $2.3 \pm 0.6$. We thus confirm that $B(z)$ captures the redshift-dependence of the intrinsic alignment signal. This is expected, since on the scales probed, linear growth is a good approximation.

The dark matter density field, both in the BORG inference [42] and our resimulation, is convolved with a cloud-in-cell (CIC) kernel by construction, resulting in a resolution of $R_0 = 15.6h^{-1}$ Mpc. In order to probe the linear alignment amplitude on various scales, we smooth all tidal fields by convolving them with a sharp-k filter (cf. equation (2.5)). The smoothing scales that we consider are $R \le 120h^{-1}$ Mpc ($\le 8^\circ$ at the median redshift of the ellipticity sample). The resulting tidal field posterior consists of 837 tidal field realizations per smoothing scale. We then derive the projected components of the tidal shear at the location of a given galaxy from the smoothed tidal fields using the Nearest Grid Point (NGP) assignment scheme. We first transform each galaxy's equatorial coordinates and redshift to comoving Cartesian coordinates, $x_i$. We then convert the Cartesian coordinates to grid indices, $l_i$, ($i \in \{1, 2, 3\}$), as follows

$$l_i = \left\lfloor \frac{x_i}{R_0} + 0.5 \right\rfloor, \qquad (4.1)$$

where $\lfloor \rfloor$ represents the floor function.

## 4.2 Galaxy shapes

The galaxy shape data that we use is part of the original catalog constructed using the LOWZ sample of the SDSS-III BOSS survey [6, 44]. The sample consists of luminous red galaxies and covers the redshift range $0.16 < z < 0.36$. We apply a lower redshift cutoff at $z = 0.21$, corresponding to the lower redshift limit of the inference volume [42]. We remove galaxies outside the SDSS-III BOSS survey mask. We additionally remove galaxies outside of the LOWZ and CMASS footprints assumed by the BORG inference. Since the latter covers more sky area, some galaxies outside of the LOWZ footprint remain after the cut. Our resulting sample consists of 142 514 galaxies, with ellipticity components in the range $[-2, 2]$.

# 5 The intrinsic alignment posterior

In this section, we present our statistical framework for the linear alignment amplitude inference. Unless specified otherwise, we write $e^{\text{obs}}$ as $e$ for readability. The subscripts $g$ and $s$ denote the galaxy and tidal field sample indices, respectively. We omit these indices whenever we refer to the ensemble mean over the respective quantity. Recall that the reason for considering the tidal field sample indices is that the BORG algorithm provides an ensemble of
plausible realizations of the large-scale structure posterior. Our inference framework considers both ellipticity components jointly. We assume that all galaxy ellipticity measurements have the same variance, $\sigma^2$, dominated by random processes (see section 3). Note that the formulation below does not consider the smoothing correction, described in appendix A. The correction is applied later to the final linear alignment amplitude and variance posteriors.

We then write the likelihood for the observed galaxy shapes given a single realization of the tidal field, assuming that the random noise on the right-hand side of equation (3.2) is Gaussian-distributed, as

$$ \mathcal{P}(e|C, T_s, \sigma^2) = \prod_{g=1}^{2N_g} \frac{1}{\sqrt{2\pi}\sigma^2} \exp\left[-\frac{(e_g - CT_{g,s})^2}{2\sigma^2}\right]. \qquad (5.1) $$

Note that $e_g$ consists of both ellipticity components, which we assume to be affected by the same variance. Therefore, we treat $e_1$ and $e_2$ as independent measurements, and the product in equation (5.1) runs to $2N_g$, as every galaxy is associated with two ellipticity measurements. Further, notice the dependence of the intrinsic alignment amplitude on the tidal field realizations; this derives from the fact that every realization is a plausible tidal field sample given the SDSS-III BOSS survey.

The choice of a Gaussian likelihood for galaxy shapes is a strongly simplifying assumption. It is only accurate if galaxy intrinsic shapes are uncorrelated (apart from the intrinsic alignment contribution which is modeled explicitly) and if the effective number of galaxies entering the tidal alignment estimate is sufficiently large, i.e. if each $e_g$ here was actually estimated from a large sample of independent galaxy shapes. The first assumption is likely to be fairly accurate on the scales considered here. In order to estimate the effect of the latter assumption, consider the case where $T_{g,s}$ is approximately the same for all galaxies g. Then, we attempt to infer the mean shape $CT_{g,s}$ from a large set of noisy individual shapes. Equation (5.1) shows that the maximum-likelihood estimate of C is essentially the sample mean of $e_g$, divided by the constant $T_{g,s}$. This is unbiased in the large-$N_g$ limit as long as the $e_g$ are independent and identically distributed, even for a non-Gaussian distribution of $e_g$. In practice, $T_{g,s}$ is not constant, but varies from galaxy to galaxy (albeit slowly, since we filter $T_{g,s}$ on fairly large scales). However, this provides a qualitative justification for why we expect the galaxy shape likelihood not to bias our estimator significantly.

Our posterior predictive check (appendix C.5) indicates that this choice is likely suboptimal, due to the presence of heavy tails in the observed shape distribution. A naive application of the Gaussian likelihood, with a fixed variance $\sigma^2$ obtained from the standard deviation of the data distribution, is therefore sensitive to outliers (see also the discussion in section 4.3.2 of [44]). Here we mitigate this sensitivity by jointly inferring the variance (alongside with the linear alignment amplitude) — essentially allowing for a larger variance than that of the data distribution. Figure 8 shows that, indeed, the variance of our posterior is larger than that of the data distribution.

Assuming a uniform prior on the linear alignment amplitude, we derive the linear alignment amplitude posterior marginalized over the tidal field realizations (see appendix B, analogous to the derivation in [53])

$$ \mathcal{P}(C|e, \sigma^2) \propto \sum_{s=1}^{N_s} \frac{\lambda_s}{\sqrt{2\pi}\nu_s^2} \exp\left[-\frac{(C - \mu_s)^2}{2\nu_s^2}\right], \qquad (5.2) $$
which is a Gaussian mixture distribution. Each Gaussian component is associated with a realization of the tidal field. The mixture weights, $\lambda_s$, are given by (appendix B):

$$ \lambda_s = \frac{\exp\left[\omega_s + \frac{1}{2}\ln(2\pi\nu_s^2)\right]}{\sum_{s=1}^{N_s} \exp\left[\omega_s + \frac{1}{2}\ln(2\pi\nu_s^2)\right]}, \qquad (5.3) $$

with

$$ \nu_s^{-2} = \sum_{g=1}^{2N_g} \frac{T_{g,s}^2}{\sigma_g^2}, \quad \omega_s = \frac{\mu_s^2}{2\nu_s^2}, \quad \mu_s = \frac{\sum_{g=1}^{2N_g} e_g T_{g,s} / \sigma_g^2}{\sum_{g=1}^{2N_g} T_{g,s}^2 / \sigma_g^2} \qquad (5.4) $$

Equation (5.2) is a Blackwell-Rao estimator [54, 55]. The mixture weights, $\lambda_s$, assign preference to realizations of the tidal field that are more compatible with the observed galaxy shapes.

Assuming that the random ellipticity noise is Gaussian-distributed and universal across the galaxy sample, we perform a joint inference of the linear alignment amplitude and the ellipticity variance. We assume an inverse-gamma (IG) conjugate prior on $\sigma^2$ of the form $P(\sigma^2|C, T_{g,s}) \sim \text{IG}(\theta_1, \theta_2)$, where $\theta_1, \theta_2$ are the shape and scale parameters of the distribution respectively. We choose this prior as it is close to a Jeffrey's prior and yields a bonafide distribution, namely a distribution that integrates to unity. Then, we write the conditional posterior for the ellipticity variance as

$$ P(\sigma^2|C, e) \propto \sum_{s=1}^{N_s} \text{IG} \left( \sigma^2 \middle| \theta_1 + \frac{N_g}{2}; \theta_2 + \frac{1}{2} \sum_{g=1}^{2N_g} (e_g - CT_{g,s})^2 \right), \qquad (5.5) $$

where

$$ \text{IG}(\sigma^2|\theta_1, \theta_2) = \frac{\theta_2^{\theta_1}}{\Gamma(\theta_1)} x^{-\theta_1-1} \exp\left(-\frac{\theta_2}{\sigma^2}\right), \qquad (5.6) $$

$\Gamma(\sigma^2)$ being the gamma function.

In order to sample from the posterior distributions of equation (5.2) and equation (5.5), we adopt a Gibbs sampling approach [56, 57]. As a first step, we sample from the conditional variance posterior, namely the random noise posterior. In the second step, we sample from the linear alignment amplitude posterior, conditional on the previous variance sample. We then iterate this process for $N = 10,000$ sampling steps. We illustrate our block-sampling approach, for a single tidal field realization as

$$ \begin{aligned} \sigma^2 &\frown P(\sigma^2|C, e, T_s) \\ C &\frown P(C|\sigma^2, e, T_s). \end{aligned} \qquad (5.7) $$

The curved arrows, $\frown$, indicate random draws. Equation (5.7) illustrates the iterative process in which we first draw a variance sample and then use it to draw an intrinsic alignment amplitude sample. In order to be maximally agnostic we set the variance prior to $\text{IG}(10^{-3}, 10^{-3})$. While the Jeffrey's prior in our case is $\text{IG}(0, 0)$, we choose small nonzero values of the IG parameters for numerical reasons. This is a valid approximation as long as the variance is much greater than $10^{-3}$ and we show that this is the case in section 6. The dependence of our results on the IG prior is negligible. We further test the convergence behavior of our approach using a Gelman - Rubin test, mock data tests and a comparison to the analytical
expectation of the posterior means to the limit of a fixed uncertainty. All tests and the sensitivity of our inference to the choice of prior are discussed in appendix C. In principle, one could directly sample from the mixture distribution in equation (5.2), considering the individual weights, $\lambda_s$. In order to account for all realizations, we choose to rather sample from the Gaussian distributions corresponding to every tidal field realization separately and combine the posteriors (appendix B) for computational convenience.

# 6 Results

We now present our results of the joint linear alignment amplitude and ellipticity variance inference. The posterior moments presented here are the result of running $N_s = 837$ independent sampling chains, each consisting of 10 000 MCMC steps. Both ellipticity components are sampled in each chain, in order to obtain combined constraints.

The linear alignment amplitude typically reported in the literature (e.g. [6]) is derived from C as follows

$$A_I = \frac{C}{2\Omega_m'CRC'\rho_{cr}'}, \qquad (6.1)$$

where $C'\rho_{cr}' = 0.0134$, $\Omega_m' = 0.282$, and $\mathcal{R}$ is the shear responsivity. Since this quantity is specific to the galaxy shape catalog, we adopt a shear responsivity of $\mathcal{R} = 0.87$ following [6]. Here, the primes indicate that these parameters are assumed in another study.

The linear alignment amplitude inference as a function of smoothing scale is shown in figure 1(a). At sharp-k smoothing $R = 20h^{-1}$ Mpc applied to the tidal fields with grid resolution $15.6h^{-1}$ Mpc, we find $A_I = 2.9 \pm 0.7$ from both ellipticity components. As a test, we infer the linear alignment amplitude for each ellipticity components separately and then combine the amplitudes using inverse-variance weighting. For the linear alignment amplitude constrained with the first component, we find $A_{I,1} = 3.2 \pm 1.0$, whereas from the second component we find $A_{I,2} = 2.6 \pm 1.0$. The amplitudes are consistent within $0.4\sigma$. Considering both ellipticity components, we obtain $A_I = 2.9 \pm 0.7$, consistent with the joint inference.

Ref. [6] reported $A_I = 4.6 \pm 0.5$ for the LOWZ sample using the primordial alignment scenario. Employing the same scenario by using the estimate of the tidal field at $z = 0$ we find $A_I = 3.2 \pm 0.8$, which is consistent with $< 1.5\sigma$ with [6]. Compared to [6], the variance of our intrinsic alignment posterior consists of the intrinsic dispersion in the observed ellipticity sample and the uncertainty propagated in the tidal field realizations. The latter consists of the observational uncertainties associated with the spectroscopic galaxy sample used to constrain the BORG realizations. Further, compared to the configuration in [6], we applied a lower redshift cutoff and removed galaxies on the survey mask. This treatment leaves $\sim 10\%$ fewer galaxies in our sample, which is equivalent to 5% contribution to Poisson uncertainty. Factors that may drive this difference can further stem from the fact that we jointly infer the random shape noise and report our result at a single scale. Finally, the assumptions that enter our likelihood and the non-Gaussian features in the tidal field that we account for through our field-level inference likely have an impact. Finally, the cosmological parameters assumed here and in [6] are different. As a result, we expect a discrepancy between [6] and our result, though still within error bars.

On sufficiently large scales, the linear alignment strength is expected to be independent of scale. As described in appendix A, we expect that solely the effect of filtering introduces scale dependence in our measurement, if unaccounted for. Figure 1(a) shows that our results for $A_I$ are indeed consistent with being $R$-independent for $R \gtrsim 20h^{-1}$ Mpc. On smaller
<figure><img src="image_3.png" /><figcaption>**Figure 1.** (a) The linear alignment amplitude posterior mean as a function of smoothing scale. (b) The signal-to-noise ratio, SNR = $\langle A_I \rangle / \sqrt{\langle A_I^2 \rangle - \langle A_I \rangle^2}$, of the linear alignment amplitude as a function of smoothing scale. The uncertainty is not visible. The horizontal line represents the 3σ threshold. (c) The jointly inferred posterior mean of the root mean square random ellipticity noise. The blue and yellow windows represent 1 standard deviation and scales smaller than the inference resolution, respectively.</figcaption></figure>

scales, we expect a dependence on the filter scale $R$. First, because of nonlinear and scale-dependent (higher-derivative) corrections to the linear alignment model. Second, because the fundamental resolution of the forward model employed in the density field inference is $15.6h^{-1}$ Mpc and therefore smaller-scale processes are not modeled. We therefore expect that scales smaller than the fundamental resolution of the tidal fields will be biased by the aforementioned effects. On large scales, even though the linear alignment amplitudes at $R = 60–120h^{-1}$ Mpc are consistent with a constant amplitude, fluctuations are visible. These are likely due to the fact that relatively few modes remain after these very large-scale sharp-k filters. These in turn are coupled by the survey window, which makes the Fourier modes we probe highly non-uniform, leading to the mildly correlated features seen in $A_I$ as a function of $R$ on very large scales. Therefore, our results vary, albeit non-significantly, as a function
<figure><img src="image_4.png" /><figcaption>**Figure 2.** (a) Null test on the linear alignment amplitude performed by randomly rotating galaxy ellipticities, considering 100 datasets. (b) Null test on the linear alignment amplitude performed by randomly rotating galaxy ellipticities, considering 1 dataset. The blue window represents one standard deviation on the linear alignment amplitude posterior.</figcaption></figure>

of scale, first because of the survey mask on large scales and second, because of unmodeled physics on scales smaller than the fundamental resolution of our tidal fields. Further, 65% of the grid elements populated by galaxies contain only one galaxy. This suggests that our assumption of independent shape noise among galaxies is a good approximation. The rest of the grid elements are populated by up to 4 galaxies, with decreasing rate as a function of galaxy density. Given that the galaxy shape noise in these grid elements is correlated, we expect a lower amplitude than the one we report here.

The signal-to-noise ratio (SNR) for the intrinsic alignment amplitude is shown in figure 1(b). It is defined as $\text{SNR} = \langle A_I \rangle / \sqrt{\langle A_I^2 \rangle - \langle A_I \rangle^2}$. The detection of linear alignment is $4\sigma$ at $R = 20h^{-1}$ Mpc. The ellipticity variance posterior mean, jointly inferred with the linear alignment amplitude is shown in figure 1(c). We obtain $\sigma = 0.24 \pm 0.01$ at $R = 20h^{-1}$ Mpc, constrained with both ellipticity components. Our results agree with [58] at $0.2\sigma$. As discussed in section 3 and seen from equation (3.2), our ellipticity variance only includes a contribution from the random noise component $e^{\text{rnd}}$. Let us assume that the distribution of $e^{\text{rnd}}$ can be approximated by the standard deviation of the observed ellipticities $e^{\text{obs}}$. This fit then yields a $\sigma_{\text{rnd}} = 0.26$, consistent with the value we infer. In order to obtain this fit, we consider both ellipticity components separately and then average the resulting standard deviations. Note that this test is separate from our analysis and is used only as a sanity check. In our analysis we jointly infer the random ellipticity component along with the intrinsic alignment amplitude, in order to allow for a broader posterior in case outliers are present. We note that the mean ellipticity measurement standard deviation is $\langle \sigma_{\text{msm}} \rangle = 0.008 \ll \sigma^{\text{rnd}}$. Our inferred variance is consistent with the presumption that the noise in our cross-correlation is dominated by random processes, which are universal across the galaxy sample.

We have also performed a null test using randomly-rotated galaxy shapes for every galaxy. The null test indicates to what extent a spurious signal can arise even in lack of correlation between galaxy shapes and the tidal field; for this purpose, considering a single ellipticity component is sufficient. We use 10 tidal field realizations and 100 randomly-rotated galaxy shapes per galaxy. Our results are shown in figure 2(a). They show that the signal is consistent with a null detection in absence of any correlation between the galaxy shapes and the underlying tidal field. This suggests that our signal on scales of $20h^{-1}$ Mpc (1.4° at the
median redshift of the ellipticity sample) constitutes a significant detection. In figure 2(b), we show the same test considering one set of randomly-rotated ellipticities. The noticeable fluctuations are due to dataset variance.

We then examine the evolution of the linear alignment amplitude with luminosity, which previous studies have detected within luminous red galaxies [3, 4, 6]. In search of such a trend, we split our LOWZ sample into four luminosity bins, based on the r-band absolute magnitude. Following the percentile cuts reported previously (table 2, [6]), the $L_1$ sub-sample contains the brightest 20% of galaxies and $L_4$ contains the faintest 60%. Both samples consist of approximately the same number of galaxies. The results for the instantaneous alignment scenario are shown in figure 3(a). We find a mild evolution of the linear alignment amplitude with luminosity, as the amplitude does not differ more than $3\sigma$ between any luminosity sub-sample at any scale. Using the primordial alignment scenario for comparison, the intrinsic alignment amplitude per sub-sample is consistent with previous findings [6]. Our results are ~2σ away from the results reported in (table 2, [6]) for the $L_1$ sub-sample and within ~0.1σ for the $L_4$ sample. We attribute the discrepancy in the $L_1$ sample to the fact that we consider scales ≥ 20 $h^{-1}$ Mpc in our estimate, whereas [6] does so on scales ≥ 6 $h^{-1}$ Mpc, where strong nonlinearities are present. We report a 2.3σ trend of brighter galaxies toward stronger alignment amplitudes at $R \gtrsim 20h^{-1}$ Mpc.

We proceed with the evolution of the linear alignment amplitude with redshift. To this end, we split the LOWZ sample into two redshift samples in the ranges $z = 0.21-0.29$ and $z = 0.29-0.36$. The results for the instantaneous alignment scenario are shown in figure 3(b). We find no significant redshift evolution of the linear alignment amplitude with redshift. However, as we probe a limited redshift range, the intrinsic alignment trend as a function of redshift carries little significance.

In order to study the evolution of the intrinsic alignment amplitude with color, we divide the LOWZ galaxies into five sub-samples, based on their $g-i$ color index. The sub-samples are defined according to earlier work (table 2, [6]), where $C_1$ is the bluest and $C_5$ the reddest sample. The results for the instantaneous alignment scenario are shown in figure 3(c). We observe no significant color dependence of the linear alignment amplitude. Switching to the primordial alignment scenario for easier comparison, our findings are consistent with past results [6]. Given that the sample consists of luminous red galaxies, a lack of color evolution is expected.

# 7 Discussion and conclusions

We have constrained the linear alignment model of elliptical galaxies by correlating their observed ellipticities as reported in the SDSS-III BOSS and LOWZ sample and the tidal fields constrained by the BORG algorithm with SDSS-III BOSS spectroscopic galaxy data. At smoothing scale $R = 20h^{-1}$ Mpc, we have inferred a linear alignment amplitude of $A_I = 2.9 \pm 0.7$, at $4\sigma$ significance level. On scales $R \lesssim 20h^{-1}$ Mpc, the linear alignment amplitude is expected to be biased due to contributions from both nonlinear and unresolved processes. We report a mild evolution of the linear alignment amplitude with luminosity and no evolution with redshift or color within this luminous red galaxy sample. The mean ellipticity variance, which we have assumed to be universal for all galaxies and to be dominated by random processes, is $\sigma = 0.24 \pm 0.01$ at $R = 20h^{-1}$ Mpc. Within our modeling framework, we expect that deviations from the true linear alignment amplitude occur due to systematic effects at small scales. First, as the inference grid resolution is $15.6h^{-1}$ Mpc
<figure><img src="image_5.png" /><figcaption>**Figure 3.** (a) The linear alignment amplitude as a function of smoothing scale for the brightest ($L_1$) and faintest ($L_4$) galaxy sub-sample. (b) The linear alignment amplitude as a function of smoothing scale for two redshift sub-samples. $Z_1$ covers the range $0.21 < z < 0.29$ and $Z_2$ the range $0.29 < z < 0.36$. (c) The linear alignment amplitude as a function of the smoothing scale for the bluest ($C_1$) and reddest ($C_5$) sub-sample.</figcaption></figure>

and we consider a gravity-only forward model, some nonlinear features are not captured in the original BORG inference [42]. Further, unmodeled astrophysical processes during galaxy formation may affect the inference on scales approaching the grid scale (e.g. [59–61]). Second, our linear alignment assumption breaks down on scales where the large-scale structure becomes nonlinear. In this case, galaxy shapes are expected to become a nonlinear function
of the tidal field. On small scales, the Gaussian ellipticity likelihood and the assumption of independent shape noise will likewise begin to break down.

In order to estimate the large-scale alignment strength, and prevent leakage of information from smaller scales, we employ a sharp-k filter. Smoothing scales of $R \ge 20 \ h^{-1} \ \mathrm{Mpc}$ are sufficiently larger than the typical scale of strong nonlinearities in large-scale structure. We therefore do not expect that our results at those scales are significantly affected by the effects mentioned above. This is supported by the apparent scale-independence of our inferred alignment amplitude at $R \ge 20h^{-1} \ \mathrm{Mpc}$.

Going forward, the field-level approach that we have presented here allows for improvement on different aspects of our modeling. First, our approach — based on a field-level, forward-modeling framework like the BORG algorithm — facilitates the incorporation of nonlinear corrections to both gravitational evolution and the intrinsic alignment model (for the latter see e.g. [9, 62]). The importance of this prospect can be seen in figure 1b: the information content of the intrinsic alignment posterior increases at smaller scales, where nonlinearities in intrinsic alignment and the tidal fields become important (e.g. [63]). In particular, if the tidal field was Gaussian, our framework would be expected to yield similar results to 2-point correlation approaches. However, as non-Gaussianities in the matter density distribution become significant, the higher-order statistics that we incorporate through the BORG algorithm can provide a wealth of additional information on small scales.

Further, our approach allows for a joint inference of intrinsic alignment and weak lensing (e.g. [64, 65]), which is particularly useful at high redshifts (e.g. [66]). Owing to the full treatment of known and unknown systematic effects and observational uncertainties within BORG, this aspect guarantees a fully self-consistent inference of both intrinsic alignment and weak lensing. Systematic effects were treated by using a likelihood that marginalizes over foreground contaminations [67] and employing the technique of template matching [68]. Observational uncertainties stemming from the survey geometry and luminosity function are directly modeled and accounted for within BORG through the data likelihood (figure 1, [42]) and the resulting uncertainty is propagated to the density field inference. In our study, we marginalize over the tidal field realizations that vary due to the aforementioned uncertainties. As a result, all these uncertainties are propagated into the intrinsic alignment inference.

Note that our intrinsic alignment amplitude posterior considers the tidal field on scales $\ge R$, $R$ being the smoothing scale of the tidal fields. Therefore, information from scales $> R$ is already contained in those with smaller smoothing scales. In order to extend our analysis to smaller scales, one would choose an intrinsic alignment model that accurately captures nonlinearities and increase the resolution of the BORG inference.

Our approach facilitates the use of intrinsic alignment as a cosmological probe, e.g. in conjunction with redshift-space distortions, Baryon Acoustic Oscillations and primordial non-Gaussianity (e.g. [20, 69, 70]). Cosmological constraints are expected to improve when smaller scales are included in the analysis (e.g. [71]). On these scales, galaxy bias, which affects the intrinsic alignment signal, is expected to be scale-dependent. Within BORG, scale-dependent galaxy bias can be inferred jointly with the large-scale structure (and consequently, the tidal shear) conditional on galaxy observations [70]. Moreover, 2-point analyses consider the matter power spectrum at a given effective redshift within a galaxy sample. Field-level approaches can consider the tidal field at the redshift of each individual galaxy, if the evolution of intrinsic alignment with redshift is known. Further, cross-correlations of shape measurements with BORG inferences — where $\Lambda$CDM and a certain structure formation model are assumed — can be used as a test of these models, provided that the assumed intrinsic
alignment and gravity models are satisfactory descriptions of the physics on the relevant scales. Finally, the cross-correlation between the tidal field and galaxy shape we infer is local in real space. This renders the isolation and testing of map-level systematic effects easier.

**Data and software availability.** For data requests, please contact the Aquila Consortium (https://www.aquila-consortium.org). Software products may be made available by E.T. and N.-M.N upon reasonable request.

## Acknowledgments

We thank the Reviewer for their careful review, which helped improve the manuscript. The authors thank Rachel Mandelbaum and Sukhdeep Singh for kindly providing the SDSS-III BOSS/LOWZ shape measurements catalog. We further thank Adam Andrews, Deaglan Bartlett, Supranta Sarma Boruah, Alan Heavens, Dragan Huterer, Eiichiro Komatsu and Natalia Porqueres for providing feedback on the manuscript. This research utilized the HPC facility supported by the Technical Division at the Department of Physics, Stockholm University and the Max Planck Computing and Data Facility. This work was enabled by the research project grant ‘Understanding the Dynamic Universe’ funded by the Knut and Alice Wallenberg Foundation under Dnr KAW 2018.0067. JJ acknowledges support by the Swedish Research Council (VR) under the project 2020-05143 — “Deciphering the Dynamics of Cosmic Structure”. MN and FS acknowledge support from the Starting Grant (ERC-2015-STG 678652) “GrInflaGal” of the European Research Council. This work has made use of the Infinity Cluster hosted by Institut d’Astrophysique de Paris. This work is conducted within the Aquila Consortium (https://aquila-consortium.org).

## A Smoothing correction of the linear alignment amplitude

In our inference of the alignment amplitude, we introduce a sharp-k filter in order to remove small scales that are affected by nonlinearities. Naive comparison between ellipticities and tidal fields to determine the linear alignment amplitude would appear as scale dependent. This phenomenon is due to the presence of the NGP and CIC implicit filtering, whose impact on either ellipticities or on our tidal amplitudes would be neglected.

We now propose a model and a correction for this scale dependence. To simplify the discussion, we assume that galaxy ellipticities are represented by a continuous field. A more detailed description in the presence of selection effects is postponed to future work. As galaxies allow us to observe ellipticities only over their actual scale, we consider that observed galaxy ellipticities are filtered with a top-hat (TH) kernel of size $R_{TH}$. The assignment of galaxies to the grid is made with an NGP kernel

$$W_{\text{NGP}}(\mathbf{x}, R) = \prod_{i=1}^{3} \begin{cases} 1 & \text{if } |x_i| < R/2 \\ 0 & \text{otherwise,} \end{cases} \qquad (A.1)$$

where $\{x_i : i \in \{1, 2, 3\}\}$ are comoving Cartesian coordinates. The BORG inference and resimulation by construction employ a cubic CIC filter with the common resolution of $15.6h^{-1}$ Mpc for the side of each cubic element. The CIC filter is defined as

$$W_{\text{CIC}}(\mathbf{x}, R) = \prod_{i=1}^{3} \begin{cases} 1 - |x_i|/R & \text{if } |x_i| < R \\ 0 & \text{otherwise.} \end{cases} \qquad (A.2)$$
Finally, we apply a sharp-k filter on the resulting tidal field. This operation leads to removing modes with $k > 1/R$.

Here, we will denote by $[Q]_X$ a quantity $Q$ that is convolved with a kernel $X$ of a given size and by $W_X$ the corresponding convolution function. We can then write the data model used in the inference as

$$[\mathbf{e}^{\text{obs}}]_{\text{TH}} = \frac{C}{4\pi G} [T_{\pm}]_{\text{CIC-SK-NGP}} + [\epsilon^{\text{rnd}}]_{\text{TH}}, \qquad (\text{A.3})$$

where $C$ indicates the linear alignment amplitude which refers to the filtered tidal field. $\epsilon^{\text{rnd}}$ is a field that contains all the parts that are not modeled through the tidal field. We assume that its values are Gaussian-distributed and on average decorrelated from the tidal fields $T_{\pm}$. However, it is still a continuous field. Suppose that the linear alignment model holds on all scales, i.e. galaxy shapes are linearly proportional to the tidal field at their location. The data model that associates the two fields reads

$$[\mathbf{e}^{\text{obs}}]_{\text{TH}} = \frac{C^{\text{corr}}}{4\pi G} [T_{\pm}]_{\text{TH}} + [\epsilon^{\text{rnd}}]_{\text{TH}}, \qquad (\text{A.4})$$

where now we have introduced the corrected linear alignment amplitude $C^{\text{corr}}$, and we have indicated the different shape noise field with a tilde. Our goal is to derive $C^{\text{corr}}$ in terms of $C$. For this, we multiply both sides of equation (A.4) by $[T_{\pm}]_{\text{CIC-SK-NGP}}$ and take the ensemble average. Note that the random noise component changes from $\epsilon^{\text{rnd}}$ in equation (A.3) to $\epsilon^{\text{rnd}}$ in equation (A.4), because it now refers to the corrected intrinsic alignment amplitude. This suggests that at this step, the artificial scale dependence we introduced when smoothing, is now accounted for. Since the shape measurement and the random noise are both uncorrelated with the smoothed tidal field, we obtain

$$\langle [T_{\pm}]_{\text{CIC-SK-NGP}} [\mathbf{e}^{\text{obs}}]_{\text{TH}} \rangle = \frac{C^{\text{corr}}}{4\pi G} \langle [T_{\pm}]_{\text{CIC-SK-NGP}} [T_{\pm}]_{\text{TH}} \rangle. \qquad (\text{A.5})$$

An analogous relation involving $C$ is obtained from equation (A.3). Assuming that the dynamics is provided by the linear perturbation theory and that there are no mask or selection effects, the bracketed terms can be evaluated as integrals over the linear matter power spectrum, $P_L(\mathbf{k})$, defined as

$$\langle \delta(\mathbf{k}) \delta(\mathbf{k}') \rangle = (2\pi)^3 \delta_D(\mathbf{k} + \mathbf{k}') P_L(k). \qquad (\text{A.6})$$

This assumption is accurate in the limit of large smoothing, since this filter cuts off high-k modes. Therefore, we model the dependence on the filtering scale of the linear alignment amplitude by the linear relation

$$C^{\text{corr}}(k) = S(k) C(k), \qquad (\text{A.7})$$

where

$$S(k) = \frac{\langle [T_{\pm}]_{\text{CIC-SK-NGP}}(\mathbf{k}) [T_{\pm}]_{\text{CIC-SK-NGP}}(\mathbf{k}) \rangle}{\langle [T_{\pm}]_{\text{CIC-SK-NGP}}(\mathbf{k}) [T_{\pm}]_{\text{TH}}(\mathbf{k}) \rangle}. \qquad (\text{A.8})$$

Using equation (A.6) and equation (A.8), we give the explicit expression for $S(k)$

$$S(k) = \frac{\int d^3\mathbf{k} P_L(\mathbf{k}) W_{\text{CIC}}^2(\mathbf{k}, R_{\text{CIC}}) W_{\text{SK}}^2(\mathbf{k}, R) W_{\text{NGP}}^2(\mathbf{k}, R_{\text{CIC}})}{\int d^3\mathbf{k} P_L(\mathbf{k}) W_{\text{CIC}}(\mathbf{k}, R_{\text{CIC}}) W_{\text{SK}}(\mathbf{k}, R) W_{\text{NGP}}(\mathbf{k}, R_{\text{CIC}}) W_{\text{TH}}(\mathbf{k}, R_{\text{TH}})}. \qquad (\text{A.9})$$
<figure><img src="image_6.png" /><figcaption>**Figure 4.** The smoothing correction of equation (A.9), as a function of the sharp-k smoothing scale.</figcaption></figure>

We note that $S \to 1$ when $R \gg R_{\text{CIC}}$, $R_{\text{TH}}$. We approximate the cubic CIC filter at the grid resolution, $15.6h^{-1}$ Mpc, with a spherically-symmetric CIC kernel of radius $9.7h^{-1}$ Mpc. The TH kernel radius, representing the observed ellipticity smoothing, is taken to be $R_{\text{TH}} = 1h^{-1}$ Mpc. However, the precise value of this scale can be ignored as long as it is much smaller than $R_{\text{CIC}}$. The smoothing correction as a function of the SK smoothing scale, $R$, is shown in figure 4. The power spectra are considered at the median redshift of the galaxy sample, $z = 0.26$. As expected, the larger $R$ is, the smaller the correction is (i.e. the closer $S$ becomes to 1).

## B Posterior derivation

In this appendix, we provide the derivation of the marginalized posterior for the linear alignment amplitude, as described in section 2. In what follows, $N_G^3 = 256^3$ is the number of grid elements in the BORG inference. $\mathbf{T}$ denotes the 6 independent tidal field components at each grid element. We start from the joint marginal posterior of the intrinsic alignment amplitude and the unknown random noise component

$$ \mathcal{P}(C, \sigma^2|e) = \int d^{N_G^3} \mathbf{T} \mathcal{P}(C, \sigma^2, \mathbf{T}|e) \qquad (B.1) $$

which we recast into

$$ \mathcal{P}(C, \sigma^2|e) \propto \int d^{N_G^3} \mathbf{T} \mathcal{P}(e|C, \sigma^2, \mathbf{T}) \mathcal{P}(C) P(\sigma^2) \mathcal{P}(\mathbf{T}). \qquad (B.2) $$

The above formulation is based on the assumption that the priors on the linear alignment amplitude, the tidal field and the random noise are independent. The BORG inference approximates $\mathcal{P}(\mathbf{T})$ by an ensemble of $N_s$ MCMC samples

$$ \mathcal{P}(\mathbf{T}) \approx \frac{1}{N_s} \sum_{s=1}^{N_s} \delta_{\text{D}}^{N_G^3} (\mathbf{T} - \mathbf{T}_{\text{s}}^{\text{BORG}}), \qquad (B.3) $$
where $\delta_D^n$ denotes the n-dimensional Dirac delta distribution. The above equation indicates that we consider each sample in the tidal field posterior to be given by each BORG tidal field. We then write the joint marginal posterior as

$$ P(C, \sigma^2|e) \propto \sum_{s=1}^{N_s} P(e|C, \sigma^2, \mathbf{T}_s^{\text{BORG}}) P(C) P(\sigma^2) P(\mathbf{T}_s^{\text{BORG}}). \quad (B.4) $$

We then assume a Gaussian likelihood for observed ellipticities. The likelihood allows us to consider the tidal field only at those grid cells that are populated with galaxies. To simplify notation, we designate the tidal field values at the location of galaxies per realization as $T_s$. Note that the two ellipticity components are modeled independently and are Gaussian-distributed. We rewrite the Gaussian likelihood for a single realization as [53]

$$ \ln P(e|C, \sigma^2, T_s) = -\frac{\gamma_s}{2} + \frac{\mu_s^2}{2\nu_s^2} - \frac{\delta_s}{2} - \frac{(C - \mu_s)^2}{2\nu_s^2}, \quad (B.5) $$

with

$$ \gamma_s = \sum_{g=1}^{2N_g} \frac{e_g^2}{\sigma_g^2}, \quad \delta_s = \sum_{g=1}^{2N_g} \ln \sigma_g^2 \quad (B.6) $$

Note that the sums run to $2N_g$, as we have now considered the product likelihood of equation (5.1), in which we consider both components of observed and projected ellipticities per galaxy.

Given that the first and third terms on the r.h.s. of equation (B.5) are independent of the linear alignment amplitude, we ignore them and recast the single-realization posterior for the linear alignment amplitude into the following

$$ P(C, \sigma^2|e, T_s) \propto P(C) \frac{\lambda_s}{\sqrt{2\pi \nu_s^2}} \exp \left[ -\frac{(C - \mu_s)^2}{2\nu_s^2} \right]. \quad (B.7) $$

Marginalizing over the tidal field realizations, we arrive at equation (5.2). The linear alignment amplitude posterior mean can be analytically derived for a uniform prior on C as

$$ \langle C \rangle = \sum_{s=1}^{N_s} \lambda_s \mu_s. \quad (B.8) $$

Finally, the analytical expression for the variance of the posterior mean, $\sigma_C^2$, reads

$$ \sigma_C^2 = \sum_{s=1}^{N_s} \lambda_s [\nu_s^2 + (\mu_s - \langle C \rangle)^2] \quad (B.9) $$

## C Validation tests

In this section we describe the validation tests of the method presented in section 5. We test our sampling algorithm using mock data and a comparison to the analytical posterior moments presented in appendix B for fixed variance. We test the convergence using a Gelman-Rubin test. We show that the linear alignment amplitude posterior mean and variance are insensitive to the choice of variance prior. Finally, we present a posterior predictive check using one realization of the tidal field.
<figure><img src="image_7.png" /><figcaption>Figure 5. (a) The linear alignment amplitude posterior from mock data generated from a Gaussian with known linear alignment amplitude, $C_{\text{mock}} = 2$ and unit variance, considering only 1 realization of the tidal field. (b) The universal variance posterior for the same mock data. The ground truth is $\sigma_{\text{mock}}^2 = 1$. (c) The autocorrelation function of the mock linear alignment amplitude MCMC chain. (d) The autocorrelation function of the mock variance MCMC chain.</figcaption></figure>

## C.1 Mock data test

We generate a sample of mock ellipticities of the same size as the observed ellipticities sample. We consider 5 realizations of random tidal fields. The mock ellipticities are drawn from a Gaussian distribution with known input amplitude $C_{\text{mock}}$ and unit variance, $N(e|C_{\text{mock}}, T_s, 1)$. The prior on variance is IG($10^{-3}$, $10^{-3}$). The correction factor for mock data is equal to unity on all scales. Each chain consists of 10 000 steps. The linear alignment amplitude posterior is shown in figure 5(a) and the corresponding autocorrelation function (ACF) is shown in figure 5(c). The variance posterior is shown in figure 5(b) and the corresponding autocorrelation function is shown in figure 5(d). As can be seen from figure 5, there is an offset between the posterior means and the corresponding mock values. We test whether the offset is due to mock dataset variance, by generating 50 mock datasets with differing seeds in chains of 5 000 steps and monitoring the average behavior of the posterior means around the mock linear alignment amplitude and variance. Our results are shown in figure 6. The average offset between the input linear alignment amplitude and the inferred mean averaged across the datasets is $\sim 10^{-5}$. The corresponding value for the variance posterior is $\sim 10^{-3}$. We therefore conclude that the offset is due to dataset variance.

## C.2 Gelman-Rubin test

In order to test the convergence of the MCMC chains, we perform a Gelman-Rubin test [72]. The results were obtained for 10 independent chains in which the starting point was $C = [1, 2, \dots, M = 10]$, considering only one ellipticity component. We performed the tests on a mock dataset of the same sample size as the real data, but with unit variance. The variance prior was the IG(1, 0.1). Every chain ran for 10 000 steps, corresponding to $2N$ in the notation of this test. We computed the potential scale reduction factor (PSRF)

$$R = \sqrt{\frac{V}{W}}, \qquad (C.1)$$
<figure><img src="image_8.png" /><figcaption>**Figure 6.** Fluctuations of the (a) linear alignment amplitude and (b) variance posterior means as a function of mock dataset index.</figcaption></figure>

<table><caption>**Table 1.** The Gelman-Rubin test PSRF on mock and real data for one and multiple realizations. The results indicate that convergence has been reached.</caption><thead><tr><th>Data</th><th>N<sub>s</sub></th><th>|1 - R<sub>c</sub>|</th></tr></thead><tbody><tr><td>Mock</td><td>1</td><td>10<sup>-5</sup></td></tr><tr><td>Mock</td><td>5</td><td>10<sup>-4</sup></td></tr><tr><td>Real</td><td>1</td><td>10<sup>-4</sup></td></tr><tr><td>Real</td><td>5</td><td>10<sup>-4</sup></td></tr></tbody></table>

where

$$V = \frac{N-1}{N}W + \frac{M+1}{MN}B, \quad B = \frac{N}{M-1}W \sum_{m=1}^{M} (\hat{a}_m - \hat{a})^2, \quad (C.2)$$

where $\hat{a}_m$ are the posterior means per chain, $\hat{a}$ is the posterior mean averaged over the chains and $W$ is the posterior variance averaged over the chains. A PSRF close to unity is indicative of convergence. Sampling variability can be accounted for by recasting the PSRF into $R_c = \sqrt{(d+3)/(d+1)}R$. As $d$ represents the degrees of freedom estimate of a t distribution, in our case it is given by $d = N_g - 1$. As a result, the variance sampling correction is close to unity. If $R_c < 1.2$, convergence has been achieved. Our results are shown in table 1 and indicate that our sampler converges to the target distribution.

### C.3 Posterior moments

To the limit of fixed variance, the linear alignment amplitude posterior mean and variance are given by equation (B.8) and equation (B.9), respectively. In the context of our implementation, where each tidal field sample is considered independently, i.e. $\lambda_s = 1$, the above equations reduce to the Blackwell-Rao estimators. It should be noted that even though $\lambda_s = 1$, the Gaussian mixture posterior components receive their corresponding weights through proper normalization. Using the configuration described in appendix C.1 for mock data generation and sampling linear alignment amplitudes with a fixed variance set to the mock data variance, we recover $C = 2.00 \pm 0.05$, which is the result from the Blackwell-Rao
<figure><img src="image_9.png" /><figcaption>**Figure 7.** (a) Linear alignment amplitude and (b) variance due to random noise posterior mean as a function of an $IG(\theta, \theta)$ variance prior.</figcaption></figure>

estimators. This indicates that the linear alignment amplitude inference is consistent with the theoretical expectation for the posterior moments.

### C.4 Sensitivity to prior

In the case of Jeffrey's prior, $(\theta_1, \theta_2) = (0,0)$. However, due to the improper nature of the prior, the variance posterior also becomes improper. For this reason, we examine the sensitivity of our results to the choice of prior and find that our inference is not sensitive to different $IG(\theta_1, \theta_2)$ priors for $(\theta_1, \theta_2) \in (10^{-3}, \dots, 1)$, as all galaxies constrain one universal variance. Therefore, we would like to use another conjugate prior of the $IG(\theta, \theta)$ kind, aiming for $\theta \to 0$, such that the prior entropy is high, indicating a prior that is as weakly informative as possible. Given the asymptotic behavior of the entropy of IG distributions at $\theta \to 0$, we explore the sensitivity of the linear alignment amplitude posterior to the choice of prior. We examine the posterior mean and standard deviation for $\theta = [10^{-3}, \dots, 1]$ on real data at $20h^{-1}$ Mpc, considering one random realization. The results are shown in figure 7 and suggest that our inference is insensitive to the prior choice in the aforementioned range.

### C.5 Posterior predictive check

With this test we aim to test the suitability of the Gaussian likelihood as an approximation to the distribution of the observed ellipticities. We use one tidal field realization and run an MCMC chain for $N = 10,000$ steps. We then draw $N$ ellipticities from a Gaussian distribution for each one of which we use the linear alignment amplitude and variance sample at that MCMC step as the Gaussian mean and variance, respectively. Our results for both observed ellipticities are shown in figure 8. We perform a two-sided Kolmogorov-Smirnov (KS) test (see [73], and references therein) and measure the Kullback-Leibler (KL) divergence [74] of the two ellipticity samples: the observed and predicted ones by the posterior. The former yields a KS statistic of 0.03, with a p-value of 0. The latter yields a KL divergence of 0.1. Based on the p-value, we can reject the null hypothesis that the two samples are drawn from the same distribution. However, both the KS statistic of 0.03 and KL divergence of 0.1 suggest that there is little difference between the two distributions, and that the small
<figure><img src="image_10.png" /><figcaption>**Figure 8.** Posterior predictive check on the LOWZ sample using one tidal field realization at R = 20h⁻¹ Mpc. The orange curves show a Gaussian fit to the inferred ellipticities.</figcaption></figure>

p-value is likely driven by our large sample size. Therefore, for the linear alignment amplitude inference, a Gaussian distribution might not be the optimal likelihood. However, our inference can be extended to different, more robust likelihoods, such as the Student's t [75], in the future.

## References

[1] M.L. Brown, A.N. Taylor, N.C. Hambly and S. Dye, *Measurement of intrinsic alignments in galaxy ellipticities*, Mon. Not. Roy. Astron. Soc. **333** (2002) 501 [astro-ph/0009499] [INSPIRE].

[2] R. Mandelbaum, C.M. Hirata, M. Ishak, U. Seljak and J. Brinkmann, *Detection of large scale intrinsic ellipticity-density correlation from the sloan digital sky survey and implications for weak lensing surveys*, Mon. Not. Roy. Astron. Soc. **367** (2006) 611 [astro-ph/0509026] [INSPIRE].

[3] C.M. Hirata et al., *Intrinsic galaxy alignments from the 2SLAQ and SDSS surveys: Luminosity and redshift scalings and implications for weak lensing surveys*, Mon. Not. Roy. Astron. Soc. **381** (2007) 1197 [astro-ph/0701671] [INSPIRE].

[4] B. Joachimi, R. Mandelbaum, F.B. Abdalla and S.L. Bridle, *Constraints on intrinsic alignment contamination of weak lensing surveys using the MegaZ-LRG sample*, Astron. Astrophys. **527** (2011) A26 [arXiv:1008.3491] [INSPIRE].

[5] J. Blazek, M. McQuinn and U. Seljak, *Testing the tidal alignment model of galaxy intrinsic alignment*, JCAP **05** (2011) 010 [arXiv:1101.4017] [INSPIRE].

[6] S. Singh, R. Mandelbaum and S. More, *Intrinsic alignments of SDSS-III BOSS LOWZ sample galaxies*, Mon. Not. Roy. Astron. Soc. **450** (2015) 2195 [arXiv:1411.1755] [INSPIRE].

[7] J. Harnois-Déraps, N. Martinet and R. Reischke, *Cosmic shear beyond 2-point statistics: Accounting for galaxy intrinsic alignment with projected tidal fields*, Mon. Not. Roy. Astron. Soc. **509** (2022) 3868 [arXiv:2107.08041] [INSPIRE].

[8] P. Catelan, M. Kamionkowski and R.D. Blandford, *Intrinsic and extrinsic galaxy alignment*, Mon. Not. Roy. Astron. Soc. **320** (2001) L7 [astro-ph/0005470] [INSPIRE].

[9] J. Blazek, N. MacCrann, M.A. Troxel and X. Fang, *Beyond linear galaxy alignments*, Phys. Rev. D **100** (2019) 103506 [arXiv:1708.09247] [INSPIRE].
[10] M.A. Troxel and M. Ishak, *The Intrinsic Alignment of Galaxies and its Impact on Weak Gravitational Lensing in an Era of Precision Cosmology*, Phys. Rept. **558** (2014) 1 [arXiv:1407.6990] [INSPIRE].

[11] EUCLID THEORY WORKING GROUP collaboration, *Cosmology and fundamental physics with the Euclid satellite*, Living Rev. Rel. **16** (2013) 6 [arXiv:1206.1225] [INSPIRE].

[12] DES collaboration, *The Dark Energy Survey: more than dark energy – an overview*, Mon. Not. Roy. Astron. Soc. **460** (2016) 1270 [arXiv:1601.00329] [INSPIRE].

[13] H. Aihara et al., *The Hyper Suprime-Cam SSP Survey: Overview and Survey Design*, Publ. Astron. Soc. Jap. **70** (2018) S4 [arXiv:1704.05858] [INSPIRE].

[14] LSST collaboration, *LSST: from Science Drivers to Reference Design and Anticipated Data Products*, Astrophys. J. **873** (2019) 111 [arXiv:0805.2366] [INSPIRE].

[15] A. Weltman et al., *Fundamental physics with the Square Kilometre Array*, Publ. Astron. Soc. Austral. **37** (2020) e002 [arXiv:1810.02680] [INSPIRE].

[16] C. Heymans et al., *KiDS-1000 Cosmology: Multi-probe weak gravitational lensing and spectroscopic galaxy clustering constraints*, Astron. Astrophys. **646** (2021) A140 [arXiv:2007.15632] [INSPIRE].

[17] F. Schmidt, N.E. Chisari and C. Dvorkin, *Imprint of inflation on galaxy shape correlations*, JCAP **10** (2015) 032 [arXiv:1506.02671] [INSPIRE].

[18] N.E. Chisari, C. Dvorkin, F. Schmidt and D. Spergel, *Multitracing Anisotropic Non-Gaussianity with Galaxy Shapes*, Phys. Rev. D **94** (2016) 123507 [arXiv:1607.05232] [INSPIRE].

[19] K. Kogai, K. Akitsu, F. Schmidt and Y. Urakawa, *Galaxy imaging surveys as spin-sensitive detector for cosmological colliders*, JCAP **03** (2021) 060 [arXiv:2009.05517] [INSPIRE].

[20] N.E. Chisari and C. Dvorkin, *Cosmological Information in the Intrinsic Alignments of Luminous Red Galaxies*, JCAP **12** (2013) 029 [arXiv:1308.5972] [INSPIRE].

[21] F. Schmidt and D. Jeong, *Large-Scale Structure with Gravitational Waves II: Shear*, Phys. Rev. D **86** (2012) 083513 [arXiv:1205.1514] [INSPIRE].

[22] N.E. Chisari, C. Dvorkin and F. Schmidt, *Can weak lensing surveys confirm BICEP2?*, Phys. Rev. D **90** (2014) 043527 [arXiv:1406.4871] [INSPIRE].

[23] P. Larsen and A. Challinor, *Intrinsic alignment contamination to CMB lensing–galaxy weak lensing correlations from tidal torquing*, Mon. Not. Roy. Astron. Soc. **461** (2016) 4343 [arXiv:1510.02617] [INSPIRE].

[24] B.M. Schaefer, *Review: galactic angular momenta and angular momentum correlations in the cosmological large-scale structure*, Int. J. Mod. Phys. D **18** (2009) 173 [arXiv:0808.0203] [INSPIRE].

[25] D.W. Sciama, *On the formation of galaxies in a steady state universe*, Mon. Not. Roy. Astron. Soc. **115** (1955) 3.

[26] P.J.E. Peebles, *Origin of the Angular Momentum of Galaxies*, Astrophys. J. **155** (1969) 393 [INSPIRE].

[27] A.G. Doroshkevich, *Spatial structure of perturbations and origin of galactic rotation in fluctuation theory*, Astrophysics **6** (1970) 320.

[28] S.D.M. White, *Angular momentum growth in protogalaxies*, Astrophys. J. **286** (1984) 38 [INSPIRE].

[29] P. Catelan and C. Porciani, *Correlations of cosmic tidal fields*, Mon. Not. Roy. Astron. Soc. **323** (2001) 713 [astro-ph/0012082] [INSPIRE].
[30] C.M. Hirata and U. Seljak, *Intrinsic alignment-lensing interference as a contaminant of cosmic shear*, Phys. Rev. D **70** (2004) 063526 [Erratum ibid. **82** (2010) 049901] [astro-ph/0406275] [INSPIRE].

[31] Z. Vlah, N.E. Chisari and F. Schmidt, *An EFT description of galaxy intrinsic alignments*, JCAP **01** (2020) 025 [arXiv:1910.08085] [INSPIRE].

[32] J. Blazek, Z. Vlah and U. Seljak, *Tidal alignment of galaxies*, JCAP **08** (2015) 015 [arXiv:1504.02510] [INSPIRE].

[33] N.E. Chisari et al., *Redshift and luminosity evolution of the intrinsic alignments of galaxies in Horizon-AGN*, Mon. Not. Roy. Astron. Soc. **461** (2016) 2702 [arXiv:1602.08373] [INSPIRE].

[34] B. Joachimi et al., *Intrinsic galaxy shapes and alignments II: Modelling the intrinsic alignment contamination of weak lensing surveys*, Mon. Not. Roy. Astron. Soc. **436** (2013) 819 [arXiv:1305.5791] [INSPIRE].

[35] C. Heymans et al., *CFHTLenS tomographic weak lensing cosmological parameter constraints: Mitigating the impact of intrinsic galaxy alignments*, Mon. Not. Roy. Astron. Soc. **432** (2013) 2433 [arXiv:1303.1808] [INSPIRE].

[36] H. Johnston et al., *KiDS+GAMA: Intrinsic alignment model constraints for current and future weak lensing cosmology*, Astron. Astrophys. **624** (2019) A30 [arXiv:1811.09598] [INSPIRE].

[37] S. Samuroff, R. Mandelbaum and J. Blazek, *Advances in constraining intrinsic alignment models with hydrodynamic simulations*, Mon. Not. Roy. Astron. Soc. **508** (2021) 637 [arXiv:2009.10735] [INSPIRE].

[38] DES collaboration, *Dark Energy Survey Year 1 Results: Constraints on Intrinsic Alignments and their Colour Dependence from Galaxy Clustering and Weak Lensing*, Mon. Not. Roy. Astron. Soc. **489** (2019) 5453 [arXiv:1811.06989] [INSPIRE].

[39] J. Jasche, F.S. Kitaura, B.D. Wandelt and T.A. Ensslin, *Bayesian power-spectrum inference for Large Scale Structure data*, Mon. Not. Roy. Astron. Soc. **406** (2010) 60 [arXiv:0911.2493] [INSPIRE].

[40] J. Jasche and B.D. Wandelt, *Bayesian physical reconstruction of initial conditions from large scale structure surveys*, Mon. Not. Roy. Astron. Soc. **432** (2013) 894 [arXiv:1203.3639] [INSPIRE].

[41] J. Jasche and G. Lavaux, *Matrix-free Large Scale Bayesian inference in cosmology*, Mon. Not. Roy. Astron. Soc. **447** (2015) 1204 [arXiv:1402.1763] [INSPIRE].

[42] G. Lavaux, J. Jasche and F. Leclercq, *Systematic-free inference of the cosmic matter density field from SDSS3-BOSS data*, arXiv:1909.06396 [INSPIRE].

[43] J. Jasche and G. Lavaux, *Physical Bayesian modelling of the non-linear matter distribution: new insights into the Nearby Universe*, Astron. Astrophys. **625** (2019) A64 [arXiv:1806.11117] [INSPIRE].

[44] R. Reyes, R. Mandelbaum, J.E. Gunn, R. Nakajima, U. Seljak and C.M. Hirata, *Virial-to-optical velocity ratios of local disk galaxies from combined kinematics and galaxy-galaxy lensing*, Mon. Not. Roy. Astron. Soc. **425** (2012) 2610 [arXiv:1110.4107] [INSPIRE].

[45] S. Smee et al., *The Multi-Object, Fiber-Fed Spectrographs for SDSS and the Baryon Oscillation Spectroscopic Survey*, Astron. J. **146** (2013) 32 [arXiv:1208.2233] [INSPIRE].

[46] SDSS-III collaboration, *The Eleventh and Twelfth Data Releases of the Sloan Digital Sky Survey: Final Data from SDSS-III*, Astrophys. J. Suppl. **219** (2015) 12 [arXiv:1501.00963] [INSPIRE].
[47] SDSS collaboration, *The 2.5 m Telescope of the Sloan Digital Sky Survey*, Astron. J. **131** (2006) 2332 [astro-ph/0602326] [INSPIRE].

[48] BOSS collaboration, *The Baryon Oscillation Spectroscopic Survey of SDSS-III*, Astron. J. **145** (2013) 10 [arXiv:1208.0022] [INSPIRE].

[49] SDSS collaboration, *SDSS-III: Massive Spectroscopic Surveys of the Distant Universe, the Milky Way Galaxy, and Extra-Solar Planetary Systems*, Astron. J. **142** (2011) 72 [arXiv:1101.1529] [INSPIRE].

[50] F. Schmidt and D. Jeong, *Cosmic Rulers*, Phys. Rev. D **86** (2012) 083527 [arXiv:1204.3625] [INSPIRE].

[51] A.J. Barber, *The redshift and scale dependence of the cosmic shear signal from numerical simulations*, Mon. Not. Roy. Astron. Soc. **335** (2002) 909 [astro-ph/0108273] [INSPIRE].

[52] E. Krause, T. Eifler and J. Blazek, *The impact of intrinsic alignment on current and future cosmic shear surveys*, Mon. Not. Roy. Astron. Soc. **456** (2016) 207 [arXiv:1506.08730] [INSPIRE].

[53] N.-M. Nguyen, J. Jasche, G. Lavaux and F. Schmidt, *Taking measurements of the kinematic Sunyaev-Zel'dovich effect forward: including uncertainties from velocity reconstruction with forward modeling*, JCAP **12** (2020) 011 [arXiv:2007.13721] [INSPIRE].

[54] D. Blackwell, *Conditional expectation and unbiased sequential estimation*, Ann. Math. Stat. **18** (1947) 105.

[55] C.R. Rao, *Information and the Accuracy Attainable in the Estimation of Statistical Parameters*, Springer New York, New York, U.S.A. (1992), pg. 235.

[56] S. Geman and D. Geman, *Stochastic relaxation, gibbs distributions, and the bayesian restoration of images*, IEEE Trans. Pattern Anal. Machine Intell. **PAMI-6** (1984) 721.

[57] A.E. Gelfand and A.F.M. Smith, *Sampling-based approaches to calculating marginal densities*, J. Am. Stat. Assoc. **85** (1990) 398.

[58] DES collaboration, *Dark energy survey year 3 results: weak lensing shape catalogue*, Mon. Not. Roy. Astron. Soc. **504** (2021) 4312 [arXiv:2011.03408] [INSPIRE].

[59] N.E. Chisari et al., *The impact of baryons on the matter power spectrum from the Horizon-AGN cosmological hydrodynamical simulation*, Mon. Not. Roy. Astron. Soc. **480** (2018) 3962 [arXiv:1801.08559] [INSPIRE].

[60] A. Schneider et al., *Quantifying baryon effects on the matter power spectrum and the weak lensing shear correlation*, JCAP **03** (2019) 020 [arXiv:1810.08629] [INSPIRE].

[61] DES collaboration, *Consistency of cosmic shear analyses in harmonic and real space*, Mon. Not. Roy. Astron. Soc. **503** (2021) 3796 [arXiv:2011.06469] [INSPIRE].

[62] M.C. Fortuna et al., *The halo model as a versatile tool to predict intrinsic alignments*, Mon. Not. Roy. Astron. Soc. **501** (2021) 2983 [arXiv:2003.02700] [INSPIRE].

[63] J. Lee and U.-L. Pen, *The Nonlinear Evolution of Galaxy Intrinsic Alignments*, Astrophys. J. **681** (2008) 798 [arXiv:0707.1690] [INSPIRE].

[64] N. Porqueres, A. Heavens, D. Mortlock and G. Lavaux, *Bayesian forward modelling of cosmic shear data*, Mon. Not. Roy. Astron. Soc. **502** (2021) 3035 [arXiv:2011.07722] [INSPIRE].

[65] P. Fiedorowicz, E. Rozo, S.S. Boruah, C. Chang and M. Gatti, *KaRMMa – kappa reconstruction for mass mapping*, Mon. Not. Roy. Astron. Soc. **512** (2022) 73 [arXiv:2105.14699] [INSPIRE].

[66] M. Tonegawa and T. Okumura, *First Evidence of Intrinsic Alignments of Red Galaxies at $z > 1$: Cross Correlation between CFHTLenS and FastSound Samples*, Astrophys. J. Lett. **924** (2022) L3 [arXiv:2109.14297] [INSPIRE].
[67] N. Porqueres, D.K. Ramanah, J. Jasche and G. Lavaux, *Explicit Bayesian treatment of unknown foreground contaminations in galaxy surveys*, *Astron. Astrophys.* **624** (2019) A115 [arXiv:1812.05113] [INSPIRE].

[68] J. Jasche and G. Lavaux, *Bayesian power-spectrum inference with foreground and target contamination treatment*, *Astron. Astrophys.* **606** (2017) A37 [arXiv:1706.08971] [INSPIRE].

[69] D.K. Ramanah, G. Lavaux, J. Jasche and B.D. Wandelt, *Cosmological inference from Bayesian forward modelling of deep galaxy redshift surveys*, *Astron. Astrophys.* **621** (2019) A69 [arXiv:1808.07496] [INSPIRE].

[70] A. Andrews, J. Jasche, G. Lavaux and F. Schmidt, *Bayesian field-level inference of primordial non-Gaussianity using next-generation galaxy surveys*, [arXiv:2203.08838] [INSPIRE].

[71] N.E. Chisari, C. Dvorkin, F. Schmidt and D. Spergel, *Multitracing Anisotropic Non-Gaussianity with Galaxy Shapes*, *Phys. Rev. D* **94** (2016) 123507 [arXiv:1607.05232] [INSPIRE].

[72] A. Gelman and D.B. Rubin, *Inference from Iterative Simulation Using Multiple Sequences*, *Stat. Sci.* **7** (1992) 457.

[73] F.J. Massey, *The Kolmogorov-Smirnov test for goodness of fit*, *J. Am. Stat. Assoc.* **46** (1951) 68.

[74] S. Kullback and R.A. Leibler, *On Information and Sufficiency*, *Ann. Math. Stat.* **22** (1951) 79.

[75] Student, *The probable error of a mean*, *Biometrika* **6** (1908) 1.