# Euclid Preparation: XL. Impact of magnification on spectroscopic galaxy clustering

G Jelic-Cizmek, F Sorrenti, F Lepori, C Bonvin, S Camera, F.J Castander, R

Durrer, P Fosalba, M Kunz, L Lombriser, et al.

► To cite this version:

G Jelic-Cizmek, F Sorrenti, F Lepori, C Bonvin, S Camera, et al., Euclid Preparation: XL. Impact of magnification on spectroscopic galaxy clustering. Astron.Astrophys., 2024, 685, pp.A167. 10.1051/0004-6361/202348628. [hal-04287587](https://hal.science/hal-04287587v1)

HAL Id: hal-04287587

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

Submitted on 20 Mar 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
# Euclid preparation

## XL. Impact of magnification on spectroscopic galaxy clustering

Euclid Collaboration: G. Jelic-Cizmek¹, F. Sorrenti¹, F. Lepori², C. Bonvin¹, S. Camera³,⁴,⁵, F. J. Castander⁶,⁷, R. Durrer¹, P. Fosalba⁷,⁸, M. Kunz¹, L. Lombriser¹, I. Tutusaus⁹,¹¹, C. Viglione⁷,⁶, Z. Sakr¹⁰,⁹,¹¹, N. Aghanim¹², A. Amara¹³, S. Andreon¹⁴, M. Baldi¹⁵,¹⁶,¹⁷, S. Bardelli¹⁶, C. Bodendorf¹⁸, D. Bonino⁵, E. Branchini¹⁹,²⁰, M. Brescia²¹,²²,²³, J. Brinchmann²⁴, V. Capobianco⁵, C. Carbone²⁵, V. F. Cardone²⁶,²⁷, J. Carretero²⁸,²⁹, S. Casas³⁰, M. Castellano²⁶, S. Cavuoti²²,²³, A. Cimatti³¹, G. Congedo³², C. J. Conselice³³, L. Conversi³⁴,³⁵, Y. Copin³⁶, L. Corcione⁵, F. Courbin³⁷, H. M. Courtois³⁸, M. Cropper³⁹, H. Degaudenzi⁴⁰, A. M. Di Giorgio⁴¹, J. Dinis⁴²,⁴³, F. Dubath⁴⁰, X. Dupac³⁵, S. Dusini⁴⁴, M. Farina⁴¹, S. Farrens⁴⁵, S. Ferriol³⁶, M. Frailis⁴⁶, E. Franceschi¹⁶, M. Fumana²⁵, S. Galeotta⁴⁶, B. Garilli²⁵, B. Gillis³², C. Giocoli¹⁶,⁴⁷, A. Grazian⁴⁸, F. Grupp¹⁸,⁴⁹, S. V. H. Haugan⁵⁰, H. Hoekstra⁵¹, W. Holmes⁵², F. Hormuth⁵³, A. Hornstrup⁵⁴,⁵⁵, K. Jahnke⁵⁶, E. Keihänen⁵⁷, S. Kermiche⁵⁸, A. Kiessling⁵², M. Kilbinger⁵⁹, B. Kubik³⁶, H. Kurki-Suonio⁶⁰,⁶¹, P. B. Lilje⁵⁰, V. Lindholm⁶⁰,⁶¹, I. Lloro⁶², O. Mansutti⁴⁶, O. Marggraf⁶³, K. Markovic⁵², N. Martinet⁶⁴, F. Marulli⁶⁵,¹⁶,¹⁷, R. Massey⁶⁶, E. Medinaceli¹⁶, S. Mei⁶⁷, M. Meneghetti¹⁶,¹⁷, E. Merlin²⁶, G. Meylan³⁷, L. Moscardini⁶⁵,¹⁶,¹⁷, E. Munari⁴⁶, S.-M. Niemi⁶⁸, C. Padilla²⁸, S. Paltani⁴⁰, F. Pasian⁴⁶, K. Pedersen⁶⁹, W. J. Percival⁷⁰,⁷¹,⁷², V. Pettorino⁷³, G. Polenta⁷⁴, M. Poncet⁷⁵, L. A. Popa⁷⁶, F. Raison¹⁸, R. Rebolo⁷⁷,⁷⁸, A. Renzi⁷⁹,⁴⁴, J. Rhodes⁵², G. Riccio²², E. Romelli⁴⁶, M. Roncarelli¹⁶, E. Rossetti¹⁵, R. Saglia⁸⁰,¹⁸, D. Sapone⁸¹, B. Sartoris⁸⁰,⁴⁶, P. Schneider⁶³, T. Schrabback⁸², A. Secroun⁵⁸, G. Seidel⁵⁶, S. Serrano⁷,⁶,⁸³, C. Sirignano⁷⁹,⁴⁴, G. Sirri¹⁷, L. Stanco⁴⁴, J.-L. Starck⁵⁹, C. Surace⁶⁴, P. Tallada-Crespi⁸⁴,²⁹, D. Tavagnacco⁴⁶, A. N. Taylor³², I. Tereno⁴³,⁸⁵, R. Toledo-Moreo⁸⁶, F. Torradeflot²⁹,⁸⁴, E. A. Valentijn⁸⁷, L. Valenziano¹⁶,⁸⁸, T. Vassallo⁸⁰,⁴⁶, A. Veropalumbo¹⁴,²⁰, Y. Wang⁸⁹, J. Weller⁸⁰,¹⁸, G. Zamorani¹⁶, J. Zoubian⁵⁸, E. Zucca¹⁶, A. Biviano⁴⁶,⁹⁰, A. Boucaud⁶⁷, E. Bozzo⁴⁰, C. Colodro-Conde⁷⁷, D. Di Ferdinando¹⁷, J. Graciá-Carpio¹⁸, P. Liebing³⁹, N. Mauri³¹,¹⁷, C. Neissner²⁸,²⁹, V. Scottez⁹¹,⁹², M. Tenti¹⁷, M. Viel⁹⁰,⁴⁶,⁹³,⁹⁴,⁹⁵, M. Wiesmann⁵⁰, Y. Akrami⁹⁶,⁹⁷, V. Allevato²², S. Anselmi⁷⁹,⁴⁴,⁹⁸, C. Baccigalupi⁹³,⁴⁶,⁹⁴,⁹⁰, A. Balaguera-Antolínez⁷⁷,⁷⁸, M. Ballardini⁹⁹,¹⁰⁰,¹⁶, S. Bruton¹⁰¹, C. Burigana¹⁰²,⁸⁸, R. Cabanac⁹, A. Cappi¹⁶,¹⁰³, C. S. Carvalho⁸⁵, G. Castignani⁶⁵,¹⁶, T. Castro⁴⁶,⁹⁴,⁹⁰,⁹⁵, G. Cañas-Herrera⁶⁸,¹⁰⁴, K. C. Chambers¹⁰⁵, A. R. Cooray¹⁰⁶, J. Coupon⁴⁰, S. Davini²⁰, S. de la Torre⁶⁴, G. De Lucia⁴⁶, G. Desprez¹⁰⁷, S. Di Domizio¹⁹,²⁰, H. Dole¹², A. Díaz-Sánchez¹⁰⁸, J. A. Escartin Vigo¹⁸, S. Escoffier⁵⁸, P. G. Ferreira¹⁰⁹, I. Ferrero⁵⁰, F. Finelli¹⁶,⁸⁸, L. Gabarra⁷⁹,⁴⁴, K. Ganga⁶⁷, J. García-Bellido⁹⁶, F. Giacomini¹⁷, G. Gozalias¹¹⁰,⁶⁰, D. Guinet³⁶, H. Hildebrandt¹¹, S. Ilić¹¹²,⁷⁵,⁹, A. Jimenez Muñoz¹¹³, S. Joudaki¹³,⁷⁰,⁷¹, J. J. E. Kajava¹¹⁴,¹¹⁵, V. Kansal¹¹⁶,¹¹⁷, C. C. Kirkpatrick⁵⁷, L. Legrand¹, A. Loureiro¹¹⁸,¹¹⁹, M. Magliocchetti⁴¹, G. Mainetti¹²⁰, R. Maoli¹²¹,²⁶, M. Martinelli²⁶,²⁷, C. J. A. P. Martins¹²²,²⁴, S. Matthew³², M. Maturi¹⁰,¹²³, L. Maurin¹², R. B. Metcalf⁶⁵,¹⁶, M. Migliaccio¹²⁴,¹²⁵, P. Monaco¹²⁶,⁴⁶,⁹⁴,⁹⁰, G. Morgante¹⁶, S. Nadathur¹³, L. Patrizii¹⁷, A. Pezzotta¹⁸, V. Popa⁷⁶, C. Porciani⁶³, D. Potter², M. Pöntinen⁶⁰, P. Reimberg⁹¹, P.-F. Rocci¹², A. G. Sánchez¹⁸, A. Schneider², M. Schultheis¹⁰³, E. Sefusatti⁴⁶,⁹⁰,⁹⁴, M. Sereno¹⁶,¹⁷, A. Silvestri¹⁰⁴, P. Simon⁶³, A. Spurio Mancini³⁹, J. Steinwagner¹⁸, G. Testera²⁰, M. Tewes⁶³, R. Teyssier¹²⁷, S. Toft⁵⁵,¹²⁸, S. Tosi¹⁹,²⁰,¹⁴, A. Troja⁷⁹,⁴⁴, M. Tucci⁴⁰, J. Valiviita⁶⁰,⁶¹, D. Vergani¹⁶, and K. Tanidis¹⁰⁹

*(Affiliations can be found after the references)*

Received 16 November 2023 / Accepted 26 January 2024

## ABSTRACT

In this paper we investigate the impact of lensing magnification on the analysis of Euclid's spectroscopic survey using the multipoles of the two-point correlation function for galaxy clustering. We determine the impact of lensing magnification on cosmological constraints as well as the expected shift in the best-fit parameters if magnification is ignored. We considered two cosmological analyses: (i) a full-shape analysis based on the Λ cold dark matter (CDM) model and its extension $w_0w_a$ CDM and (ii) a model-independent analysis that measures the growth rate of structure in each redshift bin. We adopted two complementary approaches in our forecast: the Fisher matrix formalism and the Markov chain Monte Carlo method. The fiducial values of the local count slope (or magnification bias), which regulates the amplitude of the lensing magnification, have been estimated from the Euclid Flagship simulations. We used linear perturbation theory and modelled the two-point correlation function with the public code *coffe*. For a ΛCDM model, we find that the estimation of cosmological parameters is biased at the level of 0.4–0.7 standard deviations, while for a $w_0w_a$ CDM dynamical dark energy model, lensing magnification has a somewhat smaller impact, with shifts below 0.5 standard deviations. For a model-independent analysis aimed at measuring the growth rate of structure, we find that the estimation of the growth rate is biased by up to 1.2 standard deviations in the highest redshift bin. As a result, lensing magnification cannot be neglected in the spectroscopic survey, especially if we want to determine the growth factor, one of the most promising ways to test general relativity with Euclid. We also find that, by including lensing magnification with a simple template, this shift can be almost entirely eliminated with minimal computational overhead.

**Key words.** cosmological parameters – cosmology: theory – large-scale structure of Universe
# 1. Introduction

The European Space Agency's Euclid satellite mission (Laureijs et al. 2011; Amendola et al. 2018) aims at shedding light on the so-called dark components of the Universe, namely dark matter and dark energy. Dark matter, a mysterious form of matter that does not seem to emit light, yet accounts for more than 80% of the total matter content of the Universe, forms the bulk of the large-scale cosmic structure, upon which galaxies form and evolve. Dark energy is even more elusive, and it is what drives the current accelerated expansion of the Universe, contributing to about 70% of the total cosmic energy budget (see e.g. Bull et al. 2016, for a review of the current concordance cosmological model and the main theoretical challenges it faces). In fact, there is another possible explanation for the effects we ascribe to dark matter and/or dark energy: that the theory we use to analyse the data is incorrect. This approach is called “modified gravity” (e.g. Clifton et al. 2012). Thanks to the extent and exquisite precision of Euclid's data, we shall soon be able to further test general relativity on scales far from the strong-gravity regime, where it has been tested to supreme precision (see e.g. Cardoso & Pani 2019, for a review of the current status).

Euclid will consist of two primary probes: a catalogue of about 30 million galaxies with spectroscopic redshift information, spanning a redshift range between $z = 0.8$ and $z = 1.8$, and a catalogue of 1.5 billion galaxy images with photometric redshifts down to $z = 2$ (see Laureijs et al. 2011; Amendola et al. 2018, for further details on the specifics of the Euclid surveys). One of the main goals of the Euclid spectroscopic survey is to measure the so-called growth rate, which is very sensitive to the theory of gravity (see for example Alam et al. 2017). However, in order to robustly test alternatives to general relativity, it is crucial to take all of the relevant effects into account in the analysis. One effect that has been overlooked in previous forecasts regarding the performance of the Euclid spectroscopic survey is lensing magnification (Matsubara 2004).

The aim of this paper is to investigate whether lensing magnification has to be included in this analysis. It is well known that lensing magnification has to be included in a photometric survey for the correct estimation of cosmological parameters (Duncan et al. 2014; Cardona et al. 2016; Villa et al. 2018; Lorenz et al. 2018; Unruh et al. 2020; Euclid Collaboration 2022; Mahony et al. 2022; Elvin-Poole et al. 2023). However, as the density and redshift space distortion (RSD) contributions are significantly larger in a spectroscopic survey, one might hope that lensing magnification can be neglected in this case. In this paper we show that this is not the case, and that neglecting lensing can shift the inferred cosmological parameters by up to $0.7\sigma$ and can affect the measured growth rate by up to $1\sigma$. We then propose a method for reducing the shifts to an acceptable level. This method consists of adding the lensing magnification signal to the modelling, using fixed cosmological parameters within the $\Lambda$ cold dark matter (CDM). Of course, in this way the lensing magnification is not exactly correct (since we do not know the theory of gravity nor the cosmological parameters), but we show that this is enough to de-bias the analysis, reducing the shifts to less than $0.1\sigma$.

The paper is structured as follows. In the next section, we present the fluctuations of galaxy number counts within linear perturbation theory, concentrating on the redshift-space two-point correlation function (2PCF). In Sect. 3 we present the relevant quantities from the Euclid Flagship simulations used in this work. In Sect. 4 we explain the methods used in our analysis, Fisher matrix and Markov chain Monte Carlo (MCMC). In

Sect. 5 we discuss our results and present the method for de-biasing the analysis, and in Sect. 6 we conclude. Some details and complementary results are presented in the appendices.

In this paper, scalar metric perturbations are described via the gauge-invariant dimensionless Bardeen potentials, $\Phi$ and $\Psi$. In longitudinal gauge the perturbed metric is

$$ds^2 = a^2(\eta) \left[ -(1 + 2\Psi) c^2 d\eta^2 + (1 - 2\Phi) \delta_{ij} dx^i dx^j \right], \quad (1)$$

where we use the Einstein summation convention over repeated indices. Here $a(\eta)$ is the cosmic scale factor evaluated at conformal time $\eta$, and $c$ is the speed of light. In the above, as well as in subsequent equations, a prime denotes the derivative with respect to conformal time, and $\mathcal{H} = a'/a = H_a$ denotes the conformal Hubble parameter. We normalised the scale factor to 1 (i.e. $a_0 = 1$) such that $\mathcal{H}_0 = H_0$.

# 2. Fluctuations of spectroscopic galaxy number counts

## 2.1. Galaxy number counts

An important observable of the Euclid satellite will be the galaxy number counts, that is, the number of galaxies $dN(n, z)$ detected in a given small redshift bin $dz$ around a redshift $z$ and a small solid angle $d\Omega$ around a direction $n$. Expressing $dN(n, z) = n(n, z) dz d\Omega$ in terms of the angular-redshift galaxy density $n(n, z)$ and subtracting the mean,

$$\bar{n}(z) = \frac{1}{4\pi} \int_{\Omega} n(n, z) d\Omega, \quad (2)$$

we define the galaxy number count fluctuation as

$$\Delta(n, z) = \frac{n(n, z) - \bar{n}(z)}{\bar{n}(z)}. \quad (3)$$

This quantity and its power spectra have been calculated at first order in cosmological perturbation theory in Yoo et al. (2009), Yoo (2010), Bonvin & Durrer (2011), Challinor & Lewis (2011), and Jeong et al. (2012). As it is an observable, the result is gauge invariant. It is not simply given by the density fluctuation on the constant redshift hypersurface, but also contains volume distortions. Most notable of those are the radial volume distortion from peculiar velocities, the so-called RSDs (Kaiser 1987), but also the transversal volume distortion due to weak lensing magnification (Matsubara 2004) and the large-scale relativistic effects identified for the first time in the above references. The final formula, including the effect of evolution bias (Challinor & Lewis 2011; Jeong et al. 2012), is given by (Di Dio et al. 2013)

$$\Delta(n, z, m_*) = b \delta + \frac{1}{\mathcal{H}} \partial_r (V \cdot n) \Big|_{r_s} \\ - \frac{2 - 5s}{2r_s} \int_0^{r_s} dr \frac{r_s - r}{r} \Delta_{\Omega}(\Phi + \Psi) + \dots \quad (4)$$

Here $r = r(z)$ is the comoving distance evaluated at redshift $z$, $r_s$ is the comoving distance between the observer and the source, $b = b(z, m_*)$ is the linear bias of galaxies with magnitude below $m_*$, the magnitude limit of the survey, $\delta$ is the gauge-invariant density fluctuation representing the density in comoving gauge, $\partial_r$ is the derivative w.r.t. the comoving distance $r$, $V$ is the velocity of sources in the longitudinal gauge, and $\Delta_{\Omega}$ denotes the angular part of the Laplacian.
The function $s = s(z, m_*)$ is the local count slope needed to determine the magnification bias. The local count slope depends on the magnitude limit $m_*$ of the survey and is given by (see e.g. Challinor & Lewis 2011)

$$s(z, m_*) = \frac{\partial \log_{10} \bar{N}(z, m < m_*)}{\partial m_*} \qquad (5)$$

Here $\bar{N}$ is the cumulative number of objects brighter than the magnitude cut $m_*$ (for a magnitude-limited sample). The first line of Eq. (4) corresponds to the standard terms of density fluctuations and RSDs, and the second line is the lensing magnification, which is the subject of the present paper (see Bonvin & Durrer 2011; Challinor & Lewis 2011; Jeong et al. 2012; Di Dio et al. 2013 for details)<fnref n="1" />. The modelling of magnification in Eqs. (4) and (5) assumes an idealised magnitude-limited sample. On the other hand, realistically the sample selection may also depend on galaxy size, which is also impacted by magnification, or it may be based on a complex colour-magnitude selection. While these additional effects complicate the estimation of an effective local count slope from real data (see e.g. von Wietersheim-Kramsta et al. 2021), our treatment is adequate enough for our forecast. The dots at the end of Eq. (4) stand for the “large-scale relativistic terms” that we omitted in our analysis. These terms are suppressed by factors $\lambda H c^{-1}$, where $\lambda$ is the comoving wavelength of the perturbations (see e.g. Di Dio et al. 2013; Jelic-Cizmek et al. 2021; Euclid Collaboration 2022). It is well known that the large-scale relativistic terms are relevant only at very large scales and do not significantly impact the even multipoles of the correlation function on sub-Hubble scales (Lorenz et al. 2018; Yoo et al. 2009; Bonvin & Durrer 2011). Some of these relativistic terms will, however, be detectable by measuring odd multipoles in the correlation of two different tracers (see Bonvin et al. 2014, 2023; Gaztanaga et al. 2017; Lepori et al. 2020; Beutler & Di Dio 2020; Saga et al. 2022). A detailed study of the signal-to-noise ratio of all relativistic effects in simulated mock catalogues adapted to Euclid's spectroscopic survey will be presented in Euclid Collaboration: Elkhashab et al. (in prep.).

The goal of this paper is to study the impact of lensing magnification on the 2PCF. We note that the impact of lensing magnification on the angular power spectrum, $C_\ell(z_1, z_2)$, has already been computed and found to be relevant for Euclid's photometric sample (Euclid Collaboration 2022). However, the angular power spectrum, $C_\ell(z_1, z_2)$ is not well suited to a survey with spectroscopic resolution of $\delta z \lesssim 10^{-3}$ since we would have to split the redshift interval into more than 1000 bins in order to fully profit from the redshift resolution of a spectroscopic survey. This would not only significantly increase the computational effort, but also lead to large shot noise in the autocorrelation spectra<fnref n="2" />. These are the main reasons that, for spectroscopic surveys, the correlation function is a more promising summary statistic than the angular power spectrum; we therefore need to determine the impact of lensing magnification on this statistic.

## 2.2. The two-point correlation function

In spectroscopic surveys, there are two standard estimators used to extract information from galaxy number counts: the 2PCF, and its Fourier transform, the power spectrum. In this paper, we concentrate on the correlation function, since lensing magnification can be included in this estimator in a straightforward way. This is not the case for the power spectrum, which requires non-trivial extensions to account for magnification (see e.g. Grimm et al. 2020; Castorina & di Dio 2022).

The 2PCF can be calculated in the curved-sky, that is, without assuming that the two directions $n$ and $n'$ are parallel:

$$\xi(n, z, n', z') = \langle \Delta(n, z) \Delta(n', z') \rangle. \qquad (6)$$

The curved-sky density and RSD contributions were first derived in Szalay et al. (1998) and Szapudi (2004). This method, which can be straightforwardly applied to any local contribution of $\Delta(n, z)$, cannot be used to calculate contributions from integrated effects like lensing magnification, which is the main subject of this work. The magnification contribution was calculated in Tansella et al. (2018a) using an alternative method proposed in Campagne et al. (2017). The detailed expressions for all contributions can be found in Tansella et al. (2018a); for completeness, we repeat them in Appendix E.1. The expressions for the 2PCF significantly simplify in the flat-sky approximation: in this approximation, one assumes that the two directions $n$ and $n'$ are parallel, and one neglects the redshift evolution of $\Delta$. In this case, the density and RSD contributions (hereafter called standard terms) in a “thick” redshift bin with mean redshift $\bar{z}$ take the following simple form:

$$\xi^{\text{std}}(d, \bar{z}, \mu) = \xi_{0}^{\text{std}}(d, \bar{z}) + \xi_{2}^{\text{std}}(d, \bar{z})L_{2}(\mu) + \xi_{4}^{\text{std}}(d, \bar{z})L_{4}(\mu), \qquad (7)$$

where $d$ denotes the comoving separation between the correlated volume elements or “voxels”, $\bar{z}$ is the centre of the bin interval in which the correlation function is measured, $\mu$ is the cosine of the angle between the direction of observation $n$ and the vector connecting the voxels, and $L_\ell$ denotes the Legendre polynomial of order $\ell$. The standard multipoles, $\xi_\ell^{\text{std}}$, are given by the well-known expressions

$$\xi_0^{\text{std}}(d, \bar{z}) = \left[ b^2(\bar{z}) + \frac{2}{3}b(\bar{z})f(\bar{z}) + \frac{1}{5}f^2(\bar{z}) \right] \mu_0(d, \bar{z}), \\ \xi_2^{\text{std}}(d, \bar{z}) = -\left[ \frac{4}{3}f(\bar{z})b(\bar{z}) + \frac{4}{7}f^2(\bar{z}) \right] \mu_2(d, \bar{z}), \\ \xi_4^{\text{std}}(d, \bar{z}) = \frac{8}{35}f^2(\bar{z}) \mu_4(d, \bar{z}), \qquad (8)$$

where

$$f(\bar{z}) := \frac{d \ln \delta}{d \ln a}, \qquad (9)$$

is the growth rate of structure. The functions $\mu_\ell(d, \bar{z})$ are given by

$$\mu_{\ell}(d, \bar{z}) = \frac{1}{2\pi^2} \int_{0}^{\infty} dk \, k^2 P_{\delta\delta}(k, \bar{z}) j_{\ell}(kd), \qquad (10)$$

where $j_\ell$ denotes the spherical Bessel function of order $\ell$, and $P_{\delta\delta}(k, \bar{z})$ is the linear matter power spectrum in the comoving gauge. We see that, in the flat-sky approximation, density and RSD are fully encoded in the first three even multipoles. The expressions for computing higher-order multipoles without using the flat-sky approximation can be found in Appendix E.1.

<footnote n="1">¹ Note that to obtain Eq. (4) we assume that galaxies obey the Euler equation, i.e. that dark matter does not interact and exchange energy or momentum with other constituents (Bonvin & Fleury 2018), but we have not used Einstein's equations.</footnote>

<footnote n="2">² While there are methods that address this issue (see for instance Camera et al. 2018), we do not make use of them in this paper.</footnote>
The magnification contribution can also be simplified using the flat-sky approximation and the Limber approximation. This has been derived in detail in Tansella et al. (2018a). It contains an infinite series of multipoles,

$$ \xi^{\text{magn}}(d, \bar{z}, \mu) = \sum_{\ell} \xi_{\ell}^{\text{magn}}(d, \bar{z}) L_{\ell}(\mu), \quad (11) $$

with

$$ \xi_{\ell}^{\text{magn}}(d, \bar{z}) = \frac{2\ell + 1}{2} \left\{ \frac{3\Omega_{\text{m},0}}{2\pi} (1 + \bar{z}) b(\bar{z}) (5s - 2) d \int_{0}^{1} d\mu \, \mu L_{\ell}(\mu) \right. \\ \times \int_{0}^{\infty} dk_{\perp} \, k_{\perp} \frac{H_{0}^{2}}{c^{2}} P_{\delta\delta}(k_{\perp}, \bar{z}) J_{0}\left(k_{\perp} d \sqrt{1 - \mu^{2}}\right) \quad (12) \\ + \frac{9\Omega_{\text{m},0}^{2}}{4\pi} (5s - 2)^{2} \int_{0}^{\bar{r}} dr' \frac{(\bar{r} - r')^{2} r'^{2}}{\bar{r}^{2} a^{2}(r')} \int_{0}^{1} d\mu \, L_{\ell}(\mu) \\ \left. \times \int_{0}^{\infty} dk_{\perp} \, k_{\perp} \frac{H_{0}^{4}}{c^{4}} P_{\delta\delta}(k_{\perp}, z(r')) J_{0}\left(k_{\perp} \frac{r'}{\bar{r}} d \sqrt{1 - \mu^{2}}\right) \right\} $$

Here $H_0 = 100 h \text{ km s}^{-1} \text{ Mpc}^{-1}$, $k_{\perp} = k - k\mu n$ is the projection of the Fourier space wavevector $k$ to the direction normal to $n$, and $J_0$ denotes the Bessel function of zeroth order. The first two lines of Eq. (12) contain the density–magnification correlation: when computing the multipoles, one averages over all orientations of the pair of voxels. For each orientation, the galaxy that is farther away is lensed by the one in the foreground. This effect clearly has a non-trivial dependence on the orientation angle, $\mu$, which enters in the argument of the Bessel function $J_0$. The last two lines contain the magnification–magnification correlation, due to the fact that both galaxies are lensed by the same foreground inhomogeneities. In all the terms, the functions are evaluated at the mean redshift of the bin $\bar{z}$, $\bar{r}$ denotes the comoving distance at that redshift, and $a(r)$ denotes the scale factor evaluated at comoving distance $r$. For completeness, in Appendix E.2 we list the semi-analytic expressions that allowed us to efficiently evaluate the flat-sky magnification terms.

In Fig. 1 we show a comparison between the curved-sky expression and the flat-sky approximation for the standard multipoles (left panel) and the magnification multipoles (right panel), in one of the redshift bins of Euclid, $\bar{z} = 1.4$. We checked that most of the constraining power comes from standard terms of the monopole and quadrupole below $d = 150 \text{ Mpc}$, where the difference between the curved-sky and the flat-sky expressions is less than 0.2% (it reaches 0.7% for the hexadecapole). Similar results are obtained for the other redshift bins; hence, using the flat-sky approximation is very well justified. For the magnification contribution to the monopole, we see that the flat-sky approximation differs from the curved-sky result already at small separation by roughly 5%. However, since the magnification is a sub-dominant contamination to the total signal, a 5% error is perfectly acceptable. We note that the difference between curved-sky and flat-sky actually increases for small separations; as shown in Jelic-Cizmek (2021), this can occur when the dominant contribution to the multipoles is the density-lensing term, for which the accuracy of the flat-sky approximation becomes progressively worse at smaller scales.

In Fig. 2 we compare the 2PCF with and without lensing magnification. On small scales, lensing magnification is not very important. However, for scales of more than 300 Mpc it can contribute up to 20% to the monopole and the quadrupole and up to 50% or more to the hexadecapole. We see that the further apart the galaxies are, the more significant is the contribution from lensing magnification to their correlation. This is due to

<figure><img src="image_2.png" /><figcaption>Fig. 1. Impact of the flat-sky approximation on the multipoles of the 2PCF. Top: Curved-sky (solid) vs. flat-sky (dashed) multipoles, with contributions from standard terms (left) and from just lensing magnification (right). Lensing magnification is computed using the values of the local count slope given in Table 2, which are the fiducial values assumed in our analysis. Bottom: Their relative difference in percent, taking the curved-sky case as the reference value.</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>Fig. 2. Impact of magnification on the multipoles of the 2PCF. Top: Comparison of multipoles without (solid) and with (dashed) lensing magnification. Bottom: Their relative difference in percent, taking the case with magnification as the reference value.</figcaption></figure>

the fact that the density correlations quickly decrease with separation, while the lensing magnification correlations do not. The magnification–magnification correlations are indeed integrated all the way from the sources to the observer, and therefore contain contributions from small scales, when the two lines of sight are close to the observer.

We next assessed the impact of these multipoles on the analysis of data from Euclid. In particular, we determined the following: first, if the contribution from magnification can improve our measurement of cosmological parameters; and second, to what extent neglecting magnification in the analysis will shift the best-fit value of the parameters, consequently biasing the analysis.
We considered two cases. In the first case, we fixed the cosmological model, and we studied how magnification impacts the parameters of this model. For this case, we studied two models: a minimal ΛCDM model and a dynamical dark energy model. In the second case, we performed a model-independent analysis, that is, we rewrote the standard multipoles in terms of the power spectrum at $z_*$, using that $P_{\delta\delta}(\bar{z}) = P_{\delta\delta}(z_*)\sigma_8^2(\bar{z})/\sigma_8^2(z_*)$. We chose $z_*$ to be well within in the matter-dominated era before acceleration started. We assumed that, at $z_*$, general relativity is valid, and that the power spectrum is therefore fully determined by the early Universe parameters that have been measured by the cosmic microwave background (CMB). With this, the functions $\mu_\ell$ depend only on the power spectrum at $z_*$, while the evolution from $z_*$ to $\bar{z}$ is fully encoded in two functions:

$$ \tilde{f}(\bar{z}) = f(\bar{z}) \sigma_8(\bar{z}) \quad \text{and} \quad \tilde{b}(\bar{z}) = b(\bar{z}) \sigma_8(\bar{z}). \qquad (13) $$

We obtained the multipoles of the standard terms:

$$ \begin{aligned} \xi_0^{\text{std}}(d, \bar{z}) &= \left[ \tilde{b}^2(\bar{z}) + \frac{2}{3}\tilde{b}(\bar{z})\tilde{f}(\bar{z}) + \frac{1}{5}\tilde{f}^2(\bar{z}) \right] \frac{\mu_0(d, z_*)}{\sigma_8^2(z_*)}, \\ \xi_2^{\text{std}}(d, \bar{z}) &= -\left[ \frac{4}{3}\tilde{f}(\bar{z})\tilde{b}(\bar{z}) + \frac{4}{7}\tilde{f}^2(\bar{z}) \right] \frac{\mu_2(d, z_*)}{\sigma_8^2(z_*)}, \\ \xi_4^{\text{std}}(d, \bar{z}) &= \frac{8}{35}\tilde{f}^2(\bar{z}) \frac{\mu_4(d, z_*)}{\sigma_8^2(z_*)}. \end{aligned} \qquad (14) $$

In this case, the functions $\mu_\ell(d, z_*)$ are considered fixed since they are very well determined by CMB measurements, and the functions $\tilde{f}$ and $\tilde{b}$ are two free functions that depend on the mean redshift $\bar{z}$ of the bins (see also Jelic-Cizmek et al. 2021 for an introduction of this method). These two free functions fully encode any deviations from general relativity at late time. The only approximation that enters here is that we neglected the $k$ dependence of the growth of density, meaning that $\sigma_8$ and $f$ depend only on redshift. This assumption can easily be relaxed: it slightly complicates the analysis, since $\tilde{f}$ and $\tilde{b}$ would have to be taken inside the integrals in Eq. (10), but it does not change the procedure.

This model-independent analysis is one of the key goals of the Euclid spectroscopic survey. It is very powerful, since it allows us to measure the growth rate of structure without assuming a particular model of gravity or dark energy. This growth rate can then be compared with the predictions of any model beyond ΛCDM. In the following, we determined how neglecting magnification in the analysis could shift the best-fit values of $\tilde{b}$ and $\tilde{f}$ in each redshift bin. We note that here for simplicity we fixed the cosmological parameters that determine the functions $\mu_\ell$ at early time, $z_*$, to their fiducial value extracted from Planck data (Planck Collaboration XIV 2016). In practice, one can also let these parameters vary and perform a combined analysis with CMB data.

It is worth mentioning that, by construction, the analysis using multipoles of the correlation function does not account for correlations between different redshift bins: the correlation function is averaged over directions within a given bin, and each redshift bin is considered to be independent. However, the main motivation of measuring the multipoles of the correlation function is to extract the growth rate $f$, which is encoded in the peculiar velocities of galaxies within linear perturbation theory. Moreover, since the correlations of peculiar velocities quickly decrease with separation, one does not lose a significant amount of information by neglecting cross-correlation between bins. The situation is of course different for magnification, which, as it is an integral along the line of sight, is strongly correlated

<figure><img src="image_4.png" /><figcaption>Fig. 3. Galaxy bias (top panel) and the local count slope (lower panel) with linear interpolation (dashed), as used in our analysis, along with their associated error bars, as well as a polynomial fit (solid). For the exact numerical values of the coefficients, refer to Eq. (B.3).</figcaption></figure>

between different bins. Therefore, we expect that neglecting cross-correlations of different bins will strongly reduce the magnification signal, compared to the angular power spectra used in the analysis of the photometric sample, which is able to account for correlations between the bins (Euclid Collaboration 2022). As such, the shift induced by neglecting lensing magnification is expected to be smaller in the spectroscopic analysis than in the photometric one.

### 3. Euclid specifics from the Flagship simulation

In order to calculate the linear galaxy bias and local count slope observables for this analysis, which we employed as our fiducial values for the Fisher and MCMC analyses, we used Flagship v1.8.4 galaxy mock samples, whose redshift distribution of the number density, $N(z)$, is split into 13 equally spaced bins (in redshift), between $z = 0.9$ and $z = 1.8$, in real space. As we see from Fig. 3, this allowed us to accurately capture the redshift evolution of the bias and the local count slope, while still having enough galaxies in each bin to obtain a precise measurement. We imposed a cut in the $H\alpha$ flux $F_{H\alpha}$ (in units of erg s$^{-1}$ cm$^{-2}$), $\log_{10}[F_{H\alpha}/(1 \text{ erg s}^{-1} \text{ cm}^{-2})] > -15.7$, that can be transformed to the corresponding AB magnitude limit, $m_* = m_{AB} < -15.75^3$. The linear galaxy bias and local count slope, estimated from the Flagship simulation as described in this section, are assumed in our analysis to be the “true” values for the Euclid spectroscopic sample, and we used them throughout the paper as fiducial values.

#### 3.1. Linear galaxy bias

The linear galaxy bias is obtained by fitting the curved-sky angular power spectrum of the data to the corresponding fiducial prediction for $N(z)$ in each redshift bin. The angular power spectrum is extracted using Polspice<fnref n="4" /> with a mask to

<footnote n="3">³ We note that the $N(z)$ include survey specific effects, such as purity and completeness, following the pipeline of the Flagship Image Simulations. We have observed that not considering these two systematics can affect the linear galaxy bias value up to a 5% depending on the redshift, while the magnification bias is not significantly affected by this.</footnote>

<footnote n="4">⁴ http://www2.iap.fr/users/hivon/software/PolSpice/</footnote>
<table><caption>**Table 1.** Fiducial values of the cosmological parameters.</caption><thead><tr><th>Ω<sub>m,0</sub></th><th>Ω<sub>b,0</sub></th><th>σ<sub>8</sub></th><th>n<sub>s</sub></th><th>h</th><th>w<sub>0</sub></th><th>w<sub>a</sub></th></tr></thead><tbody><tr><td>0.319</td><td>0.049</td><td>0.83</td><td>0.96</td><td>0.67</td><td>-1</td><td>0</td></tr></tbody></table>

generate 100 jackknife regions that we used to calculate the covariance matrix. This masked region corresponds to the area of the sky that the Cosmohub's Flagship v1.8.4 release (Tallada et al. 2020; Carretero et al. 2017) does not cover, which corresponds to seven-eighths of the total sky. The mask is also generated with Polspice by masking the pixels outside the region 0° < RA < 90° and 0° < Dec < 90°. Then when considering the jackknife regions, we used a k-means clustering algorithm to select 100 regions with roughly the same number of pixels (since each HEALPix<fnref n="5" /> pixel covers the same sky area) inside the unmasked region. For each jackknife resampling, we included in the mask the pixels of a different region in order to exclude it from that jackknife iteration $C_l$ calculation. The prediction is determined using CCL<fnref n="6" /> (Chisari et al. 2019) with the fiducial cosmological parameter values being those used in the Flagship v1.8.4 simulation (see Table 1). The linear scales considered range from $l = 50$ to an $l_{max}$ that increases as we go to higher redshifts (as the effective non-linear galaxy bias scale shifts to higher multipoles, i.e. smaller angular scales), starting at $l_{max} \sim 300$ for $z = 0.9$ to $l_{max} \sim 500$ for $z = 1.8$. Since CCL does not yet allow us to perform calculations without the Limber approximation, we employed it for all of the scales used to estimate the linear galaxy bias. We set the minimum multipole to $l = 50$, which is a rather conservative limit in order to avoid large Limber approximation deviations from the theory at any redshift considered for this analysis. On top of that, scales with $l < 50$ usually have very high error bars due to sample variance so they can be ignored since their statistical weight to estimate the galaxy bias is very low. The maximum scale for each redshift is estimated by comparing the relative ratio between the linear and non-linear matter power spectrum prediction and setting a maximum relative difference of 3%. This maximum difference should be good enough since galaxy clustering is known to follow linear predictions down to smaller scales than dark matter. At the scales used, the Limber approximation adds up to a 4% variation of the predicted angular power spectrum, which translates into an error below 2% on the galaxy bias estimation. The $\chi^2$ distribution is then calculated for different values of the galaxy bias in relation to the square ratio of the data $C_l$'s to the prediction $C_l$'s using only the diagonal values of the jackknife covariance matrix. We estimated the linear galaxy bias as the minimum value of the $\chi^2$ distribution, and we set the error to the $1\sigma$ variance.

## 3.2. Local count slope

To measure the local count slope from the Flagship catalogues, we computed, in each of the 13 redshift bins, the cumulative number of galaxies $\bar{N}(z, m < m_*)$ at the magnitude limits $m_*$ and $m_* \pm 0.04$, and we computed the logarithmic derivative to obtain $s(z, m_*)$ through Eq. (5). We also generated 100 jackknife regions in order to calculate the variance of the results. In Fig. 3, we see that $s$ increases with redshift; this is due to the fact that a fixed apparent magnitude threshold, $m_*$, corresponds to a larger intrinsic luminosity threshold $L_*$ at high redshift than at low redshift.

This is due to the fact that the slope in $m$ of the Schechter luminosity function, which is assumed here, increases with redshift.

# 4. Method

This study employed two complementary approaches for forecasting the constraining capabilities of future Euclid data: the Fisher matrix formalism and the MCMC method. The details of each approach are outlined in Sects. 4.1, 4.2, and 4.3, respectively. We used the code *coffe*<fnref n="7" />, which has been validated against the code *CosmoBolognaLib*<fnref n="8" /> (for details of the validation, see Appendix A), to compute the multipoles of the 2PCF.

## 4.1. The Fisher matrix formalism: Cosmological constraints

The Fisher matrix can be defined as the expectation value of the second derivatives of the logarithm of the likelihood under study with respect to the parameters of the model (see e.g. Tegmark 1997):

$$F_{\alpha\beta} = \left\langle -\frac{\partial^2 \ln \mathcal{L}}{\partial \theta_{\alpha} \partial \theta_{\beta}} \right\rangle, \qquad (15)$$

where $\alpha$ and $\beta$ label two model parameters $\theta_\alpha$ and $\theta_\beta$.

In the particular case of Gaussian-distributed data, the Fisher matrix is given by

$$F_{\alpha\beta} = \frac{1}{2} \mathrm{Tr} \left[ \frac{\partial \mathcal{L}}{\partial \theta_{\alpha}} C^{-1} \frac{\partial \mathcal{L}}{\partial \theta_{\beta}} C^{-1} \right] + \sum_{pq} \frac{\partial \mathcal{D}_p}{\partial \theta_{\alpha}} (C^{-1})_{pq} \frac{\partial \mathcal{D}_q}{\partial \theta_{\beta}}, \qquad (16)$$

where $\mathcal{D}$ represents the mean of the data vector and $C$ is the covariance matrix of the data. The trace, Tr, and the sum over the indexes, $p$ and $q$, stand for the summation over the different elements of the data vector.

In the present analysis we considered the 2PCF as our main observable. Given the set of model parameters $\{\theta_\alpha\}$, the Fisher matrix for the multipoles of the 2PCF measured in a bin centred in $\bar{z}_i$ is

$$F_{\alpha\beta}^{\mathrm{bin}}(\bar{z}_i) = \sum_{jk} \sum_{\ell m} \frac{\partial \xi_{\ell}(d_j, \bar{z}_i)}{\partial \theta_{\alpha}} C^{-1} [\xi_{\ell}^j, \xi_m^k](\bar{z}_i) \frac{\partial \xi_m(d_k, \bar{z}_i)}{\partial \theta_{\beta}}, \qquad (17)$$

where the sum runs over the voxel separations $\{d_j, d_k\}$ as well as the even multipoles $\ell, m = 0, 2, 4$ and $\xi_{\ell}^j \equiv \xi_{\ell}(d_j)$. We note that (angular) power spectra observables follow a Wishart distribution if fluctuations are Gaussian. In this case, the Fisher analysis gives a better approximation if we consider only the second term in Eq. (16) (see e.g. Carron 2013; Bellomo et al. 2020). In the following we assume that the same is true for the multipoles of the correlation function. The binned covariance of the 2PCF multipoles at mean redshift $\bar{z}_i$, denoted with $\mathcal{C}$, is computed following the Gaussian theoretical model described in Grieb et al. (2016) and Hall & Bonvin (2017). The cosmic variance contribution includes only the density and RSDs, while magnification is neglected. This is a good approximation, since the covariance is a four-point function, which contains a sum over all possible separations between pairs of pixels. Hence, even at a large separation, the covariance is dominated by correlations at

<footnote n="5">⁵ https://healpix.sourceforge.io/</footnote>

<footnote n="6">⁶ https://github.com/LSSTDESC/CCL</footnote>

<footnote n="7">⁷ Available at https://github.com/JCGoran/coffe</footnote>

<footnote n="8">⁸ Available at https://github.com/federicomarulli/CosmoBolognaLib. In this work, we use git revision 7f08f470e0 of the code.</footnote>
small scales, where the density and RSD strongly dominate over magnification. The shot noise contribution is estimated from the number densities reported in Euclid Collaboration (2020; henceforth referred to as EP:VII), Table 3. The full expression for the covariance can be found in Appendix C.

Following EP:VII, we neglected the cross-correlations between redshift bins. Thus, the full Fisher matrix is

$$F_{\alpha\beta} = \sum_{\bar{z}_i} F_{\alpha\beta}^{\text{bin}}(\bar{z}_i). \qquad (18)$$

This approximation is justified by the high precision of spectroscopic redshift estimates, which leads to essentially no overlap between redshift bins. In the case of a photometric analysis, cross-correlations between different bins can provide significant information (see e.g. Tutusaus et al. 2020; Euclid Collaboration 2022). The marginalised 1σ errors on the cosmological parameters can then be estimated from the Cramér–Rao bound:

$$\sigma_{\alpha} = \sqrt{(F^{-1})_{\alpha\alpha}}. \qquad (19)$$

It is important to mention that, although the Fisher matrix formalism is a powerful forecasting tool, some limitations do exist. A Fisher forecast uses a Gaussian approximation by construction, which can differ from the true posterior if the data are not constraining enough. Furthermore, the signal and covariance may have a strong non-linear dependence on the parameters {$\theta_{\alpha}$}, in which case the Fisher matrix does not capture all of the information about the likelihood. In order to validate the results of our Fisher formalism, we also performed, for one of the cases, a MCMC analysis to properly sample the posterior of the parameters (see Sect. 4.3). As we will see, we find that the relevance of lensing magnification is well captured by a Fisher forecast. Another drawback of the Fisher formalism worth mentioning is that it only provides forecast uncertainties around a fiducial model. In this analysis we are also interested in the bias on the posteriors because of wrong model assumptions (neglecting magnification). The standard Fisher formalism prevents us from doing this study, but extensions to the formalism can be considered, as described in Sect. 4.2. All Fisher forecasts were computed with the Python package FITK<fnref n="9" />.

## 4.2. The Fisher matrix formalism: Bias on parameter estimation

The Fisher matrix formalism described above allows us to quantify the gain or loss in constraining power, when magnification is included in the theoretical model for the observed multipoles of the 2PCF. This study can be carried out by simply comparing the Fisher matrix in Eq. (18) and the corresponding marginalised constraints when magnification is neglected or included in the analysis.

Another, actually more important question to address is whether neglecting magnification leads to significant biases (shifts) in the inferred cosmological parameters. In order to answer this question, we followed the approach described in, for example, Taylor et al. (2007) and widely adopted in the literature (see Kitching et al. 2009; Camera et al. 2015; Di Dio et al. 2016; Cardona et al. 2016; Lepori et al. 2020; Jelic-Cizmek et al. 2021; Euclid Collaboration 2022). We extended the parameter space to include the amplitude of magnification, $\epsilon_L$. We can explicitly write the dependence of our model on $\epsilon_L$ as follows:

$$\xi_{\ell}(d_j, \bar{z}_i) = \xi_{\ell}^{\text{std}}(d_j, \bar{z}_i) + \epsilon_L \xi_{\ell}^{\text{magn}}(d_j, \bar{z}_i), \qquad (20)$$

where $\xi_{\ell}^{\text{std}}$ represents the standard contributions of density and RSDs, and $\xi_{\ell}^{\text{magn}}$ is the magnification contribution, which includes the terms magnification × magnification and the cross-correlation of magnification with density and the RSD. The amplitude $\epsilon_L$ is not a free parameter but rather a fixed one that is set to either 0 (in a “wrong” model that neglects magnification) or 1 (in a “correct” model that consistently includes magnification). The “wrong” and “correct” models share a common set of parameters, {$\theta_{\alpha}$}, and their estimation will be biased in the wrong model as a result of the shift in the fixed parameter $\epsilon_L$. Using a Taylor expansion of the likelihood around the wrong model, and truncating the series at the linear order, we obtain the following formula for the biases:

$$\Delta(\theta_{\alpha}) = \sum_{\beta} (F^{-1})_{\alpha\beta} B_{\beta}, \qquad (21)$$

where F is the Fisher matrix of the common set of parameters evaluated for the wrong model, and

$$B_{\beta} = \sum_{i} \sum_{j} \sum_{m} \xi_{\ell}^{\text{magn}}(d_j, \bar{z}_i) C^{-1} [\xi_{\ell}^j, \xi_m^k](\bar{z}_i) \frac{\partial \xi_{\ell}^{\text{std}}(d_k, \bar{z}_i)}{\partial \theta_{\beta}}. \qquad (22)$$

Equation (22) implicitly assumes that magnification constitutes a small contribution to the observable; therefore, the outcome can be quantitatively trusted only when small values of the biases are found. Nevertheless, large biases are a clear indication that the lensing magnification significantly contributes to the observable and that the starting hypothesis should be rejected. Therefore, it is a good diagnostic to assess whether magnification can be neglected or should be modelled in the analysis.

## 4.3. Markov chain Monte Carlo

The MCMC method is a standard statistical technique with which we numerically sample the posterior probability starting from a prior probability and assuming a likelihood function (the probability of the data given the hypothesis). An excellent description of the method can be found in Verde (2007).

In our analysis, under the assumption that our data are Gaussian, we sampled the posterior of the following likelihood:

$$\ln(\mathcal{L}) = -\frac{1}{2} \Delta\xi^T C^{-1} \Delta\xi, \qquad (23)$$

where C is the covariance matrix, and $\Delta\xi$ is a vector whose elements are given by

$$\Delta\xi_{[\ell, i, j]} = \xi_{\ell}(d_j, \bar{z}_i)^{\text{ref}} - \xi_{\ell}(d_j, \bar{z}_i), \qquad (24)$$

where the first term is part of a synthetic dataset computed previously used as our “reference” or “fiducial model”, while the second term is computed at each steps of the MCMC, varying the value of free parameters inside the parameters space described by the prior function. To simplify the analysis, we neglected the dependence of the covariance matrix on cosmological parameters, which we fixed to their reference values.

We assumed a flat prior density for each parameter. In order to speed up the convergence of our chains, we assumed as free parameters (with flat priors) $\omega_{m,0}$ and $\omega_{b,0}$ instead of $\Omega_{m,0}$ and $\Omega_{b,0}$, and subsequently re-parametrised the chain using the relation $\omega_{i,0} = \Omega_{i,0}h^2$.

We used the Python package emcee<fnref n="10" /> (Foreman-Mackey et al. 2013) to implement the MCMC. Our sampler was composed of 32 walkers, and we used the “stretch move” ensemble

<footnote n="9">⁹ Available at https://github.com/JCGoran/fitk</footnote>

<footnote n="10">¹⁰ Available at https://github.com/dfm/emcee</footnote>
method described in Goodman & Weare (2010). Each walker generates a chain with a number of steps of the order $10^5$ before converging. Our MCMC code is run in parallel using the Python package schwimmbad (Price-Whelan & Foreman-Mackey 2017).

In our analysis we also discarded a number of points as burn-in, given by twice the maximal integrated auto-correlation time, $\tau$, of all the parameters (Goodman & Weare 2010)<fnref n="11" />. The results of the sampling were then analysed with the Python package GetDist (Lewis 2019).

## 5. Results

We assessed the impact of neglecting magnification for three different cases: a minimal $\Lambda$CDM model, a dynamical dark energy model, and a model-independent analysis measuring the bias and growth rate. For each case, we computed the change in the constraints due to including magnification and the shift in the parameters due to neglecting magnification.

To be consistent with the Flagship simulation, the fiducial cosmology adopted in our analysis is a flat $\Lambda$CDM model with no massive neutrino species. The set of parameters varied in the analysis comprises: the present matter and baryon density parameters, respectively $\Omega_{m,0}$ and $\Omega_{b,0}$; the dimensionless Hubble parameter $h$; the amplitude of the linear density fluctuations within a sphere of radius $8h^{-1}$ Mpc at present time, $\sigma_8$; the spectral index of the primordial matter power spectrum $n_s$; and the equation of state for the dark energy component $\{w_0, w_a\}$, which parametrise the time evolution of the dark energy equation of state parameter as

$$w(z) = w_0 + w_a \frac{z}{1+z} \qquad (25)$$

This model is also known as Chevallier-Polarski-Linder parametrisation (Chevallier & Polarski 2001; Linder 2003). The fiducial values of the cosmological parameters used in the analysis are reported in Table 1. They correspond to the $w_0w_a$CDM parameters used in the Euclid Flagship simulation (see Sect. 3).

In addition to these cosmological parameters, we introduced nuisance parameters and marginalised over them; in particular, the linear galaxy bias in each redshift bin, $\{b_i\}$, $i = 1, \dots, N_{\text{bins}}$, are included as nuisance parameters. We modelled them as constant within each redshift bin, and we estimated their fiducial values using the Flagship simulation, v1.8.4, as described in Sect. 3. We list the values of the nuisance parameters used in each redshift bin as well as the expected density of emitters in Table 2. The impact of magnification on the cosmological parameters may depend on the model chosen to describe our Universe. We therefore run our analysis for two different cosmological models and comment on the difference between the results when relevant. We considered (i) a minimal flat $\Lambda$CDM model with five free parameters, $\{\Omega_{m,0}, \Omega_{b,0}, h, n_s, \sigma_8\}$ plus nuisance parameters., and (ii) a flat dynamical dark energy model with seven free parameters, $\{\Omega_{m,0}, \Omega_{b,0}, w_0, w_a, h, n_s, \sigma_8\}$ plus nuisance parameters.

We also included a cosmology-independent analysis, where as free parameters we considered the modified galaxy bias and the modified growth rate in each redshift bin, $\tilde{f}(z)$ and $\tilde{b}(z)$, defined in Eq. (13). To be conservative, as well as to reduce the impact of non-linearities, we only considered separations between $d_{\text{min}} = 40$ Mpc and $d_{\text{max}} = 385$ Mpc in each redshift

<table><caption>**Table 2.** Expected number density of observed $H\alpha$ emitters for the Euclid spectroscopic survey, extracted from the Flagship simulation in each redshift bin.</caption><thead><tr><th>z<sub>min</sub></th><th>z<sub>max</sub></th><th>N(\bar{z}) [h<sup>3</sup> Mpc<sup>-3</sup>]</th><th>V<sub>s</sub>(\bar{z}) [h<sup>-3</sup> Gpc<sup>3</sup>]</th><th>b(\bar{z})</th><th>s(\bar{z})</th></tr></thead><tbody><tr><td>0.90</td><td>1.10</td><td>4.71 &times; 10<sup>-4</sup></td><td>7.94</td><td>1.441</td><td>0.79</td></tr><tr><td>1.10</td><td>1.30</td><td>3.75 &times; 10<sup>-4</sup></td><td>9.15</td><td>1.643</td><td>0.87</td></tr><tr><td>1.30</td><td>1.50</td><td>2.90 &times; 10<sup>-4</sup></td><td>10.05</td><td>1.862</td><td>0.96</td></tr><tr><td>1.50</td><td>1.80</td><td>2.01 &times; 10<sup>-4</sup></td><td>16.22</td><td>2.078</td><td>0.98</td></tr></tbody></table>

**Notes.** The first two columns show the minimum, $z_{\text{min}}$, and maximum, $z_{\text{max}}$, redshift of each bin. The third column shows the comoving number density of sources, $N(z)$; the fourth column lists the total comoving volume of the redshift bin. The last two columns respectively denote the linear galaxy bias and the local count slope of the sources, evaluated at the mean redshift. The values of the biases have been obtained by performing a cubic interpolation (using the SciPy Python package, described in Virtanen et al. 2020) on the data described in Sect. 3.

<figure><img src="image_5.png" /><figcaption>**Fig. 4.** S/N of the lensing magnification for two different scenarios, with $d_{\text{min}} = 40$ Mpc. The horizontal bars denote the widths of the redshift bins.</figcaption></figure>

bin, and, unless specified otherwise, multipoles $\ell \in \{0, 2, 4\}$. We used voxels of size $L_p = 5$ Mpc. We checked that reducing them further to 2.5 Mpc does not improve the constraints anymore, due to shot noise, which saturates the signal-to-noise ratio for too small voxel sizes.

### 5.1. Lensing magnification signal-to-noise

As an estimate of the impact of lensing magnification, we first computed the signal-to-noise ratio (S/N) of the lensing contribution to the multipoles of the 2PCF, which we define as

$$S/N(\bar{z}_i) := \sqrt{\sum_{j,k,l,m} \xi_{\ell}^{\text{magn}}(d_j, \bar{z}_i) C^{-1} [\xi_{\ell}^j, \xi_m^k](\bar{z}_i) \xi_m^{\text{magn}}(d_k, \bar{z}_i)}, \quad (26)$$

where the sum goes over all pairs of voxels and all even multipoles taken into consideration. The results are shown in Fig. 4 and Table 3. Since lensing magnification also contributes to multipoles larger than the hexadecapole, we show the S/N for two cases: $\ell_m = 4$ and $\ell_m = 6$, where $\ell_m$ denotes the highest

<footnote n="11">¹¹ The time $\tau$ can be considered to be the number of steps that are needed before the chain “forgets” where it started.</footnote>
<table><caption>**Table 3.** S/N per redshift bin of lensing magnification for the configurations with $\ell_m = 4$ and $\ell_m = 6$.</caption><thead><tr><th>z&#773;</th><th>S/N(ℓ<sub>m</sub> = 4)</th><th>S/N(ℓ<sub>m</sub> = 6)</th></tr></thead><tbody><tr><td>1.00</td><td>0.50</td><td>0.62</td></tr><tr><td>1.20</td><td>0.92</td><td>1.11</td></tr><tr><td>1.40</td><td>1.52</td><td>1.78</td></tr><tr><td>1.65</td><td>2.50</td><td>2.87</td></tr></tbody></table>

multipole used in the analysis. As we can see, the S/N is smallest in the lowest redshift bin, and increases as we go to higher redshifts. This is a consequence of two effects: first, the local count slope for *Euclid*, $s(z)$, increases with increasing redshift (see Table 2 and Fig. 3)<fnref n="12" />. Second, the lensing magnification term is an integrated effect and, as such, has the largest impact at high redshifts.

## 5.2. Full-shape cosmological analysis

In this section, we focus on the impact of magnification on the full-shape cosmological analysis of the 2PCF, for the *Euclid* spectroscopic sample. Magnification in principle affects both the best-fit estimation of cosmological parameters and their constraints. In order to quantify the relevance of the effect, we adopted the Fisher formalism described in Sect. 4.1, and we validated the results by comparing them to the outcome of a full MCMC analysis. In order to estimate the impact of magnification on constraints on cosmological parameters, we run two Fisher analyses, one with and one without lensing magnification, from which we estimate the marginalised $1\sigma$ errors, and we compared the values in the two cases.

As lensing magnification contains additional independent information, we expect the constraints to improve slightly when including it. In Table 4 we report the improvement in constraints on cosmological parameters when magnification is included in the analysis. For a $\Lambda$CDM model, the impact of magnification on the reduction of the error bars is $\leq 5\%$ for all cosmological parameters. In the dynamical dark energy model $w_0w_a$CDM, the impact of magnification is slightly larger, as the $1\sigma$ error bars in $w_0$ and $w_a$ are reduced by about 10%. Nevertheless, the improvement due to magnification in the constraining power decreases for other parameters. It is important to note that in this test we are assuming the values of the local count slope to be exactly known. While it is in principle possible to estimate $s(z)$ independently of the cosmological analysis, from the slope of the luminosity distribution of the galaxy sample, this measurement will be affected by several systematics (see for example Hildebrandt 2016). Therefore, we also considered a more pessimistic scenario where we assumed no prior knowledge on the local count slopes and thus we marginalise over the values of $s$ in each redshift bins. In Table 4 we also compared the constraints on cosmological parameters for a model that neglects magnification, and a model that includes the effect, assuming no information on the local counts slope. In this pessimistic setting, the constraints obtained when magnification is included are worse than the ones obtained when magnification is neglected. This reduction in constraining power as compared

to a model without magnification is up to 6% for $\Lambda$CDM and becomes up to 10% for the $w_0w_a$CDM parametrisation. This is due to the fact that magnification does not contribute very significantly to the cosmological information that can be extracted from the 2PCF, while the extra nuisance parameters introduced in this model slightly increase the degeneracy between the other parameters included in the analysis. We also note that, in the dynamical dark energy model, magnification mostly affects the cosmological constraints of $\sigma_8$, $w_0$ and $w_a$, while the remaining model parameters are substantially unaffected. Nevertheless, the impact of magnification on the constraints of cosmological parameters is small; including it leads to changes of at most $\pm 10\%$ in the error bars of parameters within the full-shape analysis.

In Fig. 5 we show a visual comparison of the constraints for the three cases discussed above. We validated these results by running an MCMC analysis for the $\Lambda$CDM model, including lensing magnification in the analysis. A direct comparison of the contour plots for the Fisher and MCMC methods can be found in Fig. 6 and Table 4. The Fisher results are accurate at the 20% level (see Tables F.1 and F.2 for the actual values). By comparing the results from the Fisher matrix and MCMC analyses in Fig. 6, it is easy to grasp the impact of the non-Gaussianity of the posterior. Such a non-Gaussianity, especially in the form of a skewness of the distribution, leads to a slight variation of the constraining power w/ and w/o magnification. In particular, this can be appreciated by comparing the last row of Table F.2 to the third one ($\Lambda$CDM only), which also causes some changes in sign in some of the constraining power variation (e.g. first and second to last lines of Table 4): the change in the 68% C.L.'s on those parameters switches sign. We note that all of these variations are very small – at the percentage level – and do not affect our main conclusions.

We also investigated the effect of magnification on the accuracy of best-fit estimation of cosmological parameters. To accomplish this, we employed two distinct techniques, namely, Fisher analysis and MCMC analysis. In the Fisher analysis, we computed the biases in the best-fit estimates by employing Eq. (21). In the MCMC analysis, we generated synthetic data based on a model that takes magnification into account and fitted the data using two theoretical predictions: one that includes magnification, and the other that neglects it. The differences in the best-fit parameters in these two cases provide the shifts induced by ignoring magnification in our modelling. In Table 4 (bottom block), we report the values of the shifts obtained with the Fisher analysis, for the $\Lambda$CDM and $w_0w_a$CDM parametrisations. In both cases, we find shifts below $1\sigma$. For the $\Lambda$CDM analysis, the best-fit estimate is biased at the level of $\sim 0.5-0.7\sigma$ for all cosmological parameters. The impact is less relevant in the $w_0w_a$CDM model, mainly due to the worse constraints on cosmological parameters. The largest shifts in this case are found for $n_s$ ($\sim 0.5\sigma$) and $\sigma_8$ ($\sim 0.2\sigma$). In Table 4 (bottom block) we also report the MCMC result, generated only for $\Lambda$CDM, where the shifts are larger. We find that while the shift found in the MCMC analysis is in most cases slightly larger, Fisher and MCMC forecast give consistent values of the shifts, both in terms of amplitude and direction. This provides an important check of the validity of the Fisher analysis.

One may wonder if shifts of less than $1\sigma$ are something we should worry about. This means after all that the shifts are hidden in the uncertainty of the measurements. The goal of *Euclid* is however to achieve an analysis where the sum of all systematic effects is below $0.3\sigma$. In this context, our analysis shows that including magnification in the modelling is necessary (see Fig. 7).

<footnote n="12">¹² It is important to note that $s(z) > 2/5$ for the redshift range considered in this work, since for $s(z) = 2/5$ the effect of lensing magnification vanishes.</footnote>
<table><caption>**Table 4.** Impact of magnification on the full-shape analysis.</caption><thead><tr><th rowspan="2">Quantity</th><th colspan="7">θ</th></tr><tr><th>Ω<sub>m,0</sub></th><th>h</th><th>n<sub>s</sub></th><th>Ω<sub>b,0</sub></th><th>σ<sub>8</sub></th><th>w<sub>0</sub></th><th>w<sub>a</sub></th></tr></thead><tbody><tr><td>1 − σ<sub>magn</sub>/σ<sub>nomagn</sub> (ΛCDM) (%)</td><td>4.16</td><td>4.21</td><td>0.92</td><td>5.26</td><td>5.05</td><td>—</td><td>—</td></tr><tr><td>1 − σ<sub>magn</sub>/σ<sub>nomagn</sub> (w<sub>0</sub>w<sub>a</sub>CDM) (%)</td><td>0.26</td><td>1.64</td><td>-0.26</td><td>0.34</td><td>6.30</td><td>10.20</td><td>9.90</td></tr><tr><td>Fisher</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>1 − σ<sub>smarg</sub>/σ<sub>nomagn</sub> (ΛCDM) (%)</td><td>-6.29</td><td>-6.28</td><td>-1.80</td><td>-6.22</td><td>-6.35</td><td>—</td><td>—</td></tr><tr><td>1 − σ<sub>smarg</sub>/σ<sub>nomagn</sub> (w<sub>0</sub>w<sub>a</sub>CDM) (%)</td><td>-0.02</td><td>-0.01</td><td>-1.87</td><td>-0.01</td><td>-9.58</td><td>-10.41</td><td>-10.75</td></tr><tr><td>Δ(θ)/σ(θ) (ΛCDM)</td><td>0.53</td><td>-0.55</td><td>-0.41</td><td>0.56</td><td>-0.74</td><td>—</td><td>—</td></tr><tr><td>Δ(θ)/σ(θ) (w<sub>0</sub>w<sub>a</sub>CDM)</td><td>-0.03</td><td>0.03</td><td>-0.44</td><td>-0.01</td><td>-0.19</td><td>0.03</td><td>-0.12</td></tr><tr><td>MCMC</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>1 − σ<sub>magn</sub>/σ<sub>nomagn</sub> (ΛCDM) (%)</td><td>7.61</td><td>-3.53</td><td>0.0</td><td>7.75</td><td>-3.23</td><td>—</td><td>—</td></tr><tr><td>Δ(θ)/σ(θ) (ΛCDM)</td><td>0.71</td><td>-0.66</td><td>-0.36</td><td>0.72</td><td>-0.81</td><td>—</td><td>—</td></tr></tbody></table>

**Notes.** The two blocks show our results for the Fisher analysis (top block) and the MCMC analysis (bottom block). Fisher analysis: the first two rows show the difference in constraints for a ΛCDM cosmology (top) and a $w_0w_a$CDM cosmology (bottom) between the model without lensing magnification, and one with lensing magnification, obtained using the Fisher formalism. First row: in the model with magnification, the local count slope parameters are fixed, that is, the values of $s(z)$ are assumed to be exactly known. Second row: we assume no prior knowledge on the local counts slope, we marginalise over its values in each redshift bin. The third row show the shifts in the best-fit estimates due to neglecting magnification in the theory model in ΛCDM cosmology and a $w_0w_a$CDM cosmology (bottom). MCMC analysis: we show the improvement in cosmological constraints (assuming exact knowledge of the local count slope parameters), and the shifts in the best-fit estimates when magnification is neglected, for a ΛCDM cosmology.

<figure><img src="image_6.png" /><figcaption>**Fig. 5.** Comparison of 68% C.L.'s obtained from the Fisher analysis for ΛCDM (left) and $w_0w_a$CDM (right) with no lensing magnification (blue), with lensing magnification and the local count slope fixed (orange) in each redshift bin, and with magnification and local count slope marginalised (green). We note that for $w_a$, we do not divide by the fiducial as it is zero, and instead we show the absolute error. For the corresponding data, see Table 4.</figcaption></figure>

### 5.3. Estimation of the growth rate

As is clear from Eq. (14), the quadrupole and hexadecapole of the correlation function are most sensitive to the growth factor $f(z)$. Assuming that $\mu_4(d, z_*)$ is given by early Universe parameters determined by CMB observations, one might even use the hexadecapole alone to determine $\tilde{f}(z)$. In practice, however, since the quadrupole and the monopole are much larger and correspondingly measured with much better precision, we

use the combined multipoles of the correlations function to estimate both the bias and the growth factor together. In this estimation we assume that the standard cosmological parameters are determined, for example via CMB observations, and we only estimate the unknown functions, $\tilde{b}(z) = \sigma_8(z)b(z)$ and $\tilde{f}(z) = \sigma_8(z)f(z)$. Within general relativity we expect $f(z) \approx \Omega_m(z)^{0.56}$ (see Appendix D for the exact expression).

We investigated the effect of lensing magnification on the estimation of the growth rate by fitting the full correlation
<figure><img src="image_7.png" /><figcaption>**Fig. 6.** 68% (inner) and 95% (outer) 2D confidence regions and 1D posteriors for ΛCDM with marginalisation over galaxy biases, using MCMC (blue) and the Fisher analysis (orange), with only contributions from just standard terms (dashed) and with standard terms plus lensing magnification (solid). The dashed black lines denote fiducial values of the cosmological parameters. The label “no magn” refers to an analysis that does not include magnification in the model despite the effect being present in the data. The label “w/magn” incorporates magnification both in the model and in the data.</figcaption></figure>

function including lensing magnification with a model that does not include it. We followed a similar approach as described in Jelic-Cizmek et al. (2021), Breton et al. (2022). In each of the four redshift bins, we varied both the growth rate $\tilde{f}(z_i) = \tilde{f}_i$ and the bias $\tilde{b}(z_i) = \tilde{b}_i$. The statistical error in the bias estimated via the Fisher analysis and via an MCMC study is typically of the order of $\sigma(\tilde{b}_i) \sim 0.7\%$ while the error in the growth factor is of the order of $\sigma(\tilde{f}_i) \sim 1.2–1.4\%$ (see Table 5). We note that in this case, adding the magnification in the model would not improve the measurement of $\tilde{f}_i$, since the magnification does not depend on these parameters. From Table 5, we see that neglecting lensing magnification in the modelling shifts the best fit values of $\tilde{b}_i$ and $\tilde{f}_i$ by up to one standard deviation in the highest redshift bin, which is most strongly affected by magnification. But already in bins two and three, neglecting lensing magnification leads to a systematic shift of more than $0.3\sigma$ (i.e. above the Euclid target). Comparing the results from the Fisher analysis with those of the MCMC analysis (see Table 5 and Fig. 8), we find excellent agreement, both for the predicted constraints and for the shifts, even in the case where the shifts are larger than $1\sigma$. This is on one hand due to the fact that the posteriors are

very close to Gaussian, as can be seen from Fig. 8, and on the other hand, the derivatives of the signal with respect to $\tilde{b}_i$ and $\tilde{f}_i$ (which are used in the Fisher analysis) are trivial, since these parameters are constant coefficients (in each bin) in front of the scale-dependent functions $\mu_\ell(d, \tilde{z})$ (see Eq. (14)).

From Fig. 2, we see that the contribution from lensing magnification to all multipoles is positive. This is true at all redshifts, since $5s_i - 2$ is positive in all bins (see Table 2). As a consequence, lensing magnification increases the amplitude of the monopole and of the hexadecapole (that is positive) but it reduces the amplitude of the quadrupole (which is negative). Since the constraints come mainly from the monopole and the quadrupole, neglecting lensing magnification in the modelling means therefore that $b_i$ and $f_i$ are shifted in such a way that $\tilde{b}_i^2 + 2/3\tilde{b}_i\tilde{f}_i + \tilde{f}_i^2/5$ increases, while $4/3\tilde{b}_i\tilde{f}_i + 4/7\tilde{f}_i^2$ decreases. This is best achieved by having a negative shift in $\tilde{f}_i$ and a positive shift in $\tilde{b}_i$. We note that with these shifted values the hexadecapole will not be well fitted, because it would require an increase in $\tilde{f}_i$. But since its signal-to-noise ratio is significantly smaller than that of the monopole and the quadrupole, it does not have a significant impact on the analysis.
<figure><img src="image_8.png" /><figcaption>**Fig. 7.** 68% (inner) and 95% (outer) 2D confidence regions and 1D posteriors for $w_0w_a$ CDM with marginalisation over galaxy biases for the Fisher analysis, with contributions from standard terms (dashed) or standard terms plus lensing magnification (solid). Dashed lack lines denote the fiducial values. For corresponding values of the constraints and shift, refer to Table 4. The label “no magn” refers to an analysis that does not include magnification in the model despite the effect being present in the data. The label “w/magn” incorporates magnification both in the model and in the data.</figcaption></figure>

Such a systematic error in the analysis can certainly not be tolerated. Since the aim of the growth rate analysis is to test the theory of gravity, shifts of more than $1\sigma$ in the growth rate would be wrongly interpreted as a detection of modified gravity. However, including lensing magnification in the analysis requires a model, which is exactly what we want to avoid in the growth rate analysis. In the case of the ΛCDM and $w_0w_a$ CDM analyses, the problem is less severe since magnification can be modelled together with density and RSDs. However, including it would significantly enhance the complexity of the computation

and slow down the data analysis, especially for parameter estimation using MCMC methods. Below we propose a method for resolving these problems.

### 5.4. A model for magnification as a cosmology-independent systematic effect

Since lensing magnification is a sub-dominant effect, we can include it in the modelling as a contamination, which does not encode any cosmological information, but that we can model
<figure><img src="image_9.png" /><figcaption>**Fig. 8.** 68% (inner) and 95% (outer) 2D confidence regions and 1D posteriors for the {$\tilde{f}, \tilde{b}$} parametrisation, using MCMC (blue) and the Fisher analysis (orange), with only contributions from just standard terms (dashed) and standard terms plus lensing magnification (solid). Dashed black lines denote the fiducial values. For corresponding values of the constraints and shift, refer to Table 5. The label “no magn” refers to an analysis that does not include magnification in the model despite the effect being present in the data. The label “w/magn” incorporates magnification in both the model and the data.</figcaption></figure>

sufficiently well. More precisely, we pre-computed the lensing magnification with fixed cosmological parameters, which were determined, for example, via CMB experiments, and only varied the contributions from density and RSDs in our analysis. We did this in order to remove the bias of cosmological parameters that neglecting magnification can induce. On the other hand, this means that we lose the additional constraining power from lensing; this, however, is not very significant. This “template method”, which uses a fiducial template for the lensing magnification, has also been proposed in Martinelli et al. (2022). Here we tested it both on the ΛCDM and $w_0w_a$CDM analyses (where

it is useful to reduce the computational costs) and on the growth rate analysis. On the growth rate analysis, the template method allows us to preserve the model-independence of the method. As explained before, in the growth rate analysis, the early time cosmology enters at the redshift $z_*$, before acceleration has started, and it is determined by CMB measurements. The late time evolution is then fully encoded in the parameters $\tilde{f}_i$ and $\tilde{b}_i$. Any deviations in the laws of gravity would appear as a change in these parameters. Adding the lensing magnification to the signal would spoil the model-independence of the method, since this contribution cannot be easily written in a model-independent
<table><caption>**Table 5.** Constraints and shift for the $\tilde{f}$, $\tilde{b}$ parametrisation (top: Fisher analysis; bottom: MCMC analysis).</caption><thead><tr><th rowspan="2"></th><th rowspan="2">Quantity</th><th colspan="8">θ</th></tr><tr><th>β̃<sub>1</sub></th><th>β̃<sub>2</sub></th><th>β̃<sub>3</sub></th><th>β̃<sub>4</sub></th><th>f̃<sub>1</sub></th><th>f̃<sub>2</sub></th><th>f̃<sub>3</sub></th><th>f̃<sub>4</sub></th></tr></thead><tbody><tr><td rowspan="3">Fisher</td><td>σ(θ)</td><td>0.0052</td><td>0.0052</td><td>0.0055</td><td>0.0049</td><td>0.0053</td><td>0.0053</td><td>0.0056</td><td>0.0050</td></tr><tr><td>σ(θ)/θ(%)</td><td>0.71</td><td>0.69</td><td>0.69</td><td>0.61</td><td>1.20</td><td>1.27</td><td>1.41</td><td>1.37</td></tr><tr><td>Δ(θ)/σ(θ)</td><td>0.21</td><td>0.40</td><td>0.68</td><td>1.13</td><td>-0.21</td><td>-0.39</td><td>-0.66</td><td>-1.07</td></tr><tr><td rowspan="3">MCMC</td><td>σ(θ)</td><td>0.0052</td><td>0.0053</td><td>0.0055</td><td>0.0050</td><td>0.0053</td><td>0.0054</td><td>0.0056</td><td>0.0051</td></tr><tr><td>σ(θ)/θ(%)</td><td>0.72</td><td>0.70</td><td>0.70</td><td>0.62</td><td>1.20</td><td>1.29</td><td>1.42</td><td>1.39</td></tr><tr><td>Δ(θ)/σ(θ)</td><td>0.21</td><td>0.40</td><td>0.67</td><td>1.16</td><td>-0.23</td><td>-0.39</td><td>-0.66</td><td>-1.08</td></tr></tbody></table>

**Notes.** We model the magnification as being parametrisation independent (i.e. a constant); hence, the constraints obtained with magnification would be identical.

<table><caption>**Table 6.** Values of the cosmological parameters used for the template method.</caption><thead><tr><th>Case</th><th>Ω<sub>m,0</sub></th><th>Ω<sub>b,0</sub></th><th>σ<sub>8</sub></th><th>n<sub>s</sub></th><th>h</th><th>b<sub>1</sub></th><th>b<sub>2</sub></th><th>b<sub>3</sub></th><th>b<sub>4</sub></th></tr></thead><tbody><tr><td>+1σ</td><td>0.354</td><td>0.054</td><td>0.856</td><td>0.971</td><td>0.706</td><td>1.488</td><td>1.683</td><td>1.899</td><td>2.122</td></tr><tr><td>-1σ</td><td>0.284</td><td>0.044</td><td>0.804</td><td>0.949</td><td>0.634</td><td>1.395</td><td>1.590</td><td>1.806</td><td>2.028</td></tr></tbody></table>

**Notes.** We considered two cosmologies, one +1σ away from the fiducial (top) and one -1σ away from the fiducial (bottom). Any other cosmological parameter not mentioned below is assumed to take its fiducial value (given in Table 1).

way<fnref n="13" />. This would mean that part of the signal is modelled with $\tilde{f}_i$ and $\tilde{b}_i$, while the other part is modelled in a specific model, for example in ΛCDM. We would then have a mix of parameters, some independent of the theory of gravity, and others specific to ΛCDM. The template method circumvents this problem, by assuming that the lensing magnification is a fixed contribution, independent of cosmological parameters. Of course this is not correct, but we show that the mistake that we make by using this assumption does not introduce any significant shifts in the measurements of the variables $\tilde{f}_i$ and $\tilde{b}_i$, which we want to constrain with this method. To test this, we included the lensing magnification in the model using wrong cosmological parameters (since in practice we do not know the theory of gravity, nor the value of the true cosmological parameters). More precisely, we used cosmological parameters that are one standard deviation below or above our fiducial values. The ±1σ values are reported in Table 6. We then computed the shifts in the cosmological parameters induced by the fact that the template for the lensing magnification is wrong by ±1σ.

The shifts in the cosmological parameters for both ΛCDM and $w_0w_a$CDM are given in Table 7. Comparing with Table 4 we see that the shifts are very significantly reduced with the template method. In $w_0w_a$CDM, the cosmological parameters never change by more than 0.04σ. In ΛCDM, $σ_8$ and the galaxy bias are shifted by 0.08σ to 0.13σ when using the template method. We note, however, that we did not vary $w_0$ and $w_a$ for the template lensing magnification since these parameters are not well determined by CMB data used to obtain the template. The results for the growth rate analysis are presented in Table 8. Again, we see that the template method strongly reduces the shift, which, in the highest redshift bin goes down from 1σ (when magnification is fully neglected) to 0.1σ with the template method. In the other three bins, the shifts are even smaller. We note that lensing magnification, similarly to the lensing effect measured

in cosmic shear analysis, is most sensitive to the combination $S_8 = σ_8 (Ω_{m,0}/0.3)^{0.5}$. Since in our test we considered cosmologies ±1σ away from the fiducial, for both $σ_8$ and $Ω_{m,0}$ at the same time, we show that this method is able to drastically reduce the shift induced by neglecting magnification, even when the model for this effect is significantly inconsistent with the truth.

This template method, where magnification has to be computed only once, is therefore a very promising, inexpensive method for including lensing magnification in the analysis. While in the model-independent analysis of the growth factor magnification has to be modelled as a template, for the full-shape analysis, once the best fit parameters are determined, one will want to include the magnification term with these parameters and run the analysis a second time in order to improve the fit. This iterative method ensures that the result is not sensitive to the initial best fit used to compute the magnification. This is particularly important in light of the current tensions between CMB and large-scale structure constraints. Even though this method has the slight disadvantage that it does not use the information in the lensing magnification to constrain the cosmology, we believe that for a spectroscopic survey, for which magnification is weak, it is the simplest way to avoid the very significant biasing of the results that an analysis that neglects lensing magnification does generate, without significant numerical cost and with a very minor loss of parameter precision (a few percent increase in the error bars).

## 6. Conclusions

In this paper we have studied the impact of lensing magnification on the spectroscopic survey of *Euclid*. Lensing magnification is commonly assumed to have a significantly lower impact on the spectroscopic analysis than the photometric one (Euclid Collaboration 2022) due to the fact that: (i) density fluctuations and RSDs have higher amplitudes in a survey with spectroscopic resolution; (ii) the correlation between the different redshift bins are not taken into account in the spectroscopic analysis; and (iii) the multipole expansion used in the spectroscopic analysis removes part of the lensing signal (which

<footnote n="13">¹³ As shown in Tutusaus et al. (2023), the density–magnification term can be written in a way that does not depend on the late-time model, but the magnification–magnification is more involved due to the integral over the line of sight.</footnote>
<table><caption>**Table 7.** Shift in the ΛCDM (top) and $w_0w_a$CDM (bottom) parameters obtained from a Fisher analysis using the template method, with parameters $+1\sigma$ (upper) and $-1\sigma$ (lower) away from the fiducial cosmology.</caption><thead><tr><th></th><th></th><th>Ω<sub>m,0</sub></th><th>h</th><th>n<sub>s</sub></th><th>Ω<sub>b,0</sub></th><th>σ<sub>8</sub></th><th>w<sub>0</sub></th><th>w<sub>a</sub></th></tr></thead><tbody><tr><td rowspan="3">ΛCDM</td><td>Δ(θ)</td><td>-0.0018</td><td>0.0018</td><td>-0.0004</td><td>-0.0003</td><td>0.002</td><td>-</td><td>-</td></tr><tr><td>Δ(θ)/σ(θ)</td><td>-0.05</td><td>0.05</td><td>-0.03</td><td>-0.05</td><td>0.07</td><td>-</td><td>-</td></tr><tr><td>Δ(θ)</td><td>0.0020</td><td>-0.0020</td><td>0.0004</td><td>0.0003</td><td>-0.0021</td><td>-</td><td>-</td></tr><tr><td></td><td>Δ(θ)/σ(θ)</td><td>0.05</td><td>-0.05</td><td>0.03</td><td>0.05</td><td>-0.08</td><td>-</td><td>-</td></tr><tr><td rowspan="3">w<sub>0</sub>w<sub>a</sub>CDM</td><td>Δ(θ)</td><td>-0.0002</td><td>0.0002</td><td>-0.0003</td><td>0.0000</td><td>0.0019</td><td>0.0002</td><td>0.0363</td></tr><tr><td>Δ(θ)/σ(θ)</td><td>-0.0038</td><td>0.0027</td><td>-0.0313</td><td>-0.0008</td><td>0.0161</td><td>0.0002</td><td>0.0064</td></tr><tr><td>Δ(θ)</td><td>0.0002</td><td>-0.0002</td><td>0.0004</td><td>0.0000</td><td>-0.0022</td><td>0.0007</td><td>-0.0448</td></tr><tr><td></td><td>Δ(θ)/σ(θ)</td><td>0.0035</td><td>-0.0025</td><td>0.0342</td><td>0.0006</td><td>-0.0182</td><td>0.0006</td><td>-0.0079</td></tr></tbody></table>

**Notes.** To be conservative, we offset all of the galaxy biases according to $\max\{\sigma(b_i)\}$, $i \in \{1, \dots, N\}$, where N is the number of redshift bins in the survey (Fisher analysis).

<table><caption>**Table 8.** Shift in $\tilde{f}$, $\tilde{b}$ parameters using the template method, $+1\sigma$ (upper) and $-1\sigma$ (lower) away from the fiducial cosmology (top: Fisher analysis; bottom: MCMC analysis).</caption><thead><tr><th></th><th></th><th>β̃<sub>1</sub></th><th>β̃<sub>2</sub></th><th>β̃<sub>3</sub></th><th>β̃<sub>4</sub></th><th>β̃<sub>1</sub></th><th>β̃<sub>2</sub></th><th>β̃<sub>3</sub></th><th>β̃<sub>4</sub></th></tr></thead><tbody><tr><td rowspan="3">Fisher</td><td>Δ(θ)</td><td>-0.0001</td><td>-0.0001</td><td>-0.0002</td><td>-0.0003</td><td>0.0001</td><td>0.0002</td><td>0.0004</td><td>0.0005</td></tr><tr><td>Δ(θ)/σ(θ)</td><td>-0.0140</td><td>-0.0267</td><td>-0.0419</td><td>-0.0581</td><td>0.0214</td><td>0.0407</td><td>0.0654</td><td>0.0965</td></tr><tr><td>Δ(θ)</td><td>0.0001</td><td>0.0002</td><td>0.0003</td><td>0.0004</td><td>-0.0001</td><td>-0.0002</td><td>-0.0004</td><td>-0.0005</td></tr><tr><td></td><td>Δ(θ)/σ(θ)</td><td>0.0166</td><td>0.0317</td><td>0.0505</td><td>0.0725</td><td>-0.0227</td><td>-0.0433</td><td>-0.0700</td><td>-0.1051</td></tr><tr><td rowspan="3">MCMC</td><td>Δ(θ)</td><td>-0.0001</td><td>-0.0001</td><td>-0.0001</td><td>-0.0001</td><td>0.0001</td><td>0.0002</td><td>0.0003</td><td>0.0004</td></tr><tr><td>Δ(θ)/σ(θ)</td><td>-0.0192</td><td>-0.0189</td><td>-0.0182</td><td>-0.02</td><td>0.0189</td><td>0.0370</td><td>0.0536</td><td>0.08</td></tr><tr><td>Δ(θ)</td><td>0.0001</td><td>0.0003</td><td>0.0003</td><td>0.0005</td><td>0.0000</td><td>-0.0003</td><td>-0.0004</td><td>-0.0006</td></tr><tr><td></td><td>Δ(θ)/σ(θ)</td><td>0.0192</td><td>0.0566</td><td>0.0545</td><td>0.1000</td><td>0.0000</td><td>-0.0556</td><td>-0.0714</td><td>-0.1176</td></tr></tbody></table>

is not fully captured by the first three multipoles). Despite this, we find that neglecting magnification leads to significant shifts in the cosmological parameters, by 0.2–0.7 standard deviations. In particular, $\sigma_8$, but also $\Omega_{m,0}$ and $\Omega_{b,0}$, is shifted by more than half a standard deviation.

These shifts become even more significant when we consider the growth rates, which we fitted in an analysis that is independent of the late-time cosmological model. If lensing magnification is neglected, the growth rate is shifted by more than one standard deviation in the highest redshift bin.

From these findings we conclude that it is imperative to include lensing magnification in the data analysis of the *Euclid* spectroscopic survey. In Appendix E.2 we provide simplified expressions, based on the flat-sky approximation, for the contribution of magnification to the multipoles of the 2PCF (see Jelic-Cizmek 2021, for their derivation). While the cross-correlation of density and magnification can be computed very efficiently, the estimation of the magnification–magnification term is slowed by an integral over the line of sight, which complicates the analysis of the ΛCDM and the $w_0w_a$CDM models. Even more importantly, the lensing magnification contribution cannot easily be written in a model-independent way. Consequently, including this contribution in the growth rate analysis would spoil the model independence of the method. Since testing the laws of gravity using growth rate analysis is one of the key goals of the spectroscopic analysis, this situation is problematic. Fortunately, we propose a method for solving the problem and reducing the shifts in the parameters to less than $0.1\sigma$ while keeping the analysis independent of late-time cosmology. In this so-called “template method”, lensing magnification is calculated in a model with fixed cosmological parameters and simply added to the standard terms. We have shown that if these fixed cosmological parameters deviate by $1\sigma$ from the true underlying model, including this slightly wrong contribution from magnification leads to shifts in the inferred cosmological parameters of at most $0.1\sigma$. Of course, one can then improve the analysis by iterating the process.

In our work we have compared our Fisher forecasts with a full MCMC analysis at several stages. We have found that both methods provide consistent results for the parameter shifts, even when they are up to $1\sigma$.

We note that, unlike the previous *Euclid* forecasts (EP:VII), which are based on the power spectrum in Fourier space, our study presents a configuration-space analysis based on the multipoles of the correlation function. Nevertheless, we expect that our conclusions similarly apply to a Fourier-space analysis. However, modelling the effects of magnification on the multipoles of the power spectrum is less straightforward. First, the contribution of magnification depends on the power spectrum estimator and the survey window function. Second, as demonstrated in Castorina & di Dio (2022), considering the contribution of magnification to the power spectrum multipoles necessitates a prior estimation of the multipoles of the correlation function. Hence, our analysis was conducted directly in configuration space. Even if the covariance matrix has more significant off-diagonal contributions in configuration space, this method has the advantage of being more direct and less survey dependent.

To conclude, we find that including magnification in the analysis does not significantly reduce the error bars on the inferred cosmological parameters. However, we will have to include this
in our analysis of the data since otherwise we would fit the data to the wrong physical model, which would bias the inferred cosmological parameters.

**Acknowledgements.** We acknowledge the use of the HPC cluster Baobab at the University of Geneva for conducting our numerical calculations. G.J.C. acknowledges support from the Swiss National Science Foundation (SNSF), professorship grant (No. 202671). F.S., C.B., R.D. and M.K. acknowledge support from the Swiss National Science Foundation Sinergia Grant CRSII5198674. C.B. acknowledges financial support from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (Grant agreement No. 863929; project title "Testing the law of gravity with novel large-scale structure observables"). L.L. is supported by a SNSF professorship grant (No. 202671). P.F. acknowledges support from Ministerio de Ciencia e Innovación, project PID2019-111317GB-C31, the European Research Executive Agency HORIZON-MSCA-2021-SE-01 Research and Innovation programme under the Marie Skłodowska-Curie grant agreement number 101086388 (LACEGAL). P.F. is also partially supported by the program Unidad de Excelencia María de Maeztu CEX2020-001058-M. C.V. acknowledges an FPI grant from Ministerio de Ciencia e Innovación, project PID2019-111317GB-C31. This work has made use of CosmoHub. CosmoHub has been developed by the Port d'Informació Científica (PIC), maintained through a collaboration of the Institut de Física d'Altes Energies (IFAE) and the Centro de Investigaciones Energéticas, Medioambientales y Tecnológicas (CIEMAT) and the Institute of Space Sciences (CSIC & IEEC), and was partially funded by the "Plan Estatal de Investigación Científica y Técnica y de Innovación" program of the Spanish government. The Euclid Consortium acknowledges the European Space Agency and a number of agencies and institutes that have supported the development of *Euclid*, in particular the Academy of Finland, the Agenzia Spaziale Italiana, the Belgian Science Policy, the Canadian Euclid Consortium, the French Centre National d'Études Spatiales, the Deutsches Zentrum für Luft- und Raumfahrt, the Danish Space Research Institute, the Fundação para Ciência e a Tecnologia, the Ministerio de Ciencia e Innovación, the National Aeronautics and Space Administration, the National Astronomical Observatory of Japan, the Nederlandse Onderzoekschool Voor Astronomie, the Norwegian Space Agency, the Romanian Space Agency, the State Secretariat for Education, Research and Innovation (SERI) at the Swiss Space Office (SSO), and the United Kingdom Space Agency. A complete and detailed list is available on the *Euclid* web site (http://www.euclid-ec.org).

## References

Abramowitz, M., & Stegun, I. 1972, *Handbook of Mathematical Functions* (New York: Dover Publications)

Alam, S., Ata, M., Bailey, S., et al. 2017, MNRAS, 470, 2617

Amendola, L., Appleby, S., Bacon, D., et al. 2018, Liv. Rev. Rel., 21, 2

Bellomo, N., Bernal, J. L., Scelfo, G., Raccanelli, A., & Verde, L. 2020, JCAP, 10, 016

Beutler, F., & Di Dio, E. 2020, JCAP, 07, 048

Bonvin, C., & Durrer, R. 2011, Phys. Rev. D, 84, 063505

Bonvin, C., & Fleury, P. 2018, JCAP, 05, 061

Bonvin, C., Hui, L., & Gaztanaga, E. 2014, Phys. Rev. D, 89, 083535

Bonvin, C., Lepori, F., Schulz, S., et al. 2023, MNRAS, 525, 4611

Breton, M.-A., de la Torre, S., & Piat, J. 2022, A&A, 661, A154

Bull, P., Akrami, Y., Adamek, J., et al. 2016, Phys. Dark Universe, 12, 56

Camera, S., Maartens, R., & Santos, M. G. 2015, MNRAS, 451, L80

Camera, S., Fonseca, J., Maartens, R., & Santos, M. G. 2018, MNRAS, 481, 1251

Campagne, J.-E., Neveu, J., & Plaszczyński, S. 2017, A&A, 602, A72

Cardona, W., Durrer, R., Kunz, M., & Montanari, F. 2016, Phys. Rev. D, D94, 043007

Cardoso, V., & Pani, P. 2019, Liv. Rev. Rel., 22, 4

Carretero, J., Tallada, P., Casals, J., et al. 2017, Proceedings of the European Physical Society Conference on High Energy Physics. 5–12 July, 488

Carron, J. 2013, A&A, 551, A88

Castorina, E., & di Dio, E. 2022, JCAP, 01, 061

Challinor, A., & Lewis, A. 2011, Phys. Rev. D, 84, 043516

Chevallier, M., & Polarski, D. 2001, Int. J. Mod. Phys. D, 10, 213

Chisari, N. E., Alonso, D., Krause, E., et al. 2019, ApJS, 242, 2

Clifton, T., Ferreira, P. G., Padilla, A., & Skordis, C. 2012, Phys. Rep., 513, 1

Di Dio, E., Montanari, F., Lesgourgues, J., & Durrer, R. 2013, JCAP, 11, 044

Di Dio, E., Montanari, F., Raccanelli, A., et al. 2016, JCAP, 06, 013

Duncan, C., Joachimi, B., Heavens, A., Heymans, C., & Hildebrandt, H. 2014, MNRAS, 437, 2471

Durrer, R. 2020, The Cosmic Microwave Background, 2nd edn. (Cambridge University Press)

Elvin-Poole, J., MacCrann, N., Everett, S., et al. 2023, MNRAS, 523, 3649

Euclid Collaboration (Blanchard, A., et al.) 2020, A&A, 642, A191

Euclid Collaboration (Lepori, F., et al.) 2022, A&A, 662, A93

Foreman-Mackey, D., Hogg, D. W., Lang, D., & Goodman, J. 2013, PASP, 125, 306

Gaztanaga, E., Bonvin, C., & Hui, L. 2017, JCAP, 01, 032

Goodman, J., & Weare, J. 2010, Commun. Appl. Math. Comp. Sci., 5, 65

Grieb, J. N., Sánchez, A. G., Salazar-Albornoz, S., & Dalla Vecchia, C. 2016, MNRAS, 457, 1577

Grimm, N., Scaccabarozzi, F., Yoo, J., Biern, S. G., & Gong, J.-O. 2020, JCAP, 2020, 064

Hall, A., & Bonvin, C. 2017, Phys. Rev. D, 95, 043530

Hildebrandt, H. 2016, MNRAS, 455, 3943

Jelic-Cizmek, G. 2021, JCAP, 2021, 045

Jelic-Cizmek, G., Lepori, F., Bonvin, C., & Durrer, R. 2021, JCAP, 2021, 055

Jeong, D., Schmidt, F., & Hirata, C. M. 2012, Phys. Rev. D, 85, 023504

Kaiser, N. 1987, MNRAS, 227, 1

Kitching, T. D., Amara, A., Abdalla, F. B., Joachimi, B., & Refregier, A. 2009, MNRAS, 399, 2107

Laureijs, R., Amiaux, J., Arduini, S., et al. 2011, ArXiv e-prints [arXiv:1110.3193]

Lepori, F., Iršič, V., Di Dio, E., & Viel, M. 2020, JCAP, 04, 006

Lewis, A. 2019, ArXiv e-prints [arXiv:1910.13970]

Linder, E. V. 2003, Phys. Rev. Lett., 90, 091301

Linder, E. V., & Cahn, R. N. 2007, Astropart. Phys., 28, 481

Lorenz, C. S., Alonso, D., & Ferreira, P. G. 2018, Phys. Rev. D, 97, 023537

Mahony, C., Fortuna, M. C., Joachimi, B., et al. 2022, MNRAS, 513, 1210

Martinelli, M., Dalal, R., Majidi, F., et al. 2022, MNRAS, 510, 1964

Marulli, F., Veropalumbo, A., & Moresco, M. 2016, Astron. Comput., 14, 35

Matsubara, T. 2004, ApJ, 615, 573

Planck Collaboration XIV. 2016, A&A, 594, A14

Price-Whelan, A. M., & Foreman-Mackey, D. 2017, J. Open Source Softw., 2, 357

Saga, S., Taruya, A., Breton, M.-A., & Rasera, Y. 2022, MNRAS, 511, 2732

Szalay, A. S., Matsubara, T., & Landy, S. D. 1998, ApJ, 498, L1

Szapudi, I. 2004, ApJ, 614, 51

Tallada, P., Carretero, J., Casals, J., et al. 2020, Astron. Comput., 32, 100391

Tansella, V., Bonvin, C., Durrer, R., Ghosh, B., & Sellentin, E. 2018a, JCAP, 2018, 019

Tansella, V., Jelic-Cizmek, G., Bonvin, C., & Durrer, R. 2018b, JCAP, 2018, 032

Taylor, A. N., Kitching, T. D., Bacon, D. J., & Heavens, A. F. 2007, MNRAS, 374, 1377

Tegmark, M. 1997, Phys. Rev. Lett., 79, 3806

Tutusaus, I., Martinelli, M., Cardone, V. F., et al. 2020, A&A, 643, A70

Tutusaus, I., Sobral-Blanco, D., & Bonvin, C. 2023, Phys. Rev. D, 107, 083526

Unruh, S., Schneider, P., Hilbert, S., et al. 2020, A&A, 638, A96

Verde, L. 2007, ArXiv e-prints [arXiv:0712.3028]

Villa, E., Dio, E. D., & Lepori, F. 2018, JCAP, 2018, 033

Virtanen, P., Gommers, R., Oliphant, T. E., et al. 2020, Nat. Methods, 17, 261

von Wietersheim-Kramsta, M., Joachimi, B., van den Busch, J. L., et al. 2021, MNRAS, 504, 1452

Yoo, J. 2010, Phys. Rev. D, 82, 083508

Yoo, J., Fitzpatrick, A. L., & Zaldarriaga, M. 2009, Phys. Rev. D, 80, 083514

<footnote n="1">¹ Université de Genève, Département de Physique Théorique and Centre for Astroparticle Physics, 24 quai Ernest-Ansermet, 1211 Genève 4, Switzerland
e-mail: goran.jelic-cizmek@unige.ch</footnote>

<footnote n="2">² Department of Astrophysics, University of Zurich, Winterthur-erstrasse 190, 8057 Zurich, Switzerland</footnote>

<footnote n="3">³ Dipartimento di Fisica, Università degli Studi di Torino, Via P. Giuria 1, 10125 Torino, Italy</footnote>

<footnote n="4">⁴ INFN-Sezione di Torino, Via P. Giuria 1, 10125 Torino, Italy</footnote>

<footnote n="5">⁵ INAF-Osservatorio Astrofisico di Torino, Via Osservatorio 20, 10025 Pino Torinese (TO), Italy</footnote>

<footnote n="6">⁶ Institute of Space Sciences (ICE, CSIC), Campus UAB, Carrer de Can Magrans, s/n, 08193 Barcelona, Spain</footnote>

<footnote n="7">⁷ Institut d'Estudis Espacials de Catalunya (IEEC), Carrer Gran Capità 2-4, 08034 Barcelona, Spain</footnote>

<footnote n="8">⁸ Institut de Ciencies de l'Espai (IEEC-CSIC), Campus UAB, Carrer de Can Magrans, s/n Cerdanyola del Vallés, 08193 Barcelona, Spain</footnote>

<footnote n="9">⁹ Institut de Recherche en Astrophysique et Planétologie (IRAP), Université de Toulouse, CNRS, UPS, CNES, 14 Av. Edouard Belin, 31400 Toulouse, France</footnote>
10 Institut für Theoretische Physik, University of Heidelberg, Philosophenweg 16, 69120 Heidelberg, Germany

11 Université St Joseph; Faculty of Sciences, Beirut, Lebanon

12 Université Paris-Saclay, CNRS, Institut d'astrophysique spatiale, 91405 Orsay, France

13 Institute of Cosmology and Gravitation, University of Portsmouth, Portsmouth PO1 3FX, UK

14 INAF-Osservatorio Astronomico di Brera, Via Brera 28, 20122 Milano, Italy

15 Dipartimento di Fisica e Astronomia, Università di Bologna, Via Gobetti 93/2, 40129 Bologna, Italy

16 INAF-Osservatorio di Astrofisica e Scienza dello Spazio di Bologna, Via Piero Gobetti 93/3, 40129 Bologna, Italy

17 INFN-Sezione di Bologna, Viale Berti Pichat 6/2, 40127 Bologna, Italy

18 Max Planck Institute for Extraterrestrial Physics, Giessenbachstr. 1, 85748 Garching, Germany

19 Dipartimento di Fisica, Università di Genova, Via Dodecaneso 33, 16146 Genova, Italy

20 INFN-Sezione di Genova, Via Dodecaneso 33, 16146 Genova, Italy

21 Department of Physics "E. Pancini", University Federico II, Via Cinthia 6, 80126 Napoli, Italy

22 INAF-Osservatorio Astronomico di Capodimonte, Via Moiariello 16, 80131 Napoli, Italy

23 INFN section of Naples, Via Cinthia 6, 80126 Napoli, Italy

24 Instituto de Astrofísica e Ciências do Espaço, Universidade do Porto, CAUP, Rua das Estrelas, 4150-762 Porto, Portugal

25 INAF-IASF Milano, Via Alfonso Corti 12, 20133 Milano, Italy

26 INAF-Osservatorio Astronomico di Roma, Via Frascati 33, 00078 Monteporzio Catone, Italy

27 INFN-Sezione di Roma, Piazzale Aldo Moro, 2 - c/o Dipartimento di Fisica, Edificio G. Marconi, 00185 Roma, Italy

28 Institut de Física d'Altes Energies (IFAE), The Barcelona Institute of Science and Technology, Campus UAB, 08193 Bellaterra (Barcelona), Spain

29 Port d'Informació Científica, Campus UAB, C. Albareda s/n, 08193 Bellaterra (Barcelona), Spain

30 Institute for Theoretical Particle Physics and Cosmology (TTK), RWTH Aachen University, 52056 Aachen, Germany

31 Dipartimento di Fisica e Astronomia "Augusto Righi" - Alma Mater Studiorum Università di Bologna, Viale Berti Pichat 6/2, 40127 Bologna, Italy

32 Institute for Astronomy, University of Edinburgh, Royal Observatory, Blackford Hill, Edinburgh EH9 3HJ, UK

33 Jodrell Bank Centre for Astrophysics, Department of Physics and Astronomy, University of Manchester, Oxford Road, Manchester M13 9PL, UK

34 European Space Agency/ESRIN, Largo Galileo Galilei 1, 00044 Frascati, Roma, Italy

35 ESAC/ESA, Camino Bajo del Castillo, s/n., Urb. Villafranca del Castillo, 28692 Villanueva de la Cañada, Madrid, Spain

36 University of Lyon, Univ Claude Bernard Lyon 1, CNRS/IN2P3, IP2I Lyon, UMR 5822, 69622 Villeurbanne, France

37 Institute of Physics, Laboratory of Astrophysics, École Polytechnique Fédérale de Lausanne (EPFL), Observatoire de Sauverny, 1290 Versoix, Switzerland

38 UCB Lyon 1, CNRS/IN2P3, IUF, IP2I Lyon, 4 rue Enrico Fermi, 69622 Villeurbanne, France

39 Mullard Space Science Laboratory, University College London, Holmbury St Mary, Dorking, Surrey RH5 6NT, UK

40 Department of Astronomy, University of Geneva, ch. d'Ecogia 16, 1290 Versoix, Switzerland

41 INAF-Istituto di Astrofisica e Planetologia Spaziali, Via del Fosso del Cavaliere, 100, 00100 Roma, Italy

42 Instituto de Astrofísica e Ciências do Espaço, Faculdade de Ciências, Universidade de Lisboa, Campo Grande 1749-016, Lisboa, Portugal

43 Departamento de Física, Faculdade de Ciências, Universidade de Lisboa, Edifício C8, Campo Grande 1749-016, Lisboa, Portugal

44 INFN-Padova, Via Marzolo 8, 35131 Padova, Italy

45 Université Paris-Saclay, Université Paris Cité, CEA, CNRS, AIM, 91191 Gif-sur-Yvette, France

46 INAF-Osservatorio Astronomico di Trieste, Via G. B. Tiepolo 11, 34143 Trieste, Italy

47 Istituto Nazionale di Fisica Nucleare, Sezione di Bologna, Via Irnerio 46, 40126 Bologna, Italy

48 INAF-Osservatorio Astronomico di Padova, Via dell'Osservatorio 5, 35122 Padova, Italy

49 University Observatory, Faculty of Physics, Ludwig-Maximilians-Universität, Scheinerstr. 1, 81679 Munich, Germany

50 Institute of Theoretical Astrophysics, University of Oslo, PO Box 1029 Blindern, 0315 Oslo, Norway

51 Leiden Observatory, Leiden University, Niels Bohrweg 2, 2333 CA Leiden, The Netherlands

52 Jet Propulsion Laboratory, California Institute of Technology, 4800 Oak Grove Drive, Pasadena, CA 91109, USA

53 von Hoerner & Sulger GmbH, SchloßPlatz 8, 68723 Schwetzingen, Germany

54 Technical University of Denmark, Elektrovej 327, 2800 Kgs. Lyngby, Denmark

55 Cosmic Dawn Center (DAWN), Copenhagen, Denmark

56 Max-Planck-Institut für Astronomie, Königstuhl 17, 69117 Heidelberg, Germany

57 Department of Physics and Helsinki Institute of Physics, University of Helsinki, Gustaf Hällströmin katu 2, 00014 Helsinki, Finland

58 Aix-Marseille Université, CNRS/IN2P3, CPPM, Marseille, France

59 AIM, CEA, CNRS, Université Paris-Saclay, Université de Paris, 91191 Gif-sur-Yvette, France

60 Department of Physics, University of Helsinki, PO Box 64, 00014 Helsinki, Finland

61 Helsinki Institute of Physics, Gustaf Hällströmin katu 2, University of Helsinki, Helsinki, Finland

62 NOVA optical infrared instrumentation group at ASTRON, Oude Hoogeveensedijk 4, 7991PD Dwingeloo, The Netherlands

63 Universität Bonn, Argelander-Institut für Astronomie, Auf dem Hügel 71, 53121 Bonn, Germany

64 Aix-Marseille Université, CNRS, CNES, LAM, Marseille, France

65 Dipartimento di Fisica e Astronomia "Augusto Righi" - Alma Mater Studiorum Università di Bologna, Via Piero Gobetti 93/2, 40129 Bologna, Italy

66 Department of Physics, Institute for Computational Cosmology, Durham University, South Road, Durham DH1 3LE, UK

67 Université Paris Cité, CNRS, Astroparticule et Cosmologie, 75013 Paris, France

68 European Space Agency/ESTEC, Keplerlaan 1, 2201 AZ Noordwijk, The Netherlands

69 Department of Physics and Astronomy, University of Aarhus, Ny Munkegade 120, 8000 Aarhus C, Denmark

70 Centre for Astrophysics, University of Waterloo, Waterloo, Ontario N2L 3G1, Canada

71 Department of Physics and Astronomy, University of Waterloo, Waterloo, Ontario N2L 3G1, Canada

72 Perimeter Institute for Theoretical Physics, Waterloo, Ontario N2L 2Y5, Canada

73 Université Paris-Saclay, Université Paris Cité, CEA, CNRS, Astronomique, Instrumentation et Modélisation Paris-Saclay, 91191 Gif-sur-Yvette, France

74 Space Science Data Center, Italian Space Agency, Via del Politecnico snc, 00133 Roma, Italy

75 Centre National d'Études Spatiales - Centre spatial de Toulouse, 18 Avenue Édouard Belin, 31401 Toulouse Cedex 9, France

76 Institute of Space Science, Str. Atomistilor, nr. 409 Măgurele, Ilfov 077125, Romania

77 Instituto de Astrofísica de Canarias, Calle Vía Láctea s/n, 38204 San Cristóbal de La Laguna, Tenerife, Spain

78 Departamento de Astrofísica, Universidad de La Laguna, 38206 La Laguna, Tenerife, Spain

79 Dipartimento di Fisica e Astronomia "G. Galilei", Università di Padova, Via Marzolo 8, 35131 Padova, Italy
80 Universitäts-Sternwarte München, Fakultät für Physik, Ludwig-Maximilians-Universität München, Scheinerstrasse 1, 81679 München, Germany

81 Departamento de Física, FCFM, Universidad de Chile, Blanco Encalada 2008, Santiago, Chile

82 Universität Innsbruck, Institut für Astro- und Teilchenphysik, Technikerstr. 25/8, 6020 Innsbruck, Austria

83 Satlantis, University Science Park, Sede Bld 48940, Leioa-Bilbao, Spain

84 Centro de Investigaciones Energéticas, Medioambientales y Tecnológicas (CIEMAT), Avenida Complutense 40, 28040 Madrid, Spain

85 Instituto de Astrofísica e Ciências do Espaço, Faculdade de Ciências, Universidade de Lisboa, Tapada da Ajuda 1349-018 Lisboa, Portugal

86 Universidad Politécnica de Cartagena, Departamento de Eléctrónica y Tecnología de Computadoras, Plaza del Hospital 1, 30202 Cartagena, Spain

87 Kapteyn Astronomical Institute, University of Groningen, PO Box 800, 9700 AV Groningen, The Netherlands

88 INFN-Bologna, Via Irnerio 46, 40126 Bologna, Italy

89 Infrared Processing and Analysis Center, California Institute of Technology, Pasadena, CA 91125, USA

90 IFPU-Institute for Fundamental Physics of the Universe, Via Beirut 2, 34151 Trieste, Italy

91 Institut d'Astrophysique de Paris, 98bis Boulevard Arago, 75014 Paris, France

92 Junia, EPA Department, 41 Bd Vauban, 59800 Lille, France

93 SISSA, International School for Advanced Studies, Via Bonomea 265, 34136 Trieste TS, Italy

94 INFN-Sezione di Trieste, Via Valerio 2, 34127 Trieste TS, Italy

95 ICSC-Centro Nazionale di Ricerca in High Performance Computing, Big Data e Quantum Computing, Via Magnanelli 2, Bologna, Italy

96 Instituto de Física Teórica UAM-CSIC, Campus de Cantoblanco, 28049 Madrid, Spain

97 CERCA/ISO, Department of Physics, Case Western Reserve University, 10900 Euclid Avenue, Cleveland, OH 44106, USA

98 Laboratoire Univers et Théorie, Observatoire de Paris, Université PSL, Université Paris Cité, CNRS, 92190 Meudon, France

99 Dipartimento di Fisica e Scienze della Terra, Università degli Studi di Ferrara, Via Giuseppe Saragat 1, 44122 Ferrara, Italy

100 Istituto Nazionale di Fisica Nucleare, Sezione di Ferrara, Via Giuseppe Saragat 1, 44122 Ferrara, Italy

101 Minnesota Institute for Astrophysics, University of Minnesota, 116 Church St SE, Minneapolis, MN 55455, USA

102 INAF-Istituto di Radioastronomia, Via Piero Gobetti 101, 40129 Bologna, Italy

103 Université Côte d'Azur, Observatoire de la Côte d'Azur, CNRS, Laboratoire Lagrange, Bd de l'Observatoire, CS 34229, 06304 Nice Cedex 4, France

104 Institute Lorentz, Leiden University, PO Box 9506, Leiden 2300 RA, The Netherlands

105 Institute for Astronomy, University of Hawaii, 2680 Woodlawn Drive, Honolulu, HI 96822, USA

106 Department of Physics & Astronomy, University of California Irvine, Irvine, CA 92697, USA

107 Department of Astronomy & Physics and Institute for Computational Astrophysics, Saint Mary's University, 923 Robie Street, Halifax, Nova Scotia B3H 3C3, Canada

108 Departamento Física Aplicada, Universidad Politécnica de Cartagena, Campus Muralla del Mar, 30202 Cartagena, Murcia, Spain

109 Department of Physics, Oxford University, Keble Road, Oxford OX1 3RH, UK

110 Department of Computer Science, Aalto University, PO Box 15400, Espoo 00 076, Finland

111 Ruhr University Bochum, Faculty of Physics and Astronomy, Astronomical Institute (AIRUB), German Centre for Cosmological Lensing (GCCL), 44780 Bochum, Germany

112 Université Paris-Saclay, CNRS/IN2P3, IJCLab, 91405 Orsay, France

113 Univ. Grenoble Alpes, CNRS, Grenoble INP, LPSC-IN2P3, 53, Avenue des Martyrs, 38000 Grenoble, France

114 Department of Physics and Astronomy, University of Turku, Vesilinnantie 5, 20014 Turku, Finland

115 Serco for European Space Agency (ESA), Camino bajo del Castillo, s/n, Urbanizacion Villafranca del Castillo, Villanueva de la Cañada 28692, Madrid, Spain

116 ARC Centre of Excellence for Dark Matter Particle Physics, Melbourne, Australia

117 Centre for Astrophysics & Supercomputing, Swinburne University of Technology, Victoria 3122, Australia

118 Oskar Klein Centre for Cosmoparticle Physics, Department of Physics, Stockholm University, Stockholm 106 91, Sweden

119 Astrophysics Group, Blackett Laboratory, Imperial College London, London SW7 2AZ, UK

120 Centre de Calcul de l'IN2P3/CNRS, 21 Avenue Pierre de Coubertin, 69627 Villeurbanne Cedex, France

121 Dipartimento di Fisica, Sapienza Università di Roma, Piazzale Aldo Moro 2, 00185 Roma, Italy

122 Centro de Astrofísica da Universidade do Porto, Rua das Estrelas 4150-762, Porto, Portugal

123 Zentrum für Astronomie, Universität Heidelberg, Philosophenweg 12, 69120 Heidelberg, Germany

124 Dipartimento di Fisica, Università di Roma Tor Vergata, Via della Ricerca Scientifica 1, Roma, Italy

125 INFN-Sezione di Roma 2, Via della Ricerca Scientifica 1, Roma, Italy

126 Dipartimento di Fisica – Sezione di Astronomia, Università di Trieste, Via Tiepolo 11, 34131 Trieste, Italy

127 Department of Astrophysical Sciences, Peyton Hall, Princeton University, Princeton, NJ 08544, USA

128 Niels Bohr Institute, University of Copenhagen, Jagtvej 128, 2200 Copenhagen, Denmark
# Appendix A: Code validation

The analysis presented in this work is performed using the latest version of the code *coffe*. In order to make sure that the results of the analysis can be trusted, we first performed a code validation. As a reference, we chose to use the well-established *CosmoBolognaLib* code from Marulli et al. (2016), which can, among other outputs, compute the redshift-space multipoles of the 2PCF.

<figure><img src="image_10.png" /><figcaption>**Fig. A.1.** Percentage difference between *coffe* and *CosmoBolognaLib* in terms of the $1\sigma$ uncertainties (top panel) and un-marginalised constraints (bottom panel) for the spectroscopic sample of galaxy clustering. This analysis includes four nuisance parameters for the galaxy bias that are marginalised over in the $1\sigma$ constraints.</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>**Fig. A.2.** Percentage difference between *coffe* and *CosmoBolognaLib* in the first three even multipoles of the 2PCF, for various redshifts. The large ‘jump’ in the monopole around $r \sim 180$ Mpc is caused by its passage through zero. The black dashed lines denote a 1% threshold.</figcaption></figure>

The baseline settings used for this code comparison are the same as the ones adopted in EP:VII for the spectroscopic galaxy clustering (GCsp) analysis. In summary:

- The cosmological parameter space is $\theta = \{\Omega_{m,0}, \Omega_{b,0}, w_0, w_a, h, n_s, \sigma_8\}$, that is, a flat cosmology with dynamical dark energy.

<figure><img src="image_12.png" /><figcaption>**Fig. A.3.** Comparison between the monopole from *coffe* and *CosmoBolognaLib* at $\bar{z} = 1$. The dashed line denotes the zero crossing.</figcaption></figure>

- The galaxy sample is split into four redshift bins, with a galaxy number density as specified in Table 2.

- We included the 4 galaxy bias parameters, one in each redshift bin, as nuisance parameters.

- As we are primarily interested in the validation using linear theory only, we set $r_{min} = 22$ Mpc as the smallest separation in each redshift bin.

In Fig. A.1, we present the code comparison. We show the percentage difference between the constraints obtained with the two codes and the mean values of the two results. The top panel refers to $1\sigma$ marginalised constraints, while the bottom panel shows the comparison for the un-marginalised constraints. The largest discrepancies between the two codes are ~2% for the $1\sigma$ errors and ~1% for the un-marginalised constraints. We note that the outcome of the two codes has been compared for several intermediate steps, different settings, and different probe combinations, always leading to an excellent agreement. In particular, we verified that using the covariance from either *coffe* or *CosmoBolognaLib* when computing the constraints has no impact on the result; we show a comparison of the two signals for the various redshifts in Fig. A.2. Even though the hexadecapoles show differences up to 10% and larger in the vicinity of the baryon acoustic oscillation peak, due to the small amplitude of this contribution, this is not relevant for parameter estimation. In Fig. A.3 we show the monopole from both *coffe* and *CosmoBolognaLib* at $z = 1$, with a close-up of some points of interest, notably, the baryon acoustic oscillation peak at ~150 Mpc and the zero crossing at ~180 Mpc.

In order to obtain the Fisher matrix, we need to compute derivatives of the multipoles of the 2PCF with respect to cosmological parameters. As it is not possible to compute them analytically, we resorted to the method of finite differences. Since this method suffers from numerical instabilities, it is necessary to first find the optimal step size that is neither too large (causing the derivative to be too ‘coarse’) nor too small (resulting in errors due to numerical underflow). The final step size used ($10^{-3}$ for all parameters) has proven to be sufficiently accurate at the level of the obtained marginalised constraints for parameters of the $w_0w_a$ CDM model. As shown in Fig. A.4, the difference of the inferred parameters for step sizes $10^{-3}$ and $10^{-4}$ is always below 2% of the standard deviation.
<figure><img src="image_13.png" /><figcaption>**Fig. A.4.** Percentage difference between step sizes $10^{-3}$ and $10^{-4}$ in the $1\sigma$ uncertainties (top panel) and un-marginalised constraints (bottom panel) for the spectroscopic sample of galaxy clustering.</figcaption></figure>

<figure><img src="image_14.png" /><figcaption>**Fig. C.1.** Diagonal entries of the ratio of the unbinned and the binned covariance, for various multipoles, as a function of comoving separation, *d*, at the lowest redshift bin of *Euclid*.</figcaption></figure>

## Appendix B: Fitting functions for $b(z)$ and $s(z)$

For convenience, we provide a polynomial fit (obtained using the Levenberg-Marquardt algorithm) for both the galaxy bias and the local count slope as given below. We set

$$b(z) = \tilde{b}_0 + \tilde{b}_1 z + \tilde{b}_2 z^2 + \tilde{b}_3 z^3, \qquad (B.1)$$

$$s(z) = \tilde{s}_0 + \tilde{s}_1 z + \tilde{s}_2 z^2 + \tilde{s}_3 z^3, \qquad (B.2)$$

with parameters

$$ \begin{aligned} \tilde{b}_0 &= 0.853, & \tilde{b}_1 &= 0.040, & \tilde{b}_2 &= 0.713, & \tilde{b}_3 &= -0.164, \\ \tilde{s}_0 &= 1.231, & \tilde{s}_1 &= -1.746, & \tilde{s}_2 &= 1.810, & \tilde{s}_3 &= -0.505. \end{aligned} \qquad (B.3) $$

In Fig. 3 we compare our best fit with the measurements of the Flagship simulation. In our calculations we do not use these fits, but we present them here for convenience. The Flagship specifics have been estimated for the survey binning as described in Sect. 3, and therefore the fitting functions are adapted to this specific configuration.

## Appendix C: Binned covariance of 2PCF multipoles

In this section we report the exact expression for the covariance adopted in this work. We modified the implementation of the flat-sky, Gaussian covariance reported in Tansella et al. (2018b) in order to include a binning of the Bessel functions. The full expression of the covariance can be written in the same form as in Tansella et al. (2018b):

$$ C[\xi_{\ell}^{j}, \xi_{\ell'}^{k}] = \frac{i^{\ell-\ell'}}{V} \left[ \frac{1}{\tilde{N}} \tilde{G}_{\ell\ell'}(d_j, d_k, \bar{z}) \sum_{\sigma} c_{\sigma} \begin{pmatrix} \ell & \ell' & \sigma \\ 0 & 0 & 0 \end{pmatrix}^2 + \tilde{D}_{\ell\ell'}(d_j, d_k, \bar{z}) \sum_{\sigma} \tilde{c}_{\sigma} \begin{pmatrix} \ell & \ell' & \sigma \\ 0 & 0 & 0 \end{pmatrix}^2 + \frac{2\ell + 1}{2\pi \tilde{N}^2 d_j^2 L_p} \delta_{jk} \delta_{\ell\ell'} \right], \qquad (C.1) $$

where the $\begin{pmatrix} \ell & \ell' & \sigma \\ 0 & 0 & 0 \end{pmatrix}$ denote Wigner 3j symbols; hence, the sum over $\sigma$ goes from $|\ell - \ell'|$ to $\ell + \ell'$. The three terms in the sum

respectively denote the cross-correlation between cosmic variance and Poisson noise, the cosmic variance autocorrelation, and the Poisson noise autocorrelation. Here $V$ denotes the comoving volume of the observed sample, $N$ denotes the average comoving number density of sources, and $L_p$ denotes the pixel size, that is, the minimum comoving distance we can resolve. We note that the coefficients $\{c_\sigma, \tilde{c}_\sigma\}$ depend only on redshift. Their exact expressions are reported in Tansella et al. (2018b), and we repeat them here for the sake of completeness:

$$c_0 = b^2 + \frac{2}{3}bf + \frac{f^2}{5}, \qquad (C.2)$$

$$c_2 = \frac{4}{3}bf + \frac{4}{7}f^2, \qquad (C.3)$$

$$c_4 = \frac{8}{35}f^2, \qquad (C.4)$$

$$\tilde{c}_0 = c_0^2 + \frac{c_2^2}{5} + \frac{c_4^2}{9}, \qquad (C.5)$$

$$\tilde{c}_2 = \frac{2}{7}c_2(7c_0 + c_2) + \frac{4}{7}c_2c_4 + \frac{100}{693}c_4^2, \qquad (C.6)$$

$$\tilde{c}_4 = \frac{18}{35}c_2^2 + 2c_0c_4 + \frac{40}{77}c_2c_4 + \frac{162}{1001}c_4^2, \qquad (C.7)$$

$$\tilde{c}_6 = \frac{10}{99}c_4(9c_2 + 2c_4), \qquad (C.8)$$

$$\tilde{c}_8 = \frac{490}{1287}c_4^2. \qquad (C.9)$$

The main difference between the original implementation in *coffe* and the covariance used in this analysis lies in the computation of $\tilde{G}_{\ell\ell'}$ and $\tilde{D}_{\ell\ell'}$. Here these are estimated as integrals of the binned spherical Bessel functions:

$$\tilde{j}_{\ell}(kd_i) := \frac{4\pi}{V_{d_i}} \int_{d_i-L_p/2}^{d_i+L_p/2} ds \, s^2 j_{\ell}(ks), \qquad (C.10)$$

where $V_{d_i} = \frac{4\pi}{3}(d_{i,max}^3 - d_{i,min}^3)$ is the volume of the distance bin around $d_i$. Thus, we have

$$\frac{\tilde{G}_{\ell\ell'}(d_i, d_j, \bar{z})}{(2\ell + 1)(2\ell' + 1)} = \frac{2}{\pi^2} \int_0^\infty dk \, k^2 P(k, \bar{z}) \tilde{j}_\ell(kd_i) \tilde{j}_{\ell'}(kd_j),$$

$$\frac{\tilde{D}_{\ell\ell'}(d_i, d_j, \bar{z})}{(2\ell + 1)(2\ell' + 1)} = \frac{1}{\pi^2} \int_0^\infty dk \, k^2 P^2(k, \bar{z}) \tilde{j}_\ell(kd_i) \tilde{j}_{\ell'}(kd_j).$$
In fact, it is shown in the literature that the covariance matrix is overestimated when this volume average over the spherical Bessel functions is not applied (see Grieb et al. 2016).

In Fig. C.1 we show the ratio of the diagonal entries of the unbinned and the binned covariance; as we can see, for low separations and large multipoles, the unbinned covariance can be larger than its binned counterpart by more than 20%.

## Appendix D: An analytic expression for the growth rate

In Sect. 2.2 we introduced the growth rate $f(z) := \frac{d\ln\delta}{d\ln a}$. Here we derive an analytical expression for $f(z)$ in linear perturbation theory and compare it to the commonly used expression $f(z) \approx \Omega_m(z)^{0.56}$. The linear density fluctuation in comoving gauge is $\delta(z) \approx D_1(z) \delta(0)$. Following Durrer (2020), we obtain

<figure><img src="image_15.png" /><figcaption>Fig. D.1. An analytic expression for the growth rate. Top: Exact expression for the growth rate, given by Eq. (D.5) (solid blue curve), and the approximate expression, given by Eq. (D.6) (dashed orange curve). Bottom: Relative difference between them, in percentage points. In both cases we assume $\Omega_{m,0} = 0.32$.</figcaption></figure>

$$f(z) = \frac{d \ln D_1}{d \ln a} = -(1+z) \frac{d \ln D_1}{dz}, \qquad (D.1)$$

where $D_1$ is the linear growth factor. In a $\Lambda$CDM universe, $D_1$ is the growing mode solution of the following equation:

$$\ddot{D}_1 + \mathcal{H}\dot{D}_1 = \frac{3}{2}\mathcal{H}^2\Omega_m(a)D_1, \qquad (D.2)$$

with

$$\Omega_m(a) = \frac{\Omega_{m,0} a^{-3}}{\Omega_{m,0} a^{-3} + (1 - \Omega_{m,0})}. \qquad (D.3)$$

We rewrite Eq. (D.2) using a prime to indicate the derivative with respect to $\ln a$:

$$D''_1 + \left(2 - \frac{3}{2}\Omega_m(a)\right) D'_1 = \frac{3}{2}\Omega_m(a)D_1. \qquad (D.4)$$

The analytical solution of Eq. (D.4) in terms of hypergeometric functions (see Abramowitz & Stegun 1972), leads to the following expression for the growth rate:

$$f(z) = \frac{1}{2} \Omega_m(z) \left[ \frac{5}{2F_1\left(\frac{1}{3}, 1; \frac{11}{6}; 1 - \frac{1}{\Omega_m(z)}\right)} - 3 \right]. \qquad (D.5)$$

In the literature (see e.g. Durrer 2020; Linder & Cahn 2007), one often finds the following approximation for the growth rate:

$$f(z) \approx \Omega_m^{0.56}(z). \qquad (D.6)$$

A comparison between eqs. Eq. (D.5) and Eq. (D.6) is shown in Fig. D.1. The approximation is clearly excellent, leading to differences below 1% at all redshifts.

## Appendix E: Expressions for the multipoles of the 2PCF

### E.1. Curved-sky expressions

For completeness, below we provide the relevant curved-sky contributions for the 2PCF, which were first derived in Tansella et al. (2018a). We note that, for the sake of brevity, in the following equations we use the coordinates $r_1 := r(z_1)$, $r_2 := r(z_2)$, and $\theta$, which denote the comoving distances at redshifts $z_1$ and $z_2$ and the angle at the observer, respectively. Furthermore, we use $x_i := x(z_i)$.

We used the following notation for local terms A and B,

$$\xi^{AB}(d, \bar{z}, \mu) = D_1(z_1) D_1(z_2) \times \sum_{\ell,n} (X_{\ell}^{n}|_A + X_{\ell}^{n}|_{AB} + X_{\ell}^{n}|_{BA} + X_{\ell}^{n}|_B) I_{\ell}^{n}(d), \qquad (E.1)$$

and the following for the integrated terms,

$$\xi^{AB}(d, \bar{z}, \mu) = Z|_A + Z|_{AB} + Z|_{BA} + Z|_B. \qquad (E.2)$$

$$X_0^0|_{\text{den}} = b_1 b_2, \qquad (E.3)$$

$$X_0^0|_{\text{RSD}} = f_1 f_2 \frac{1 + 2 \cos^2 \theta}{15}, \qquad (E.4)$$

$$X_2^0|_{\text{RSD}} = -\frac{f_1 f_2}{21} \left[ 1 + 11 \cos^2 \theta + \frac{18 \cos \theta (\cos^2 \theta - 1) r_1 r_2}{d^2} \right], \qquad (E.5)$$

$$X_4^0|_{\text{RSD}} = \frac{f_1 f_2}{35 r^4} \left\{ \begin{aligned} & 4(3 \cos^2 \theta - 1)(r_1^4 + r_2^4) \\ & + r_1 r_2 (3 + \cos^2 \theta) [3(3 + \cos^2 \theta)r_1 r_2 \\ & - 8(r_1^2 + r_2^2) \cos \theta] \end{aligned} \right\}, \qquad (E.6)$$

$$X_0^0|_{\text{den-RSD}} = \frac{b_1 f_2}{3}, \qquad (E.7)$$

$$X_2^0|_{\text{den-RSD}} = -b_1 f_2 \left[ \frac{2}{3} - (1 - \cos^2 \theta) \frac{r_1^2}{d^2} \right], \qquad (E.8)$$

where above and below the indices 1 and 2 indicate that the corresponding quantities are evaluated at redshifts $z_1$ and $z_2$, respectively, corresponding to the pair of voxels.
$$
Z|_{\text{den-magn}} = - \frac{3\Omega_{\text{m,0}}}{2} b_1 \frac{H_0^2}{c^2} \frac{2-5s_2}{r_2} D_1(z_1) \int_0^{r_2} d\lambda \frac{r_2-\lambda}{\lambda} \frac{D_1(\lambda)}{a(\lambda)} \\
\left[ 2\chi_1 \lambda \cos \theta I_1^1(d) - \frac{r_1^2 \lambda^2 (1-\cos^2 \theta)}{d^2} I_2^0(d) \right], \tag{E.9}
$$

$$
Z|_{\text{magn}} = \frac{9\Omega_{\text{m,0}}^2 H_0^4}{4 c^4} \frac{(2-5s_1)(2-5s_2)}{r_1 r_2} \int_0^{r_1} d\lambda \\
\int_0^{r_2} d\lambda \frac{(r_1-\lambda)(r_2-\lambda')}{\lambda\lambda'} \frac{D_1(\lambda)D_1(\lambda')}{a(\lambda)a(\lambda')} \left\{ \frac{2}{5}(\cos^2\theta - 1)\lambda^2\lambda'^2 I_0^0(d) \right. \\
+ \frac{4d^2 \cos(\theta)\lambda\lambda'}{3} I_0^2(d) + \frac{4 \cos(\theta)\lambda\lambda' [d^2 + 6 \cos(\theta)\lambda\lambda']}{15} I_1^1(d) + \frac{2(\cos^2\theta - 1)\lambda^2\lambda'^2 [2r^4 + 3 \cos(\theta)d^2\lambda\lambda']}{7d^4} I_2^0(d) \\
+ \frac{2 \cos(\theta)\lambda\lambda' [2d^4 + 12 \cos(\theta)d^2\lambda\lambda' + 15(\cos^2\theta - 1)\lambda^2\lambda'^2]}{15d^2} I_3^1(d) \\
\left. + \frac{(\cos^2\theta - 1)\lambda^2\lambda'^2 [6d^4 + 30 \cos(\theta)d^2\lambda\lambda' + 35(\cos^2\theta - 1)\lambda^2\lambda'^2]}{35d^4} I_4^0(d) \right\}, \tag{E.10}
$$

where

$$
I_{\ell}^{n}(d) = \frac{1}{2\pi^2} \int_{0}^{\infty} dk k^2 P_{\delta\delta}(k, z=0) \frac{j_{\ell}(kd)}{(kd)^n}. \qquad (\text{E.11})
$$

We note that inside the integral, $d^2 = r_2^2 + \lambda^2 - 2r_2\lambda \cos\theta$ in the case of density-magnification, and $d^2 = \lambda_1^2 + \lambda_2^2 - 2\lambda_1\lambda_2 \cos\theta$ in the case of magnification-magnification, while $\theta$ is the angle at the observer between the two lines of sight. The result for the other cross-correlations can be obtained by performing the substitution $2 \leftrightarrow 1$.

E.2. Flat-sky expressions

The flat-sky expressions for the multipoles of the density-magnification and magnification-magnification terms implemented in
coffe are given by (see Jelic-Cizmek 2021)

$$
\begin{equation}
\begin{split}
\xi_{\ell}^{\text{den-magn}}(d, \bar{z}) = & -\frac{2\ell + 1}{2} \frac{3}{8\pi} \Omega_{\text{m},0} \frac{H_0^2}{c^2} D_1^2(\bar{z})(1+\bar{z})d^2 \\
& \times \{[2-5s_1(\bar{z})]b_2(\bar{z}) + [2-5s_2(\bar{z})]b_1(\bar{z})\} \\
& \times \pi^{\frac{3}{2}} \frac{2^{\frac{5}{2}}}{2^{\frac{3}{2}}} \sum_{k=0}^{\lfloor \frac{\ell}{2} \rfloor} \frac{(-1)^k}{2^k} \binom{\ell}{k} \binom{2\ell-2k}{\ell} \left[\frac{\ell}{2}-k\right]! I_{\ell/2-k+3/2/}^{\ell/2-k+1/2}(d),
\end{split}
\tag{E.12}
\end{equation}
$$

$$
\begin{equation}
\begin{split}
\xi_{\ell}^{\text{magn-magn}}(d, \bar{z}) = C(\ell) \frac{(3\Omega_{\text{m},0} H_0^2)^2 [2 - 5s_1(\bar{z})][2 - 5s_2(\bar{z})]}{8\pi c^4 \bar{r}^2} \\
\times \int_0^{\bar{r}} d\lambda \, [\lambda(\bar{r} - \lambda)]^2 D_1^2[z(\lambda)][1 + z(\lambda)]^2 \mathcal{K}_{\ell} \left(\frac{\lambda}{\bar{r}} d\right),
\end{split}
\tag{E.13}
\end{equation}
$$

where $\bar{z} = (z_1 + z_2)/2$ is the mean redshift, $\bar{r} = r(\bar{z})$ is the comoving distance evaluated at $\bar{z}$, $\lfloor \cdot \rfloor$ denotes the floor function, and we defined

$$
C(\ell) = \frac{2\ell + 1}{2} \frac{\ell!}{2^{\ell-1} [(\ell/2)!]^2}, \qquad (\text{E.14})
$$

$$
\mathcal{K}_{\ell}(d) = 2\pi^2 d I_{\ell}^{1}(d). \qquad (\text{E.15})
$$

**Appendix F: Additional material**

In this appendix, we include two additional tables that complement the content presented in Sect. 5. Specifically, in Table F.1, we provide supplementary information regarding the Fisher full-shape analysis for both the ΛCDM and w₀wₐCDM models. Furthermore, in Table F.2, we present similar results for the MCMC analysis, focusing on the two parametrisations of the ΛCDM model: {Ωm,0, Ωb,0} (baseline analysis) and {ωm,0, ωb,0}. The {ωm,0, ωb,0} parametrisation offers the advantage of faster convergence in the MCMC analysis, as the posterior distribution of the cosmological parameters becomes more Gaussian.
<table><caption>**Table F.1.** Constraints for a ΛCDM (top) and a $w_0w_a$CDM (bottom) cosmology obtained from the Fisher forecast, without lensing magnification (upper) and with lensing magnification (middle), as well as the shift (lower). Note that the last row in the table uses the constraints from the case with lensing magnification. Also note that the percentage constraints for $w_a$ are undefined since the fiducial value is 0, and hence here we just show the result as if it had a fiducial value of 1 instead.</caption><thead><tr><th>quantity</th><th>θ</th><th>Ω<sub>m,0</sub></th><th>h</th><th>n<sub>s</sub></th><th>Ω<sub>b,0</sub></th><th>σ<sub>8</sub></th><th>w<sub>0</sub></th><th>w<sub>a</sub></th></tr></thead><tbody><tr><td>σ(θ)</td><td></td><td>0.0361</td><td>0.0380</td><td>0.0109</td><td>0.0057</td><td>0.0277</td><td>—</td><td>—</td></tr><tr><td>σ(θ)/θ(%)</td><td></td><td>11.32</td><td>5.67</td><td>1.13</td><td>11.56</td><td>3.33</td><td>—</td><td>—</td></tr><tr><td>σ(θ) (L)</td><td></td><td>0.0346</td><td>0.0364</td><td>0.0108</td><td>0.0054</td><td>0.0263</td><td>—</td><td>—</td></tr><tr><td>σ(θ)/θ(%) (L)</td><td></td><td>10.85</td><td>5.43</td><td>1.12</td><td>11.06</td><td>3.17</td><td>—</td><td>—</td></tr><tr><td>Δ(θ)</td><td></td><td>0.0185</td><td>-0.0199</td><td>-0.0044</td><td>0.0031</td><td>-0.0195</td><td>—</td><td>—</td></tr><tr><td>Δ(θ)/σ(θ)</td><td></td><td>0.53</td><td>-0.54</td><td>-0.41</td><td>0.56</td><td>-0.73</td><td>—</td><td>—</td></tr><tr><td>σ(θ)</td><td></td><td>0.057</td><td>0.061</td><td>0.011</td><td>0.009</td><td>0.127</td><td>1.294</td><td>6.302</td></tr><tr><td>σ(θ)/θ(%)</td><td></td><td>18.06</td><td>9.03</td><td>1.13</td><td>18.30</td><td>15.3</td><td>129.4</td><td>630.2</td></tr><tr><td>σ(θ) (L)</td><td></td><td>0.057</td><td>0.060</td><td>0.011</td><td>0.009</td><td>0.119</td><td>1.162</td><td>5.678</td></tr><tr><td>σ(θ)/θ(%) (L)</td><td></td><td>18.01</td><td>9.01</td><td>1.13</td><td>18.24</td><td>14.29</td><td>116.2</td><td>567.7</td></tr><tr><td>Δ(θ)</td><td></td><td>-0.0019</td><td>0.0015</td><td>-0.0048</td><td>-0.0001</td><td>-0.023</td><td>0.040</td><td>-0.682</td></tr><tr><td>Δ(θ)/σ(θ)</td><td></td><td>-0.033</td><td>0.024</td><td>-0.437</td><td>-0.011</td><td>-0.191</td><td>0.034</td><td>-0.120</td></tr></tbody></table>

<table><caption>**Table F.2.** Constraints for a ΛCDM cosmology obtained from the MCMC analysis, without lensing magnification (upper), with lensing magnification (middle), and with the shift (lower). Note that the last row in the table uses the constraints from the case with lensing magnification. In the top block, the analysis is run using the parametrisation {$\Omega_{m,0}$, $\Omega_{b,0}$}, while the bottom block refer to the result with the parametrisation {$\omega_{m,0}$, $\omega_{b,0}$}</caption><thead><tr><th>quantity</th><th>θ</th><th>Ω<sub>m,0</sub></th><th>ω<sub>m,0</sub></th><th>h</th><th>n<sub>s</sub></th><th>Ω<sub>b,0</sub></th><th>ω<sub>b,0</sub></th><th>σ<sub>8</sub></th></tr></thead><tbody><tr><td>σ(θ)</td><td></td><td>0.046</td><td>—</td><td>0.0425</td><td>0.011</td><td>0.0071</td><td>—</td><td>0.031</td></tr><tr><td>σ(θ)/θ(%)</td><td></td><td>13.031</td><td>—</td><td>6.630</td><td>1.152</td><td>13.076</td><td>—</td><td>3.856</td></tr><tr><td>σ(θ) (L)</td><td></td><td>0.0425</td><td>—</td><td>0.044</td><td>0.011</td><td>0.0065</td><td>—</td><td>0.032</td></tr><tr><td>σ(θ)/θ(%) (L)</td><td></td><td>13.158</td><td>—</td><td>6.567</td><td>1.147</td><td>13.206</td><td>—</td><td>3.855</td></tr><tr><td>Δ(θ)</td><td></td><td>0.03</td><td>—</td><td>-0.029</td><td>-0.004</td><td>0.0047</td><td>—</td><td>-0.026</td></tr><tr><td>Δ(θ)/σ(θ)</td><td></td><td>0.71</td><td>—</td><td>-0.66</td><td>-0.36</td><td>0.72</td><td>—</td><td>-0.81</td></tr><tr><td>σ(θ)</td><td></td><td>—</td><td>0.0012</td><td>0.043</td><td>0.011</td><td>—</td><td>0.00028</td><td>0.0315</td></tr><tr><td>σ(θ)/θ(%)</td><td></td><td>—</td><td>0.839</td><td>6.630</td><td>1.152</td><td>—</td><td>1.271</td><td>3.856</td></tr><tr><td>σ(θ) (L)</td><td></td><td>—</td><td>0.0425</td><td>0.044</td><td>0.011</td><td>—</td><td>0.0065</td><td>0.032</td></tr><tr><td>σ(θ)/θ(%) (L)</td><td></td><td>—</td><td>0.837</td><td>6.567</td><td>1.147</td><td>—</td><td>1.274</td><td>3.855</td></tr><tr><td>Δ(θ)</td><td></td><td>—</td><td>0.0003</td><td>-0.029</td><td>-0.004</td><td>—</td><td>0.00005</td><td>-0.026</td></tr><tr><td>Δ(θ)/σ(θ)</td><td></td><td>—</td><td>0.71</td><td>-0.66</td><td>-0.36</td><td>—</td><td>0.18</td><td>-0.81</td></tr></tbody></table>