Friedmann-Robertson-Walker Flrw
email: michel-andres.breton@obspm.fr

-Kirkwood and Yvon CDM Cold Dark Matter CIC Cloud-In-Cell CMB Cosmic Microwave Background CPU Central Processing Unit DM Dark Matter e.o.m equation of motion e.o.s equation of state FMM Fast Multipole Method FRW

Keywords: cosmologie, simulations numériques, théorie, gravitation, relativité générale, grandes structures de l'univers cosmology, numerical simulations, theory, gravitation, general relativity, Large-Scale Structures v 2PCF 2-Point Correlation Function AP Alcock-Paczynski AMR Adaptive Mesh Refinement BAO Baryon Acoustic Oscillations BAP

Titre : Construction d'observables en cosmologie : vers de nouvelles sondes pour le secteur sombre Résumé : La nature de l'énergie noire et de la matière noire est encore un mystère. De futures missions spatiales nous permettront d'observer les propriétés et la distribution de millards de galaxies. Mais quelle est la meilleure manière de contraindre la physique de ces composantes inconnues avec une telle quantité de données ? Le but de cette thèse est de chercher de nouvelles sondes du secteur sombre de l'univers dans le régime linéaire et non-linéaire de la formation des structures. La physique du secteur sombre laisse des empreintes dans la distribution des grandes structures à un temps donné (espace « réel »). Cependant leur distribution apparente telle que vue par un observateur (espace des redshifts) est légèrement différente de celle dans l'espace réel. En effet, les messagers (comme la lumière) sont perturbés pendant leur trajet depuis leur source vers l'observateur. Quelle est alors la relation entre espace réel et espace des redshifts ? Comment extraire des informations cosmologiques de cette transformation ? L'essentiel de mon travail a été de simuler des observables tout en prenant en compte tous les effets relativistes au premier ordre dans l'approximation de champs faible. Le lentillage gravitationnel faible modifie la position apparente des sources ainsi que leurs propriétés (forme, luminosité) tandis que les perturbations en redshift changent la distance radiale apparente des objets. Pour aborder ces questions, nous avons réalisé une simulation N-corps de grande taille et très résolue, idéale pour étudier les halos avec une taille allant de celle de la Voie Lactée à celle des amas de galaxie. Ensuite, nous avons suivi le trajet de photons dans la simulation en intégrant directement les équations des géodésiques avec pour seule approximation l'approximation de champs faible. Nous avons aussi développé un algorithme qui nous permet de connecter un observateur à des sources via des géodésiques nulles. La matrice de lentillage est ainsi évaluée grâce à la déformation d'un faisceau lumineux tandis que le décalage spectral vers le rouge est directement calculé via sa définition donnée par la relativité générale. Grâce à cette bibliothèque de suivi de rayons lumineux, nous avons pu construire des catalogues de halos qui prennent en compte les effets relativistes.

Avec ces catalogues nous avons pu retrouver des résultats standard à propos des distorsions dans l'espace des redshifts, du lentillage, et de l'effet Sachs Wolfe intégré avec grande précision. Nous avons également étudié le couplage subtil entre les distorsions dans l'espace des redshifts et le lentillage : Le lentillage doppler. Enfin, nous avons exploré en détail les distorsions dans l'espace des redshifts dues aux effets relativistes. Avec notre simulation nous avons pu, pour la première fois, calculer le dipole de la function de corrélation croisée de halos entre 5 et 150 h -1 Mpc, en incluant tous les termes relativistes. Aux grandes échelles nous retrouvons les résultats de la théorie linéaire : le dipole est dominé par l'effet Doppler dû à la présence d'un observateur à distance finie. Cependant, aux échelles non linéaires le dipole est dominé par l'effet de décalage spectral vers le rouge gravitationnel. Le dipole peut être une sonde du potentiel et donc du secteur sombre.

Ce travail trouve de nombreuses d'applications : chaque corrélation croisée entre différentes observables (liées aux effets relativistes) pour différentes sources à des positions différentes peut être une nouvelle sonde pour le secteur sombre.

List of Figures

 2.4Projected DM density at Gpc scale around a massive halo taken from the DEUS-FUR simulation [START_REF] Alimi | DEUS Full Observable {\Lambda}CDM Universe Simulation: the numerical challenge[END_REF]Rasera et al., 2014;[START_REF] Bouillot | Probing dark energy models with extreme pairwise velocities of galaxy clusters from the DEUS-FUR simulations[END_REF]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 2-point correlation function from [START_REF] Eisenstein | Detection of the Baryon Acoustic Peak in the Large-Scale Correlation Function of SDSS Luminous Red Galaxies[END_REF] on the Luminous Red Galaxies (LRG) sample of the SDSS survey data. . . . . . . . . . . . . . . . . . 2.6 In black dashed line we have a linear power spectrum at z = 0 while in red solid line we have the power spectrum computed using HALOFIT calibrated on our simulation at z = 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.7 Sketch of the lensing formalism. In solid line we have the trajectory of a photon coming from a given source and deflected on the lens plane by one or multiple objects. In dashed line we have the unperturbed geodesic. . . . . . . 2.8 Cosmic shear computed in [START_REF] Kilbinger | CFHTLenS: combined probe cosmological model comparison using 2D weak gravitational lensing[END_REF] on the CFHTLenS data survey. 2.9 Sketch of different effects which modify the apparent size of sources at a given observed redshift. Top panel: gravitational convergence, it is the usual convergence effect, an object is seen larger or smaller depending on photon propagation. In solid line we have photon trajectories. Bottom panel: Doppler convergence, the arrows refer to the peculiar velocities of sources. For both panels we have the constant redshift hypersurface as a bold solid line, in dotted lines we have the unperturbed geodesics. The sources are shown as circles with solid contour while circles with dashed contours indicates the sources as they appear for an observer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.10 Sketch of the wide-angle effect on RSD. The solid circle shows the real-space distribution of sources and in dashed lines we have tangent lines to the distribution. Due to the finite observer, the distance at which peculiar velocities are normal to the l.o.s is different from the one with an observer at infinity. This means that more sources are shifting toward than receding from the observer, leading to an asymmetry along the l.o.s. . . . . . . . . . . . . . . . . . . . . . . 2.11 Sketch of the l.o.s divergence effect on RSD. In solid circles we show distributions of objects, the arrows refer to peculiar the overall peculiar velocity of the distribution. Dashed circles show the observed distribution. . . . . . . . . The first ray will generally miss the source, we then iterate using Newton's method in order to get a new initial angle. In this example we iterate twice to find a ray close enough to the source at the same radius, the initial angle of ζ 2 is given by θ and is interpreted as the seen angle. From [START_REF] Breton | Imprints of relativistic effects on the asymmetry of the halo crosscorrelation function: from linear to non-linear scales[END_REF] . . . . . . . . . . . . . . . . . . . . . 3.9 Sketch of the ray-bundle method used to compute the Jacobian distortion matrix for a source (blue circle). In black circles we have the reference points for the derivation. We launch photons towards these points but due to lensing the photons will not arrive at the same location (red circles) on the plane orthogonal to the l.o.s. We use finite displacement between black and red circles to compute the Jacobian. . 4.5 From Breton et al. (2018), we show the matter monopole auto-correlation at z = 0.34 computed on the unperturbed FLRW light cone compared with COS-MICEMU (Heitmann et al., 2016). Subplot shows the relative difference. . . . . 4.6 For a fixed comoving distance hypersurface at z ≈ 0. 4.8 From Breton et al. (2018), absolute value of the quadrupole auto-correlation in redshift space (Doppler term only). Red full lines give the prediction from RegPT [START_REF] Taruya | Baryon acoustic oscillations in 2D: Modeling redshift-space power spectrum from perturbation theory[END_REF]Taruya et al., 2012). Black circles give the computation on the full light-cone. Purple triangles gives the computation using a weighted average on multiple light-cone shells. The computation is done using halos with a linear bias b = 1.08. . . . . . . . . . . 4.9 Cosmic shear correlation function computed in the RAYGALGROUPSIMS simulation with halos. Red solid line and blue solid line shows the theoretical predictions for respectively ξ + and ξ -using our calibration (using snapshots from the simulation) on HALOFIT for the power spectrum. In red dashed line and blue dashed line we show the prediction using the [START_REF] Takahashi | Revising the Halofit Model for the Nonlinear Matter Power Spectrum[END_REF] HALOFIT model for the non-linear power spectrum . The predictions where computed with a modified version of NICAEA [START_REF] Kilbinger | Precision calculations of the cosmic shear power spectrum projection[END_REF]. In red circles we have ξ + and in blue triangles ξ -. . . . . . . . . . . . . . . . . . . . . 4.10 For a single photon we estimate the derivative of the potential w.r.t the affine parameter with two methods. In blue solid lines we have dφ/dλ computed with Method 1 while in red dashed lines we use the Method 2. In the left panel we follow the photon during its full propagation while in the right panel we zoom in a tighter redshift bin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11 For a single photon we estimate the time derivative of the potential effect with two methods. In blue solid lines we have the ISW/RS effect computed with Method 1 while in red dashed lines we use the Method 2. In the left panel we follow the photon during its full propagation while in the right panel we zoom in a tighter redshift bin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.12 ISW/RS angular power spectrum at different redshifts. In black solid lines we have the linear prediction for the ISW effect. In red dotted-dashed lines we have the angular power spectrum D = ( + 1)C /(2π) using Method 1 and in green dashed liens we have the angular power spectrum using Method 2.105 4.13 Relative error between Method 1 and Method 2 for the ISW/RS angular power spectrum at different redshifts. In blue solid lines we have the relative error and the black line show the 1% error. . . . . . . . . . . . . . . . . . . . . . . . . 4.14 Relative difference (P κ (z) -P κ ( z)) /P κ (z) of the gravitational convergence power spectrum at constant homogeneous redshift and constant inhomogeneous redshift at z = 0.09 for a simulation box length of 656.25 hMpc -1 . . . . . . . . 4.15 Fullsky maps of the radial velocity field at z = 0.09 on the simulation of box length 656.25 h -1 Mpc. Top shows the velocity field using the CIC interpolation while bottom shows the DTFE implementation. . . . . . . . . . . . . . . . 4.16 Angular power spectrum of the radial velocity field at z = 0.09. In blue and red we have the result from our simulations using respectively the DTFE and CIC implementations of the velocity field. In dotted, dash-dotted and dashed lines we have respectively the predictions for linear theory, [START_REF] Jennings | An improved model for the non-linear velocity power spectrum[END_REF] fit, and 2-loop RegPT (Taruya et al., 2012). . . . . . . . . . . . . . . . . . . . . .

Introduction 2

Chapter 1. Introduction Some of the most important questions in contemporary physics are cosmological. What are exactly these dark matter and dark energy components which dominate the energy content of our universe according to the concordance model in cosmology? More and more missions were, are, and will be trying to answer this question. For dark matter, particle physicists are conducting laboratory experiments to find dark-matter particles in the form of Weakly Interacting Massive Particles (WIMPs). However most of our knowledge about the dark sector of the universe comes from astrophysics. The difference with other fields of physics is that we cannot perform multiple times the same experiments, we only have one universe, one sky from which we receive messengers.

To extract information from this unique realization we need to model properly the properties of the universe as it is, or as we believe it is. Unfortunately we do not observe the universe in itself but via messengers, which narrows down the effective volume from which we know the universe. Moreover our perception is also sensitive to deformations due to the properties of the messengers and the matter next to them. This means that the universe we observe is not the "real" universe but rather a "distorted" universe. What looks like a major drawback at first sight is a force since these deformations give us relevant informations on our universe. However to extract cosmological informations from these distortions, we need a deep knowledge of this transformation or mapping from the "real space" (i.e. universe as it is at a given time) to the "redshift space" (i.e. universe as observed). This is the goal of this thesis.

Due to their proper motion, the apparent distribution of galaxies in the universe is distorted, these are the (standard) "Redshift-Space Distortions" (RSD). The knowledge of the quadrupole of the galaxy two-point correlation function put constraints on the velocity field of galaxies. On the other hand, because of the deflection of light-rays, the shape and angular position of the galaxies is changed, this is the so-called "Weak-Lensing" (WL). From the apparent ellipticities of galaxies, one can constrain the potential along the line of sight. However these are not the only effects, there are many more which are sometimes neglected: gravitational redshift, transverse Doppler effect, Integrated Sachs Wolfe effect (ISW), etc. Behind the apparent diversity of effects related to this mapping from real space to redshift space, there is a common phenomena: light propagation in a perturbed universe. The physics of light propagation is governed by General Relativity (GR) in the weak-field regime.

While a proper relativistic treatment is performed for the propagation of light from the Cosmic Microwave Background (CMB), it is not the case for galaxies. Some recent work [START_REF] Yoo | New perspective on galaxy clustering as a cosmological probe: General relativistic effects[END_REF]Yoo, 2010;Bonvin and Durrer, 2011;Challinor and Lewis, 2011) have extended the analysis to galaxy redshift surveys at large scales. However both CMB physics and large scale structuration lie in the linear regime of structure formation. Can we perform a relativistic treatment of light propagation in the weak-field approximation down to non-linear scales?

Because of non-linearities the problem becomes analytically intractable and one needs to resort on advanced numerical methods. Moreover since these effects are subtle, largevolume and high-resolution simulations are required to obtain large statistics and good accuracy. This becomes a High Performance Computing (HPC) problem. In this thesis we have therefore addressed the question of the non-linear mapping from real space to redshift space using large cosmological simulations and sophisticated ray-tracing techniques. This manuscript begins with the description of the theoretical background, starting from homogeneous cosmology and initial conditions we describe the dynamics of the universe (the "real" universe), the propagation of messengers and what we finally observe (weaklensing, redshift-space distortions). In each section we describe the fundamental equations that will be used afterwards and we provide some simplified analytical formulae (such as linear theory for instance) to better understand the physics. In the second part, we describe the numerical methods. Again, we start with the description of initial condition generation, then we introduce the dynamical solver and the ray-tracing techniques which are at the heart of this manuscript. We achieve this part with the description of our statistical tools. In the third part, we present the results obtained during this thesis. We start with the introduction of the RayGalGroupSims simulations that were performed during this thesis and the relativistic halo catalogs that were produced. Then we present the results from standard analysis (RSD, WL and ISW independently) where we obtained accurate results. We then move to Doppler lensing where both standard RSD and WL play a role together. Finally, we present our main results about the asymmetry of the halo cross-correlation where all the relativistic effects play a role together.

While the work presented here was extensively done numerically using HPC, we carefully compare our results to theoretical predictions and test new probes of the dark sector which could be used in a complementary manner with the usual cosmological probes in order to constrain cosmology, modified theories of gravity and the physics of the dark sector.

Chapter 2 Theoretical framework 6 Chapter 2. Theoretical framework

Background cosmology

Historical context: The expanding Universe

Cosmology is the science interested in the universe at the largest temporal and spatial scales. At these scales, the leading force is the gravitational force and therefore the framework used in cosmology is General Relativity (GR). Interestingly, soon after Einstein's 1915 paper on GR he considered the cosmological case, taking the universe as a whole and discussing boundary conditions. In Newtonian physics, the field equation is the Poisson equation

∆Φ = 4πGρ, (2.1)
with ∆ the Laplacian operator, Φ the gravitational potential, G the gravitational constant and ρ the density. An infinite amount of matter with a constant density leads to an illdefined gravitational potential. On the other hand considering a finite amount of matter in an infinite universe would obviously lead to an overall collapse due to the mutual attractive forces. To bypass this issue, a constant was introduced in the Poisson equation which now reads

∆Φ -λΦ = 4πGρ, (2.2)
with λ a constant which modifies the gravitational force and is only relevant at very large distance. In his 1917 paper recognized as the foundation of cosmology, Einstein starts with this analogy to Newtonian physics, acknowledging the same issue with the GR field equation when considering a static universe. This is why he introduced the cosmological constant Λ. It is important to note that at this time, Einstein was not necessarily against the idea of a non-static universe but rather he did not think about this possibility: it was natural to use a metric describing a static universe and observations could not probe objects far enough to detect an overall receding movement (velocities dominated by peculiar velocities).

In the next decade, to explain the receding of extra-galactic nebulae w.r.t us, [START_REF] Lemaître | Un Univers homogène de masse constante et de rayon croissant rendant compte de la vitesse radiale des nébuleuses extra-galactiques[END_REF] proposed that the universe radius could increase leading to an expanding universe. Soon after, [START_REF] Hubble | A Relation between Distance and Radial Velocity among Extra-Galactic Nebulae[END_REF] proposed a distance-velocity relation based on observations: objects farther away from us recede with a higher velocity. This was estimated from the redshift, meaning the shift in the position of emission lines due to Doppler effect. Since all the objects (except for the closer ones) were redshifted, it was assumed that this behaviour could not come from these objects peculiar velocities (in that case there should be as much redshift as blueshift) but rather to the expansion of the universe itself. From the redshift we can infer the distance-velocity by a simple relation

v = H 0 d, (2.3)
with v the velocity, d the proper distance and H 0 the Hubble constant today which was estimated at the time to be H 0 = 500 km s -1 Mpc -1 . However this measure was not very accurate due to the sampling which was rather close (2 Mpc at most) and problems in cepheids calibration. At these scales we have a poor S/N ratio as shown in [START_REF] Freedman | Final Results from the Hubble Space Telescope Key Project to Measure the Hubble Constant[END_REF] which displays the results of the Hubble Space Telescope project to measure the Hubble constant, estimating the distance-velocity relation for scales until roughly 400 Mpc. The Hubble constant can be conveniently rewritten as H = 100h km s -1 Mpc -1 where we need to find the dimensionless Hubble parameter h. Recently, Planck Collaboration et al. (2016) estimated h ≈ 0.67.

In this section we briefly review the equations for homogeneous cosmology (not accounting for perturbations). For observational (and philosophical) reasons, we assume that the universe is overall spatially homogeneous and isotropic. Homogeneous means that we are not at a particular location in the universe (Copernican principle) and that the universe is similar by translation. Isotropic means that everything looks the same in every direction.

A homogeneous and isotropic metric

A homogeneous and isotropic 3D space allow for three simple topological cases: spherical, hyperbolic and flat. For the space-time metric this reads

ds 2 = g µν dx µ dx ν = -c 2 dt 2 + a 2 (t) dχ 2 1 -kχ 2 + χ 2 dθ 2 + sin 2 (θ)dφ 2 ,
(2.4) also known as the Friedman-Robertson-Walker (FRW) metric written in spherical coordinates. We note that Greek indices run from 0 to 4 and Latin indices from 1 to 4. Here ds is the infinitesimal local space-time displacement and k depends on the spatial curvature. For k = -1, 0, 1 we have respectively a hyperbole, a plane and a sphere. In terms of 3+1 decomposition (decoupling space and time and considering the spatial part at a given time slice), the spatial part of the metric describe a closed (sphere), flat (plane) or open (hyperbole) universe. We also defined the comoving distance χ as

χ = d a(t) , (2.5)
where d is the physical distance between two points and a(t) the time-dependent scale factor, describing the homothetic transformation of the spatial part of the metric and usually set to one today. In an expanding universe, d is the physical distance between two points which grows with a(t) while χ is the comoving distance "correcting" for the expansion. This means that every objects recedes from one another due to the expansion (not peculiar velocities) and their physical distance will increase but their comoving distance remains the same. The metric relates to the content of the universe through the field equation, which in cosmology is the Einstein equation (with an additive cosmological constant Λ) (2.6) where R µν is the Ricci tensor which is the trace of the Riemann tensor which completely defines the space-time deformations. R is the Ricci scalar as R = g µν R µν . T µν is the stressenergy tensor which reads (for a homogeneous and perfect fluid)

R µν - 1 2 Rg µν + Λg µν = 8πG c 4 T µν ,
T µν = (ρ + P)u µ u ν + Pg µν .
(2.7)

Solving this equation for a FRW metric yields the Friedmann equations

ȧ a 2 = 8πG 3 ρ - k a 2 , (2.8) ä a = - 4πG 3 (ρ + 3p),
(2.9) with ρ and p the density and pressure of the universe content. These equations are central to further considerations in cosmology in the homogeneous and inhomogeneous case. From the Friedmann-Lemaître-Robertson-Walker (FLRW) metric, meaning the FRW metric where the Chapter 2. Theoretical framework evolution of the scale factor is governed by the Friedmann-Lemaître equations, the redshift is related to the scale factor by the simple relation (in a flat universe)

a = 1 1 + z , (2.10)
with z the redshift. Time-dependent quantities can either be written w.r.t the time, scale factor, redshift or comoving distance, these quantities giving the same information for a homogeneous and isotropic metric.

Universe content

The e.o.s reads w = p/ρ, meaning that if the universe has an accelerated expansion, we necessarily have w < -1/3 which describes the dark energy component. The e.o.s is an important value which gives us the evolution of density for any component as (2.11) with the subscript i denoting the component ρ i = (ρ r , ρ m , ρ DE ). The universe content can be decomposed principally in 3 parts which does not interact. For the concordance model, namely the ΛCDM cosmology, observations give an estimation for the composition of the universe as 1. Radiation (< 0.01%): this refers to massless particles (photons) and relativistic species as neutrinos. The e.o.s for radiation is w = 1/3, meaning the radiation density decreases as a -4 . Radiation was especially relevant at early times a 10 -4 , today radiation accounts for a negligible amount of the total content of the universe. In a radiation-dominated universe, a ∝ t 1/2 , meaning the Hubble parameter H = ȧ/a is proportional to a -2 with a dot denoting a derivative w.r.t the time.

ρ i ∝ a -3(1+w i ) ,
2. Matter (32%): this is composed of two types: baryonic matter (i.e. ordinary matter) and dark matter. The former relates to usual matter which we can observe while the latter only interacts gravitationally with the former. At first, the motivation for this dark component was to explain the rotation curves of galaxies (as well as the velocity of galaxies within clusters). They did not give a similar mass as the one deduced from photometry. Today we have stronger probes for dark matter as the power spectrum of the CMB or galaxies as we shall see later. There are different models for dark matter, for example cold dark matter (CDM), warm dark matter (WDM) or hot dark matter (HDM), all referring to the physical properties of the fluid from non-relativistic CDM to relativistic HDM. In the concordance model we consider a CDM fluid. For a ΛCDM cosmology baryonic matter accounts for ≈ 5% of the universe content while CDM accounts for 27%. The typical velocity of galaxies is 100km s -1 , which is negligible compared to its mass. Matter is therefore approximated as a pressureless fluid, leading to an e.o.s w = 0 meaning matter density decreases as a -3 . In a matter-dominated universe, for roughly 10 -4 < a < 0.7 the scale factor scales as a ∝ t 2/3 and the Hubble parameter H ∝ a -3/2 .

3. Dark Energy (68%): The last component which dominates today since a ≈ 0.7 is dark energy. This component was added to account for the accelerated expansion of the universe (e.o.s w < -1/3). In the concordance model this component is described by the cosmological constant Λ with w = -1. For a dark energy dominated universe (as is the case today), a ∝ exp {Ht} with a constant Hubble parameter H = H 0 .

From the first Friedmann equation Eq. (2.8) and assuming k = 0, we can define a critical density as

ρ crit = 3H 8πG ,
(2.12) which gives the total energy density of the universe component without dissociating them.

From this we can define the density ratios Ω i = ρ i /ρ crit for each component. Now accounting for the curvature term in Eq. (2.8), we define an effective "fluid" as

Ω k = -k/(H 2 a 2 )
where the e.o.s would give w = -1/3. With this definition we have straightforwardly (2.13) This finally gives the evolution of the (normalized) Hubble parameter (2.14) where a subscript "0" denotes the evaluation of a given quantity today (i.e. at a = 1) and DE = Λ meaning the dark energy component is a cosmological constant. In practice, recent observations have shown that ρ crit is very close to 1, and therefore the curvature is almost null. Depending on the underlying cosmology and amount of different components, the history of the universe will drastically change. We note that if we did not have a cosmological constant as dark energy, we could account for a redshift-depending e.o.s w(z) [START_REF] Linder | Exploring the Expansion History of the Universe[END_REF].

Ω r + Ω m + Ω k + Ω DE = 1.
E(a) = H(a) H 0 = a -4 Ω r,0 + a -3 Ω m,0 + a -2 Ω k,0 + Ω Λ ,
From now on we consider a cosmological constant, we therefore have ρ DE = ρ Λ = constant.

Distances

Here we review the different distances in cosmology and how they relate. Distances are extremely important since their estimation is the basis upon which we analyze the data.

Comoving distance

The comoving distance can be written as

χ = dt a(t ) = d H z 0 dz E(z ) . (2.15)
This is the radial comoving distance with d H = c/H 0 is the Hubble distance. Indeed the estimation of distances perpendicular along the line of sight is different due to the universe curvature: similarly to a triangle on a sphere, the sum of the angles of a triangle in a non-flat universe is not equal to π. Following Hogg (1999), we call the radial comoving distance d C and the transverse comoving distance d M (or similarly the function f k for a given radial comoving distance) which reads

d M =        d H √ Ω k | sinh( χ d H √ Ω k ) ; Ω k > 0 χ ; Ω k = 0 d H √ |Ω k | sin( χ d H |Ω k |) ; Ω k < 0 f k (χ) =        1 √ |k| sinh(χ |k|) ; k < 0 χ ; k = 0 1 √ |k| sin(χ |k|) ; k > 0 (2.16)
Chapter 2. Theoretical framework

Luminosity distance

The luminosity of objects is usually estimated in terms of magnitude: a logarithmic scale convenient with human senses. The apparent magnitude depends of the luminosity of an object but also its distance m = -2.5 log 10 L 4πd 2 + C,

(2.17) with m the apparent magnitude, L the luminosity and d the distance and C a constant. Relying on the assumption that we know the luminosity (we therefore talk about standard candles), we can infer the distance. At cosmological scales, a similar relation between distance, luminosity and flux gives the luminosity distance .18) with F the flux. The distance is estimated from the photon flux (decreasing as the square root of the traveled distance) coming from the source to the observer. In practice, the luminosity distance can be related to the radial comoving distance through

d L = L 4πF , ( 2
d L = (1 + z)d M .
(2.19)

Angular diameter distance

From the angular size of an objects and if we know and its real size, we can infer the angular diameter distance as .20) with r phys the transverse physical size of the source, α its angular size, A its area and Ω A its solid angle. Contrarily to luminosity distance, here we consider a flux of photons from the observer to the source. This relates to the comoving distance as

d A = r phys α = A Ω A , ( 2
d A = d M 1 + z . (2.21)
Interestingly, the angular diameter distance does not tends towards infinity with the comoving distance but reaches a maximum at z ≈ 1. After this redshift, sources farther away do not look smaller as they would in a non-expanding universe.

Etherington's reciprocity theorem

From Eq. (2.19) and Eq. (2.21), we have the Etherington's distance-duality relation, relating luminosity distance and angular diameter distance as (2.22) This simple relation tells us that we can easily exchange sources and observers for particles (photons) following null geodesics (ds 2 = 0). Interestingly, this relation should remain valid in a inhomogeneous universe. This is valid when the photon number is conserved and when the beam is significantly smaller than metric variations.

d L = (1 + z) 2 d A .

Testing the FLRW metric

The Alcock-Paczynski test

In cosmology, given that we are interested in objects far enough so the Hubble flow (i.e. the expansion) is dominant over peculiar velocities, we usually estimate radial distances using the redshift as in Eq. (2.15) assuming a fiducial cosmology. This means that a wrong cosmology could distort the observed radial position of sources along the line of sight, we could talk about dynamical distortions since they come from H and therefore the amount of each component in the universe. On the other hand, for transverse distance we would use the angular diameter distance. In that case a wrong evaluation of the curvature would also induce a geometrical distortion (although we note that there is a degeneracy in the geometrical distortion since it is also sensitive to H). The size of a object along and transverse to the line of sight is

s = c∆z H , (2.23) s ⊥ = (1 + z)d A ∆α, (2.24)
with s and s ⊥ its radial and transverse size, ∆z its redshift elongation and ∆α its angular size. In particular, if we know that an object has s = s ⊥ (i.e. a spherical symmetry along the line of sight), one can use the Alcock-Paczynski (AP) test [START_REF] Alcock | An evolution free test for non-zero cosmological constant[END_REF] using Eqs. (2.23)-(2.24) to estimate how wrongly we assume the cosmology. Alternatively, setting s = s ⊥ allow to determine cosmological parameters via c∆z/∆α = Hd A (1 + z).

Testing the Copernican principle

To end this Section, I would like to come back to the cosmological principle: "At large scales, the universe is overall homogeneous and isotropic". If the isotropy can be well tested (as we shall see later), it is more complicated for homogeneity given that we cannot observe from a different place in the universe. The Copernican principle stating that we are not at a particular place in the universe is therefore more of a philosophical assumption than a tested evidence.

In [START_REF] Clarkson | A General Test of the Copernican Principle[END_REF], the authors propose a test of the Copernican principle by estimating the universe curvature at different redshift as in principle it should be constant. Starting from Eq. (2.16), we can write

Ω k (z) = H(z) dχ dz 2 -1 [H 0 χ] 2 , (2.25)
also, finding dΩ k /dz = 0 would be problematic.

Finally, since observations show that the curvature is almost null, from now on we set k = 0. The FLRW metric in Cartesian coordinates now reads

ds 2 = -c 2 dt 2 + a 2 (t) dx 2 + dy 2 + dz 2 .
(2.26)

For some cases, it is convenient to use the conformal time dη = dt/a. Which gives the conformal FLRW metric

ds 2 = a 2 (η) -c 2 dη 2 + dx 2 + dy 2 + dz 2 .
(2.27)

Chapter 2. Theoretical framework This is the background metric, central in all further considerations and on which we apply perturbations later on.

Initial conditions

The preferred scenario to explain the beginning of our universe is to start with a Big Bang, a moment where space and time started to expand, not only the elementary particles but the fabric of space-time itself: the Big Bang is "everywhere". Starting from a dense and hot universe, its expansion led to a cooling allowing the formation of baryons and then later to light atoms like hydrogen and helium: the scenario to explain the formation of atoms is called the Big Bang Nucleosynthesis (BBN). When atoms are not yet formed, the universe consists in a plasma of coupled photons and baryons where the photons do not propagate in straight lines since they interact with free electrons via Compton scattering. When atoms form, the universe becomes "transparent" as the photons can now propagate freely. Today we can observe these photons on the last scattering surface, meaning the spatial surface from which photons started to propagate without interacting with ionized matter which occurred 380.000 years after the Big Bang. These photons come from every direction because the decoupling happened approximatively at the same time in the universe, and their electromagnetic radiation is called the Cosmic Microwave Background (CMB).

Seen on our past light cone, objects farther away are seen at their state at the moment the photons were emitted. The CMB is the oldest observable (with light) of the universe and we can assume that is should be an important probe of the initial conditions of our universe.

The CMB was first described by [START_REF] Alpher | The Origin of Chemical Elements[END_REF] and detected in [START_REF] Penzias | A Measurement of Excess Antenna Temperature at 4080 Mc/s[END_REF] with the following comment that the latest observations "have yielded a value about 3.5°K higher than expected". They continued "This excess temperature is, within the limits of our observations, isotropic, unpolarized..." which was (already) a good description for the CMB. In a companion paper [START_REF] Dicke | Cosmic Black-Body Radiation[END_REF] the authors gave the first explanation on this previously unknown effect. From these years to nowadays, the CMB has been a major topic for cosmology. The increasing quality of data with spatial mission as COBE [START_REF] Smoot | Structure in the COBE differential microwave radiometer firstyear maps[END_REF] and WMAP [START_REF] Spergel | First-Year Wilkinson Microwave Anisotropy Probe (WMAP) Observations: Determination of Cosmological Parameters[END_REF] also helped to give constraints on the nature of the universe and alternate models for gravity using the CMB. More recently, significant advances were made on the observational point of view with the multiplication of space missions. This is where I would like to start this Chapter, the observation of the CMB with the spatial mission Planck designed to probe the CMB with an unprecedented accuracy with high angular resolution and full-sky survey. Since we observe photons coming from the CMB in every direction, we can produce pixel maps of the full sky with a given scalar quantity at the center of each pixel. From these maps we can usually extract informations on the given quantity using statistical tools. In Fig. 2.1 we see one of the famous recent plots in cosmology: the temperature map of the CMB (Planck Collaboration et al., 2014) which is one of the most powerful evidence for a ΛCDM cosmology. This shows the temperature variations from the photon emitted from the CMB with a mean temperature that approximates 2.7K and variations smaller than 10 -3 . It is remarkable that photons coming from such a distance in every directions seem to have approximatively the same temperature with only small variations. Observing a map only gets us so far and to extract cosmological informations we need two things:

1. A theoretical model The CMB is important because as we shall see, these temperature fluctuations give the initial conditions on what will become the Large-Scale Structures (LSS) we will study throughout this thesis.

Statistical analysis

Physics of the CMB

From the full-sky map of the CMB temperature we extract information from temperature fluctuations. This means that the relevant quantity for us is

g(n) = T(n) - T T , (2.28)
where T(n) is the temperature of the CMB in the direction n and T the mean temperature of the CMB which is T ≈ 2.7K. But then the question remains: What are these temperature fluctuations ? How can they relate to the underlying physics at early times ?

The preferred scenario to explain the LSS we observe today is to start with quantum fluctuations which evolve almost linearly. This process happens through inflation which is supposed to explain the flat universe curvature, the overall uniformity of temperature in the universe and perturbations. These fluctuations generate wiggles in the photon-matter plasma due to the competition between gravitational forces and radiative pressure. This leads to over-densities and under-densities and therefore to hot and cold spots visible in the temperature map (which we call anisotropies). A remarkable feature of the CMB is that the temperature variation is almost gaussian, this means that the initial density field was also probably gaussian. This will be important to keep in mind for future consideration. Also, on the CMB map we have regions which should not (in principle) be causally connected and therefore is it strange to find an almost identical temperature in every directions. This problem is solved by inflation [START_REF] Liddle | Cosmological Inflation and Large-Scale Structure[END_REF] which states that after the Big Bang, the universe briefly expanded drastically.

The full analytical demonstration accounting for all the relevant effects is tedious and is not the subject of the present manuscript, however we can mention the different steps to arrive to the final equations and give a qualitative understanding of these effects. First, we can start with the equation describing the evolution of a fluid in phase space, the Boltzmann equation

L[ f ] = C[ f ],
(2.29)

where L[] and C[] are the Liouville and collision operators. f is the distribution function of particles in phase space. The Liouville equation give the conservation of the number of particles in phase space. Accounting for GR this becomes the Einstein-Boltzmann equations [START_REF] Dodelson | Modern cosmology[END_REF]. Then using a relativistic perturbation theory [START_REF] Mukhanov | Theory of cosmological perturbations[END_REF] gives the solution when working out the Boltzmann equation for the different species in the universe. In [START_REF] Peter | Cosmologie Primordiale[END_REF] the authors also give a simpler approach considering a fluid and an infinitely thin last scattering surface. In the latter, the temperature variations are related to energy variations and redshift perturbations due to several effects:

1. Sachs-Wolfe effect [START_REF] Sachs | Perturbations of a Cosmological Model and Angular Variations of the Microwave Background[END_REF]: it contains two effects, first the temperatures depends on the fluid density through the Stefan-Boltzmann law, and therefore follows the density contrast caused by initial fluctuations. Since density can be related to the gravitational potential through the Poisson equation, temperature can also be expressed in terms of the potential. Secondly, photons lose energy when "climbing" away from a potential well which modifies their redshift (we therefore talk about gravitational redshift effect). A simple and intuitive derivation of this effect is found in [START_REF] White | The Sachs-Wolfe effect[END_REF].

2. Doppler effect due to the fluid and the observer peculiar velocities. In general we drop the overall dipole due to the observer's peculiar velocity because it does not contain any relevant information on the CMB physics but still it give us the peculiar velocity of our solar system w.r.t the CMB.

3. Integrated Sachs-Wolfe (ISW) effect: It depends on the potential seen by the photon along its path, its energy changes when it goes through a potential well which also changes in time. This term will therefore be an integral over the time derivative of the potential along its trajectory.

And also different smaller scale effects due to LSS and photon propagation at low redshift (such as lensing).

Angular spherical harmonics

Before analyzing the final signal given by Planck on the temperature map, let's do reminder on spherical harmonics since they are extensively used. Spherical harmonics provides an orthogonal basis of proper eigenvalue of the Laplacian on the sphere. This allows to compute the correlation of scalar quantities on the sky depending on a given mode , with = 2π/θ with θ the angular separation at which we correlate.

Let g(n) a scalar quantity on the sky seen in a direction n. This can be written in terms of spherical harmonics as

g(n) = ∑ ,m a m Y m (n), (2.30)
where Y m give us orthogonality relations on the sphere, we therefore want to know the a m .

To know the correlation of g for different scales, we need to define the angular correlation on the sphere C(n 1 , n 2 ) as

C(n 1 , n 2 ) = g(n 1 )g(n 2 ) , (2.31)
where the brackets are ensemble average and n 1 , n 2 two lines of sight directions. The a m correlations reads

a m a * m = dΩ 1 dΩ 2 Y m (n 1 )Y * m (n 2 ) g(n 1 )g(n 2 ) , (2.32) writing C(n 1 , n 2 ) in terms of Legendre polynomial yields C(n 1 , n 2 ) = ∑ 2 + 1 4π C L (n 1 • n 2 ), (2.33)
where L is the Legendre polynomial of order and C is the angular power spectrum

a m a * m = C δ δ mm . (2.34)
Interestingly, for a gaussian random field all the relevant information only depends on the angular separation with no mode coupling and is fully contained in the C . For non-gaussian random fields there would be additional informations in higher-order moments (while a gaussian only has two non-zero moments). Alternatively, we can rewrite the angular power spectrum in terms of the 3D power spectrum in Fourier space as

C = 4π dk k k 3 P g (k) 2π 2 j 2 (kχ rec ), (2.35)
with j the th spherical Bessel function and χ rec our comoving distance from the CMB. This last equation means that the power spectrum P g (k) contains all the physical information related to the shape of the angular power spectrum (neglecting here Doppler, Sachs-Wolfe, ISW and lensing effects for the χ rec estimation).

Analysis of the temperature map

With spherical harmonics we can extract the information contained in a spherical map to probe the variations of a random field in terms of power for each scale (or variance in the correlation for a random field at a given scale). We can compute the C TT for each where the superscript TT stands for the Temperature-Temperature correlation in Eq. (2.31). At early times, we expect the perturbations in density (or density contrast) to be small so we can neglect density-velocity coupling in the first moments of the Boltzmann equations (therefore continuity and Euler equations). Neglecting these couplings (and higher order cross-terms) and assuming density perturbation to be small allow us to linearize the fluid equations, leading to a linear perturbation theory. Since temperature is directly linked to density, we expect the C TT to be in agreement with linear theory which is convenient because it is well understood physics.

In Fig. 2.2, we show the results of the temperature map analysis in term of spherical harmonics compared with a prediction given by a linear theory with a ΛCDM model.

At first, we can notice the good agreement between the data and the prediction. Using a given model with a given number of free parameters, we can fit the prediction to the data and extract the best-fit values for these parameters. There are many effects which play a role FIGURE 2.2: Angular power spectrum of the CMB temperature anisotropies (Planck Collaboration et al., 2016). In a red straight line we have the best fit for a ΛCDM cosmology and in blue circles the measurements.

in the angular power spectrum of the temperature anisotropies (Durrer, 2001), to describe them we will start from low (large angular separation) to high (small angular separation). At low we see a scatter in the data compared to the theory, this comes from cosmic variance: we only have one universe which is a unique realization of a stochastic process, and we only have one sky to make statistics. At these scales the number of modes available for C estimation is limited. For a given the number of modes is (2 + 1). For independent gaussian realizations the error scales as

∆C C ∝ 1 √ 2 + 1 . (2.36)
This means that independently of the accuracy achieved with probes or devices, there is a noise we cannot suppress and this is especially important for large angular separation until ≈ 30.

Then we see a few wiggles in the C TT (actually on the y-axis we have D TT ∝ ( + 1)C TT ), these are the Baryon Acoustic oscillations (BAO). These oscillations come from sound waves in the photon-matter plasma before recombination. Indeed, the opposing movement of collapse due to gravitational interaction and pressure due to radiation generate acoustic waves which propagate until photons and matter decouple. It imprints a given length in the distribution of matter and in the CMB power spectrum. This scale is the sound horizon, given by the distance traveled by an acoustic wave at sound speed in the plasma until recombination. Note that the sound speed depends on the ratio between the baryon and radiation density. This problem can be thought as an oscillator with a source term. The position and amplitude of the peaks has a physical meaning and are used to probe different things. The positions Chapter 2. Theoretical framework are given by the solution of the oscillator equation and it can be found that the acoustic peaks are present for the Fourier modes

k n = n π d rec ,
(2.37) with d rec the sound horizon. Also, there is a Doppler contribution to the temperature map.

The Doppler peaks are dephased by π/2 w.r.t to acoustic peaks. It can be intuited because we expect the velocity to be higher when δ = 0 and almost null for regions where the plasma is compressed or rarefied. There is also an ISW effect playing a role at low .

The first peak (n = 1) is a probe for the universe curvature, indeed depending on the universe topology the scale of inhomogeneities should be shifted. Comparing the position of the first peak to theory shows that our universe is flat with a great accuracy (Ω r + Ω m + Ω Λ = 1 with errors of the order 10 -3 ). The following two peaks are generally interesting when measuring their amplitude: as baryons and DM do not interact similarly with photons, we expect this particularity to be present in the temperature map. Indeed, matter would tend to fall toward over-densities but since baryons are coupled with photon, it will be sensitive to the radiative pressure and would not cluster as much as DM. Odd peaks probing compressions and even peaks decompression, depending on the amount of baryons the amplitude of the second peak will be suppressed (compared to the first and third peak) or not. Also lowering the DM density would enhance the third peak, this means that in the end second and third peaks contain informations on the total amount of matter in the universe.

At larger , we see a damping in the shape of the angular power spectrum, this is the Silk damping [START_REF] Silk | Cosmic Black-Body Radiation and Galaxy Formation[END_REF]. This damping is due to the non-finiteness of the last-scattering surface: the recombination did not happen at the exact same time everywhere in the universe, leading in delayed decoupling in some regions. Therefore photon propagating freely experienced regions where atoms were not yet formed, traveling in hot and cold regions resulting in overall homogenized photon temperature at small scales (high ). This leads to a damping in the angular power spectrum since these scales have less power (less variations).

To sum up: the CMB is a great cosmological probe which involves only well understood physics. The shape of the temperature angular power spectrum give multiples informations on initial conditions (low ), the universe geometry (first peak), the amount of baryons and matter (following peaks) and is even sensitive to LSS (high ) for example with the Sunyaev-Zel'dovich effect (SZ, [START_REF] Sunyaev | The Observations of Relic Radiation as a Test of the Nature of X-Ray Radiation from the Clusters of Galaxies[END_REF] . In practice, the CMB can give us more informations than just a temperature map, for example their polarization. Photons coming from the CMB are lensed by LSS which modifies the wiggles amplitude in the C TT but also generates a non-zero polarization [START_REF] Lewis | Weak gravitational lensing of the CMB[END_REF].

Cosmological Perturbation Theory

From observations we know that in the early universe the matter density field was overall gaussian with small variations. In the cosmological context we are interested in very large scales compared to other disciplines in astrophysics and we are not interested in very local perturbations (black holes, neutron stars). Local metric perturbations are of order δg µν = GM/rc 2 . For a galaxy with R = 100 kpc and a mass M = 10 12 M , the perturbations are of order δg µν ≈ 10 -6

1. We can therefore safely consider an overall weakly perturbed density field which is connected via GR to the metric (weak metric perturbations does not necessarily mean small density contrasts!). Of course, perturbing the universe content will lead to space-time perturbations which cannot be described by the FLRW metric. This is why we need to develop a framework for which we will be able to account for inhomogeneities. In practice, this is done by weakly perturbing the homogeneous FLRW metric (Bardeen, 1980;[START_REF] Kodama | Cosmological Perturbation Theory[END_REF][START_REF] Mukhanov | Theory of cosmological perturbations[END_REF][START_REF] Durrer | Gauge Invariant Cosmological Perturbation Theory: A General Study and It's Application to the Texture Scenario of Structure Formation[END_REF][START_REF] Malik | Cosmological perturbations[END_REF]. We interpret this modification as inhomogeneities around the background evolution of the metric. We note that knowing the background evolution of the metric is interesting to evaluate some quantities (for example the scale factor) using the Friedmann-Lemaître equations. But working in the inhomogeneous metric is mandatory to know the dynamics of LSS. The perturbed space-time reads

g µν = ḡµν + δg µν , (2.38)
with ḡµν the background FLRW metric and δg µν the small metric perturbations.

SVT decomposition

It is convenient to write the metric perturbations using a Scalar-Vector-Tensor (SVT) decomposition. This decomposition is interesting because at first order in metric perturbations, the three different types of perturbations (scalar, vector and tensor) are decoupled which allow for a separate treatment for each type. Following [START_REF] Peter | Cosmologie Primordiale[END_REF], the inhomogeneous metric reads (c = 1) (2.39) with A, B i and h ij the metric perturbations. Here γ ij is the homogeneous spatial metric, for cartesian coordinates it is the Kronecker delta function δ ij . The vector field can be decomposed into the divergence of a scalar field and a divergence-free vector as

ds 2 = a 2 -(1 + 2A)dη 2 + 2B i dx i dη + (γ ij + h ij )dx i dx j ,
B i = D i B + Bi , (2.40)
with a hat denoting a divergence-free or trace-free quantity as D i Bi = 0 where D i is the divergence operator. Analogously we can write tensor perturbations as

h ij = 2Cγ ij + 2D i D j E + D i Êj + D j Êi + 2 Êij .
(2.41)

We see that h ij is decomposed in two scalar fields C and E, one divergence-free vector field Êi and a trace-free tensor Êij .

Gauge choice

Gauge invariant quantities

Weakly perturbing the metric implies a bijection between coordinates in the homogeneous and inhomogeneous metric. But in GR, the choice of coordinate is necessarily arbitrary (there is no preferred set of coordinates) and we are therefore free to choose the coordinate system as we see in This is the gauge freedom, where different choice of gauges (coordinates) will lead to different interpretations of the same physical phenomenon. This is important because depending of the phenomenon we are interested in, the computations might be easier and some quantities are better set in a given gauge.

To start the computation of the different gauges, we first need to weakly perturb the coordinates x µ with an infinitesimal displacement as (2.42) with xµ the new coordinates and ξ µ the displacement. Using the invariance of space-time intervals, the metric written in terms of new coordinates are related to old coordinates via

xµ = x µ + ξ µ ,
g µν (x) = ∂ xα ∂x µ ∂ xβ ∂x ν gαβ ( x), (2.43)
and gαβ the inhomogeneous metric written in terms of the new coordinates. The SVT decomposition on the displacement gives

ξ 0 = T, ξ i = L i = D i L + Li , (2.44)
with T, L two scalars and Li a vector. Using Eqs. (2.42)-(2.44), the metric perturbation terms transforms (at first order) as

A → A -T -HT, (2.45) B → B + T -L , (2.46) C → C -HT - 1 3 ∇ 2 L, (2.47) E → E -L, (2.48) Bi → Bi -Li , (2.49) Êi → Êi -Li , (2.50) Êij → Êij , (2.51)
where a prime denotes a derivation w.r.t the conformal time and ∇ 2 = D i D i . From Eqs. (2.45)-(2.51) we see that indeed, the different perturbations types are decoupled. We note that Êij is left unchanged which is normal since coordinate change does not produce tensor perturbations. Overall, metric perturbations are affected by coordinates changes, meaning that the choice of coordinate can be wrongly interpreted as additional metric perturbations. We are therefore aiming at constructing quantities that are invariant under any change of coordinates (meaning quantities which does not depend on either T, L or Li ). A few of these quantities are called the Bardeen variables (Bardeen, 1980).

ψ = A + H(B -E ) + (B -E ) , (2.52) φ = -C -H(B -E ) + 1 3 ∇ 2 E, (2.53) φi = Êi -Bi . (2.54)
We note that Êij is also a gauge-invariant quantity. In practice we could find more gaugeinvariant quantities but we are interested here in particular in Eq. (2.52) and Eq. (2.53) which we will see later on.

Using the Einstein field equation, we see that perturbing the metric also implies perturbing the stress-energy tensor and therefore the universe content. This is interesting because at the end we want to probe observables quantities, probes coming from inhomogeneities in the matter density field. Performing the following perturbations

G µν = Ḡµν + δG µν , T µν = Tµν + δT µν , ρ = ρ + δρ, P = P + δP, u µ = ūµ + δu µ , (2.55)
where we remind that G µν is the Einstein tensor, T µν the stress-energy tensor, ρ the fluid density, P the pressure and u µ its four-velocity. The four-velocity perturbations can be rewritten as δu µ = a -1 (-A, v i + B i ) with a the scale factor, A and B i are metric perturbations and v i = D i v + vi the peculiar velocity decomposed in SVT into a divergence and curl components. Finally, a bar denotes average quantities. This implies that perturbations of the stress-energy tensor take the form

δT µ ν = (δρ + δP) ūµ ūν + ( ρ + P)(δu µ ūν + ūµ δu ν ) -δPδ µ ν -Π µ ν ,
(2.56)

with Π µν the anisotropic stress tensor which is traceless (by definition) Π µµ = 0. Similarly to metric perturbations, making an infinitesimal change of coordinate impacts the density, Chapter 2. Theoretical framework stress and velocity perturbations as

δρ → δρ -ρ T (2.57) δP → δP -P T (2.58) v → v + L (2.59) vi → vi + L i (2.60)
And also similarly to metric perturbations we can find gauge invariant quantities with linear combinations of quantities in Eqs. (2.57)-(2.60). It is worth noting that the density contrast δ = (ρρ)/ ρ is not a gauge invariant quantity, indeed

δ → δ - ρ ρ T.
(2.61)

However, we can define the following gauge invariant quantity

∆ = δ + ρ ρ (v + B).
(2.62)

∆ is interesting when computing the density contrast in the appropriate gauge.

For now we have briefly seen the general Cosmological Perturbation Theory at first order without assuming any gauge. Having seen that the choice of coordinate can be interpreted as metric perturbations, on the other hand some metric perturbations can be "absorbed" by a proper choice of coordinates. We could compute the evolution equations in any gauge but in the end we want to compare our results with observable quantities and some gauge are more appropriate than other for given quantities. In particular, we would prefer to work in a gauge where the quantity we want to probe is a gauge invariant quantity (and similarly, gauge invariant quantities do not have an intrinsic physical meaning). Here we will briefly review different commonly used gauges.

Newtonian gauge

One of the most popular gauges is the Newtonian gauge (Ma and Bertschinger, 1995), also called longitudinal gauge. Here vector and tensor mode can be safely neglected when dealing with LSS because vector and tensor modes experience a damping as the universe expands. However if one wants to account also for vector and tensor perturbations, the equivalent gauge is called the Poisson gauge.

Coming back to the Newtonian gauge, this leads to a symmetric (no shear) metric with scalar perturbations only. This means that fixing

B = 0, E = 0, Bi = 0,
(2.63) can be performed using the following gauge choice for the change of coordinates

T = B -E , L = -E, Li = -Bi .
(2.64)

The gauge invariant quantities can be written as

A = ψ, C = -φ, (2.65)
where we remind that ψand φ are the two gauge-invariant Bardeen potentials. The metric then takes the form

ds 2 = a(η) 2 -(1 + 2ψ) dη 2 + (1 -2φ) δ ij dx i dx j .
(2.66) Written in terms of conformal time we talk about the conformal Newtonian gauge. The nonvanishing Christoffel symbols are

Γ 0 00 = H + ∂ψ ∂η , (2.67) Γ 0 i0 = ∂ψ ∂x i , (2.68) Γ 0 ij = δ ij H - ∂φ ∂η -2(φ + ψ)H , (2.69) Γ i 00 = ∂ψ ∂x i , (2.70) Γ i j0 = δ i j H - ∂ψ ∂η , (2.71) Γ i jk = δ jk ∂φ ∂x i -δ i j ∂φ ∂x k -δ i k ∂φ ∂x j . (2.72)
With H the conformal Hubble parameter equal to ȧ = da/dt = 1/a da/dη = a /a. Computing the Einstein field equations gives two constraints

∇ 2 φ = 4πGa 2 ρ[δ N + 3H(1 + w)v N ],
(2.73) (2.74) where the superscript N denotes these quantities being computed in the Newtonian gauge, w comes from the e.o.s and Π denotes the anisotropic stress. Eq. (2.73) is similar to a relativistic Poisson equation while Eq. (2.74) give a condition on the relation between the two Bardeen potentials. If we assume no anisotropic stress then ψ = φ. In that case φ can be interpreted as the gravitational potential in the Newtonian limit. In matter dominated and void dominated universe the anisotropic stress is close to zero. This gives the following metric (putting back the c factor)

φ -ψ = 8πGa 2 pΠ,
ds 2 = a 2 (η) -1 + 2φ/c 2 c 2 dη 2 + 1 -2φ/c 2 δ ij dx i dx j . (2.75)
This is the gauge we will work on throughout this thesis.

Other gauges

While the conformal Newtonian gauge has a simple interpretation, taking a look at other gauges might be interesting. One useful gauge is the comoving gauge. In this gauge the constant-time slices are orthogonal to the four-velocity of the fluid. This means that the velocity perturbations are "absorbed" in the shift

v i = -B i , v = -B.
(2.76)

Chapter 2. Theoretical framework

In this gauge the density contrast is a gauge invariant quantity as

δ c = ∆ = δ, (2.77)
where ∆ is the gauge invariant quantity from Eq. (2.62). This is especially interesting since usually the density contrast is inferred from galaxy number counts. While the galaxy number count is an observable and therefore a gauge invariant quantity, the density contrast is usually not. We can identify both in the comoving gauge, or if we work in a different gauge we should be able to express it in the comoving gauge. For example the density contrast in comoving gauge can be expressed in terms of density contrast in Newtonian gauge. In practice we can work in mixed gauges, for example carrying on the calculations in Newtonian gauge and replacing δ N → δ c when dealing with density contrasts.

The first gauge used in cosmological perturbation theory is the synchronous gauge. Here, perturbations are only set in the spatial part of the metric. This can be done setting

A = 0, B i = 0.
(2.78)

Here the proper time for a comoving observer can be identified to the cosmic time, the calculations can be done considering a same "absolute" time for all the universe components.

Recently, the N-body gauge was introduced in Fidler et al. (2016). Similarly to the comoving gauge, the constant-time hypersurfaces are orthogonal to the fluid four-velocity, but also the spatial element of volume is kept unperturbed. The name of this gauge comes from this last condition as this gauge was developed to interpret data from N-body simulations. Usually, we interpret data from Newtonian simulation using the Newtonian gauge but it can lead to errors at large scales. In Newtonian simulations, the density is computed on regular grid depending on the number of particles in a cell. But in Newtonian gauge, the spatial element of volume is perturbed by φ, and the density should therefore be normalized by the volume element. This is why, to interpret these simulations one would in principle need a gauge which absorbs the spatial volume perturbations.

However, the difference between gauges are small at sub-Gpc scale since they are of order (H/k) 2 .

Dynamics of large-scale structures

Initial density fluctuations tends to grow due to gravitational interactions, with the metric perturbed accordingly. This leads to over-dense and under-dense regions in terms of matter density at lower redshift, where radiation can be neglected. We can model the evolution and structuring of matter at large scales, we therefore talk about Large-Scale Structures (LSS). In this Section, we aim at obtaining an analytical description of the evolution of matter density at linear and quasilinear scales. The questions on the non-linear regime will be addressed later on with simulations.

We first consider the Newtonian fluid description for large-scale matter distribution accounting for the background expansion. Note that this is only valid at scales smaller than the horizon where the impact of relativistic effects on the dynamics become negligible.

Fluid equations

Reminders

In principle, the fluids are governed in phase space by the Boltzmann equation

d f dt = ∂ f ∂t c (2.79)
with f the particle distribution function and the right-hand side term being the collision term. Taken in the collisionless limit (for example with CDM particles, the r.h.s of Eq. 2.79 vanishes) this gives the Vlasov equation. This equation is difficult to handle analytically. At large enough scale (i.e. far from shell crossing) we can use a hydrodynamical approach. We integrate on the velocity space to find the first two moments which we use to compute the evolution of the fluid (assuming an isotropic stress tensor). Or more simply we could just compute the 3D conservation equation as [START_REF] Landau | Fluid Mechanics[END_REF] where we consider a fluid with density ρ(x, y, z, t), pressure p(x, y, z, t) and velocity v(x, y, z, t). This gives the continuity equation (sometimes referred as the conservation equation) Chapter 2. Theoretical framework

∂ρ ∂t + ∇ • (ρv) = 0, (2.

Fluid equations in an expanding universe

Coming back to the cosmological background of an expanding universe, the velocity can be written as v = Hx + au, (2.83)

where v is given by the sum of the Hubble flow plus a peculiar velocity term. The density contrast δ is given by

δ = ρ - ρ ρ .
(2.84)

The continuity equation hence becomes (2.85) where from now on a dot denotes a derivative w.r.t the conformal time. Here the coordinates are comoving for space and conformal for time. The Euler equation in an expanding universe is

δ + ∇ [(1 + δ)u] = 0 ,
u + Hu + (u∇) u = -∇Φ - 1 ρ ∇p .
(2.86)

We see that the continuity and Euler equations involve non-linear terms which are tedious to estimate. To study the evolution of the density field we will first linearize these equations assuming small perturbations and then we will see a methods to go beyond the linear approximation.

Eulerian Linear perturbation theory

At large scales, we assume that perturbations for the density and velocity field are small. This corresponds to linear theory where we dismiss the density-velocity and velocity-velocity coupling. Assuming a pressureless fluid with no vorticity for the velocity field gives δ + ∇u = 0, Continuity u + Hu + ∇Φ = 0, Euler (2.87)

Computing the gradient of the Euler equation, and inserting the continuity equation gives a second-order equation for the density contrast

δ + H δ - 3 2 Ω m,0 H 2 δ = 0 , (2.88)
where Ω m,0 = Ω m (z = 0). From this we easily see that the solution for δ takes the form

δ(x, η) = D + (η)A(x) + D -(η)B(x), (2.89)
where A(x) and B(x) are two functions which describe the initial density field. The function D(η) is the growth factor accounting for the growth of perturbations in the linear regime. It is split into two modes, D + and D -, the former being the growing mode and the latter is the negligible decaying mode. Hence, D + is usually referred as the growth factor. Finally the density contrast for any time using linear theory can be written as

δ(x, η) = D + (η)δ(x, 0) .
(2.90)

In the linear regime, the density field is therefore the same as the initial one with a higher amplitude. If we only have matter and vacuum, solving Eq. (2.88) for D + gives (Hamilton, 2001)

D + (a) = 5 2 H(a)Ω m,0 a 0 da a 3 H(a ) 3 ,
(2.91)

and we remind that H(a) = H 0 Ω r a -4 + Ω m a -3 + Ω k a -2 + Ω Λ where the radiation component can safely be neglected. Since the temporal information for the density contrast is encoded in D + , we also expect this quantity to affect the density-velocity relation through the conservation equation. Is is straightforward to show that

δ(x, η) = H d lnD + d lna δ(x, η), (2.92) = H f (a)δ(x, η), (2.93)
with f the growth rate. The continuity equations becomes

δ = - 1 H f ∇u.
(2.94)

Measuring the velocity field gives us an estimate on f which directly depends on the growth factor and therefore the Euler equation as well as the cosmology. The growth rate is therefore an important cosmological probe as is it very sensitive to modifications of gravity.

Linear theory gives us an interesting framework to infer predictions for the evolution of large-scale structures as the linearization of the continuity and Euler equations simplifies a lot the underlying calculations. However, the domain of validity of linear theory remains restricted to very large scales (above ≈ 50 -150 h -1 Mpc, and does not model well the BAO as we will see later). Also, as density fluctuations grow, the minimum scale at which we can use linear theory becomes larger with time.

Beyond Linear perturbation theory: the quasilinear regime

At smaller scales, the coupling terms (density-density and density-velocity) in the continuity and Euler are not negligible, leading to non-linear equations. Following [START_REF] Scoccimarro | Loop Corrections in Nonlinear Cosmological Perturbation Theory[END_REF] and [START_REF] Bernardeau | Large-scale structure of the Universe and cosmological perturbation theory[END_REF], to describe the evolution of gravitational instabilities we will go to higher order in perturbation theory, also known as Perturbation Theory (PT). We still consider a pressureless fluid with no vorticity for three reasons : 1) no vorticity in the initial conditions cannot lead to a non-zero vorticity later, 2) this term also decays due to the expansion, and 3) vorticity becomes relevant at scales smaller than shell-crossing (multi-stream regions) which we do not consider. In PT, we expand the density contrast and the velocity divergence θ = ∇u in series as perturbations around the linear case

δ(x, t) = ∞ ∑ n=1 δ (n) (x, t),
(2.95)

θ(x, t) = ∞ ∑ n=1 θ (n) (x, t), (2.96)
where δ (1) and θ (1)

+ θ(k, η) = -d 3 k 1 d 3 k 2 δ D (k -k 12 )α(k 1 , k 2 )θ(k 1 , η)δ(k 2 , η), (2.97) ∂θ(k, τ) ∂η + Hθ(k, η) = -d 3 k 1 d 3 k 2 δ D (k -k 12 )β(k 1 , k 2 )θ(k 1 , η)θ(k 2 , η), (2.98)
with δ D the Dirac delta function and k 12 = k 1 + k 2 . The functions α and β are related to the density-density and density-velocity couplings and are given by

α(k 1 , k 2 ) = k 12 • k 1 k 2 1 ,
(2.99)

β(k 1 , k 2 ) = k 2 12 (k 1 • k 2 ) 2k 2 1 k 2 2 .
(2.100)

The right hand terms of Eqs (2.97)-(2.98) encode the non-linearities since it is zero for linear theory. If PT allows us to probe smaller scales than linear theory, it is not sufficient to model virialized objects.

In practice there are different flavors of PT (Crocce and Scoccimarro, 2006;Matsubara, 2008;[START_REF] Carlson | Critical look at cosmological perturbation theory techniques[END_REF][START_REF] Taruya | Baryon acoustic oscillations in 2D: Modeling redshift-space power spectrum from perturbation theory[END_REF]Taruya et al., 2012;[START_REF] Taruya | Precision modeling of redshift-space distortions from a multipoint propagator expansion[END_REF][START_REF] Carlson | Convolution Lagrangian perturbation theory for biased tracers[END_REF]. Alternatively, instead of using PT one could add an effective fluid as in Effective Field Theory [START_REF] Carrasco | The effective field theory of cosmological large scale structures[END_REF].

Structure formation

When δ 1, the evolution of matter density cannot be described analytically and we need other tools to study this regime of structure formation. To do so we use numerical simulations, which captures this process and show that from an approximatively homogeneous initial distribution for DM particles we can form DM filaments (also called cosmic web) as shown in Fig. 2.4.

At a certain clustering level, DM forms gravitationally bound, virialized objects: halos. These appears in high-density regions, mostly at the knots of the cosmic-web structure. Baryonic matter interacts gravitationally with DM and tends to fall towards high-density regions and more precisely in halos. Hence, galaxy usually form in DM halos. The baryonic physics accounting for galaxy formation is a subject beyond the scope of this manuscript since we are interested in the distribution of matter at scales above 1 Mpc [START_REF] Springel | First results from the IllustrisTNG simulations: matter and galaxy clustering[END_REF].

Correlation function

In cosmology, we only have access to the data from one universe in one realization of a stochastic process, making it impossible to rely on multiple laboratory experiments to constrain cosmological parameters. We therefore need to take full advantage of the data we have and find a maximum of relevant cosmological informations from surveys. In this Section we will show different statistical tools we use.

The distribution of galaxies can be a powerful cosmological probe if we know how to extract information from it. The most commonly used tool to fulfill this purpose is the correlation function. The correlation function gives us the excess of probability dP w.r.t a Poissonian FIGURE 2.4: Projected DM density at Gpc scale around a massive halo taken from the DEUS-FUR simulation [START_REF] Alimi | DEUS Full Observable {\Lambda}CDM Universe Simulation: the numerical challenge[END_REF]Rasera et al., 2014;[START_REF] Bouillot | Probing dark energy models with extreme pairwise velocities of galaxy clusters from the DEUS-FUR simulations[END_REF].

distribution to find an object in a given volume dV 1 at a given comoving separation r from an other object in a given volume dV 2 .

dP(r) = n2 (1 + ξ(r)) dV 1 dV 2 .
(2.101)

By convention, the spatial correlation function is denoted as ξ(r). We see that the correlation function is a measure of the degree of inhomogeneity of the density field at a given scale. Alternatively, in terms of density contrast we can rewrite the correlation function as

ξ(r) = δ(x)δ(x + r) , (2.102)
where x is the position of an object, r the separation vector from an other object at a position x + r, and the ensemble average.

Statistical homogeneity and isotropy

The cosmological principle states that at large scales the universe is statistically homogeneous and isotropic. There is a difference between a homogeneous and isotropic field and a statistically homogeneous and isotropic field. The homogeneity is understood as an invariance by translation while isotropy is an invariance under rotation. For the correlation function, homogeneity means that for any x 1 different than x 2 (with ||x 1 || and ||x 2 || > 0), Meaning that, in terms of multipoles, the correlation functions in real space (meaning for a given time slice) only has a monopole. The inhomogeneities therefore only depend on the value of a given scale and not on its direction.

ξ(r) = δ(x 1 )δ(x 1 + r) = δ(x 2 )δ(x 2 + r) . ( 2

Physical meaning of the correlation function and BAOs

In [START_REF] Eisenstein | Detection of the Baryon Acoustic Peak in the Large-Scale Correlation Function of SDSS Luminous Red Galaxies[END_REF] (see Fig. 2.5), we see a measurement of the correlation function with the SDSS data using Luminous Red Galaxies. The overall shape is intuitive: the correlation function is positive for small scales and falls towards zero at large scales. Indeed, at smaller scales we expect stars, galaxies and clusters to form. In these regions the probability to have a star near an other one is far greater than the homogeneous case. At large scales, as expected from the cosmological principle, the universe tends toward homogeneity and therefore the correlation function tends to zero. However, it is necessary to remind that the correlation function is not a measure of the density field, but rather a measure of the correlation of the density field for a given separation scale. Last, we observe a peak in the correlation function at r ≈ 100 h -1 Mpc. This is the Baryon Acoustic Peak (BAP), related to the Fourier-space Baryon Acoustic Oscillations (BAO). Indeed, a peak in configuration space leads to wiggles in Fourier space. Regarding the BAP, it is a relic of the plasma distribution in the universe at the epoch of recombination.

We remind that in the early universe, matter and photon are coupled via Compton scattering to form a plasma. Initial fluctuations generate over-densities which attract matter while the photon pressure tend to resist. This leads to oscillations in the plasma. Until recombination, where matter and photon are decoupled due to universe cooling, the oscillations propagate in the plasma as a sound wave. As shown in [START_REF] Eisenstein | On the Robustness of the Acoustic Scale in the Low-Redshift Clustering of Matter[END_REF], the acoustic wave stops and gets imprinted in the matter distribution at a scale given by the distance traveled by a wave at the speed of sound in the plasma until recombination. This leads to a standard ruler which is independent of the redshift and carries cosmological information. Having a standard ruler is important in cosmology because there is always the problem of distance measurement and knowing the comoving size of an object for any redshift is an asset. A review on BAO can be found in [START_REF] Bassett | Baryon acoustic oscillations[END_REF].

Power spectrum

Alternatively, a commonly used tool is the power spectrum which can be interpreted as the Fourier transform of the correlation function. First, we take the following convention for Fourier transform

δ(k) = d 3 xe -ik•x δ(x), (2.105) δ(x) = 1 (2π) 3 d 3 ke ik•x δ(k).
(2.106)

The correlation function in Fourier space reads

δ(k 1 )δ * (k 2 ) = d 3 x 1 d 3 x 2 e -ik•x 1 e ik•x 2 δ(x 1 )δ(x 2 ) , (2.107) writing x 2 = x 1 + r gives δ(k 1 )δ * (k 2 ) = d 3 x 1 e -i(k 1 -k 2 )•x 1 d 3 re ik 2 •r ξ(r), (2.108)
which finally yields

δ(k 1 )δ * (k 2 ) = (2π) 3 δ D (k 1 -k 2 )P(k 2 ) , (2.109)
where δ D is the Dirac delta function and P(k) the power spectrum. We see that the Fourier transform of the correlation function only depends on one mode (no mode coupling in real space). Similarly to the angular power spectrum for the CMB, if the density field is gaussian then the power spectrum contains all the information on clustering. The relation between correlation function and power spectrum is

ξ(r) = 1 (2π) 3 d 3 ke ik•r P(k) .
(2.110)

Assuming statistical homogeneity and isotropy for the density field, the link between correlation function and power spectrum becomes

ξ(r) = 1 (2π) 3 dk 3 e ik•r P(k).
(2.111)

Using a plane wave expansion we finally have

ξ(r) = 1 2π 2 dkk 2 j 0 (kr)P(k), (2.112)
Chapter 2. Theoretical framework with j 0 the zeroth order spherical Bessel function. The power spectrum provides a function which encodes the clustering information for the density field at all scales where each scale is defined by only one number and all scales are independent. The power-spectrum time dependence can be written as

P(k, z) = D + (z) D + (0) 2 P(k, 0), (2.113)
and the normalization is chosen so that σ 8 , the variance of density fluctuation inside a sphere of radius R 8 = 8 h -1 Mpc is of order of unity with

σ 2 (R) = 1 2π 2 k 2 P(k)W 2 (kR)dk. (2.114)
where W(x) is a filter and σ 8 = σ(R = 8h -1 Mpc). R 8 also provides a scale where the linear regime does not hold anymore and where we need higher order developments.

10 -3 10 -2 10 -1 10 0 10 1 k(hMpc -1 ) 10 0 10 1 10 2 10 3 10 4

P(k)

FIGURE 2.6: In black dashed line we have a linear power spectrum at z = 0 while in red solid line we have the power spectrum computed using HALOFIT calibrated on our simulation at z = 0.

We can isolate 4 regions in the power spectrum: At very low modes near the horizon the power spectrum depends on which gauge it is computed: indeed the power spectrum is not a gauge invariant quantity (however using the comoving gauge allow to neglect these effects). At low wavenumber (still in large scales) until a few 10 -3 hMpc -1 , the power spectrum is nearly scale invariant and determined by the spectral index n s which depends on inflation models. Usually, the power spectrum written as a scale-invariant quantity multiplied by a function which depends on k

P(k) = A s k n s T(k),
(2.115)

with A s an constant, n s the spectral index from inflation and T(k) the transfer function, which maps a scale-invariant power spectrum to the "real" power spectrum w.r.t k. The transfer function depends on the cosmology and the dark matter model. There are many analytical fits for the transfer function: [START_REF] Bardeen | The statistics of peaks of Gaussian random fields[END_REF] gives the overall shape while [START_REF] Hu | Small-Scale Cosmological Perturbations: an Analytic Approach[END_REF], [START_REF] Eisenstein | Detection of the Baryon Acoustic Peak in the Large-Scale Correlation Function of SDSS Luminous Red Galaxies[END_REF][START_REF] Eisenstein | Baryonic Features in the Matter Transfer Function[END_REF][START_REF] Eisenstein | Detection of the Baryon Acoustic Peak in the Large-Scale Correlation Function of SDSS Luminous Red Galaxies[END_REF]Hu (1999) accounts for baryon wiggles. Then, at k < 0.01 -0.1 hMpc -1 , the power spectrum is well understood using linear theory. BAO are visible around 0.1 hMpc -1 , and the amplitude of fluctuations actually depends on small-scale clustering (Crocce and Scoccimarro, 2008;Taruya et al., 2012;Rasera et al., 2014). From k ≈ 0.1 hMpc -1 to k ≈ 0.3 hMpc -1 , there is a quasilinear regime where the shape of the power spectrum can be modeled analytically through PT. With this formalism we have corrections from the linear power spectrum as (2.116) where P (0) (k, z) = D 2 + (z)P (0) (k, 0) is the linear power spectrum and P (1) (k, z) the one-loop correction in the diagrammatic representation [START_REF] Scoccimarro | Loop Corrections in Nonlinear Cosmological Perturbation Theory[END_REF] which depends on coupling between higher-order density contrast terms when performing an n th order expansion of the density contrast. Last, after k ≈ 0.3 hMpc -1 we reach the non-linear regime where the power spectrum is not yet well understood analytically. We need numerical simulations in order to have access to small-scale modes and to understand the non-linear clustering of structure formation. It is worth noting that some fits of the power spectrum from simulations are commonly used as HALOFIT [START_REF] Smith | Stable clustering, the halo model and non-linear cosmological power spectra[END_REF] for convenience. However there are two limitations: First, many of these analytical formula to compute a non-linear power spectrum, if they are close to the power spectrum from simulations, do not consider its derivative. This can be problematic for example when using these analytical fits into the Fisher Matrix formalism (where the derivative of the power spectrum is mandatory) to do forecasts [START_REF] Seo | Probing Dark Energy with Baryonic Acoustic Oscillations from Future Large Galaxy Redshift Surveys[END_REF]. Recently this question has been addressed and more people are working on response functions which are functions of k which is defined as the functional derivative of the non-linear power spectrum with respect to the linear power spectrum [START_REF] Nishimichi | Moving around the cosmological parameter space: A nonlinear power spectrum reconstruction based on high-resolution cosmic responses[END_REF]. Second, the computational power and resolution of simulations. Indeed, to have access to a high range of modes and to capture well BAO it is mandatory to perform simulations using huge boxes (Rasera et al., 2014) in order to avoid cosmic variance. These fits or emulators (as COSMICEMU, Heitmann et al. 2016) are restricted to the prediction of the real-space matter power spectrum. In order to fully understand LSS clustering we would need higher-order statistics, the transition from matter to halos and galaxies, as well as the mapping from real space to what we observe.

P(k, z) = P (0) (k, z) + P (1) (k, z) + ...,

From sources to observers

We have seen in the previous section the dynamics of large-scale structures and their evolution through gravitational instabilities. However, an observer does not observe these structures in themselves but via messengers and all the information we can possibly have about our universe lies in our past light cone. Inside the light cone, meaning for ds 2 < 0, we have informations for example from abundance of the chemical elements and from neutrinos. On the light-cone hypersurface, meaning ds 2 = 0 we have informations from gravitational waves and light. Accounting for the process in which the information reaches a given observer is important and in this Section we will be interested in particular in light propagation in an inhomogeneous universe within the weak-field approximation. From here we will present the equations used in this thesis for light propagation and analytical approximations.

Light can be considered as a collection of light rays under the eikonal approximation because the variation of amplitude is much larger than its wavelength and therefore allow us to consider the particle description. This allow us to treat light as individual light rays (or photons) as well as light beams.

Light rays

First we may derive the general e.o.m for a photon in the conformal Newtonian gauge

ds 2 = a 2 (η) -(1 + 2φ) dη 2 + (1 -2φ) δ ij dx i dx j .
(2.117)

The conformal transformation g µν (x ρ ) = Ω 2 (x ρ ) gµν (x ρ ) allows one to use gµν to carry on light propagation calculations more easily than with g µν (x ρ ) with the same results since ds 2 = 0. In our case, light propagation in a FLRW universe using conformal time and comoving space is equivalent to light propagation in a weakly-perturbed minkowski spacetime. We can write the geodesic equations as

dk α dλ + Γ α βγ k β k γ = 0 . (2.118)
With λ the affine parameter characterizing the photon path. This equation gives us conditions on the energy variation of the photon and its spatial deviation

dk 0 dλ = -2H k 0 2 - 2 c 2 dφ dλ k 0 + 2 ∂φ ∂η k 0 2 , dk i dλ = -2Hk 0 k i + 2 c 2 dφ dλ k i -2 ∂φ ∂x i k 0 2 , (2.119a) (2.119b)
with dφ/dλ = k α ∂φ/∂x α . We remind that for photons k ν k ν = 0. From this we can easily relate k 0 and k i as

k i k 0 = dx i dη = (1 + 2φ)n i .
(2.120)

With n i the spatial unit vector pointing in the direction the photon is coming, also δ ij n i n j = 1

Energy term (perturbed redshift)

The first geodesic equation Eq. (2.119a) gives evolution of time dilation along the photon path. This effect modifies the photon wavelength and therefore its energy. This equation can be rewritten as (2.121) with n i the direction the photon is coming from. By definition, the redshift is

d ln k 0 dη = -2H -2n i ∂φ ∂x i ,
1 + z = (k ν u ν ) S (k ν u ν ) O = g µν k µ u ν S g µν k µ u ν O , (2.122)
where the subscripts O and S refer to either the observer or the source. It is different from the homogeneous redshift which only depends on the scale factor as a = 1/(1 + z). Normalizing of the four-velocity and only accounting for the first order terms, we can finally infer the energy of a photon as

g µν k µ u ν = -ack 0 1 + φ - k i u i k 0 , (2.123)
where the last term is the common Doppler effect. Solving Eq. (2.121) and linearizing the redshift at first order yields

1 + z = a 0 a 1 + (v S -v O ) • n c - (φ S -φ 0 ) c 2 - 2 c 2 η 0 η ∂φ ∂η dη , (2.124)
with v = u i and n = k i /k 0 at first order. The term in (φφ 0 ) is known as the Sachs-Wolfe effect when considering the CMB. This comes from gravitational redshift, photons coming from denser regions (deeper potential well) will be more redshifted than photons from less dense regions. The integrated term is known as the Integrated Sachs-Wolfe effect which accounts for the variation of the potential along the photon's path in linear theory. In the non-linear regime this effect is known as the Rees-Sciama (RS) effect. We note that these are the same effects as the ones described in the CMB Section.

Deviation term (perturbed position)

The second geodesic equation Eq. (2.119b) gives the variation in the photon wavevector and therefore variations of its tangent vector

dk i dλ = -2Hk 0 k i + 2k i dx dλ dφ dλ -2 k 0 2 ∂φ ∂x i . (2.125)
In order to recover the lensing deviation equation, we need to determine how the spatial part of the wavevector evolves in time. First we might write (2.131)

d 2 x i dλ 2 = k 0 d 2 x i dη 2 + k i k 0 d 2 η dλ 2 , ( 2
The factor 2 comes from the fact that lensing is sensitive to the sum of the Bardeen potentials ψ + φ, but assuming no anisotropic stress these potentials are equal. This feature is interesting because the relativistic Poisson equation relates the density to only φ while lensing probe both potentials. Having an independent probe for φ or ψ alone could in principle, in addition to lensing, probe the anisotropic stress. However in this Section we consider φ = ψ.

Integrating by parts Eq. (2.120) we find

s = x + c H δzn -2n x 0 φ/c 2 dx -2 x 0 (x -x )∇ ⊥ φ/c 2 dx , (2.132)
with s the observed position of a source, x its comoving position, δz = zz the redshift perturbation which modifies the position along the l.o.s. The third term is the Shapiro time delay and the last one is the lensing displacement in the direction transverse to the l.o.s where the gradient is computed at the comoving distance x .

Angular displacements

Due to the potential along their paths, photons do not follow "straight lines" in a Newtonian sense even if in GR they do (geodesics). A source can therefore be seen at a different angular position than its comoving one. This deviation will be the integral of Eq. (2.131), meaning the deviation of photons is a probe of the projected integral of the gravitational field along its path. The usual example to illustrate this problem is to use massive objects (stars, galaxies, clusters) as lenses which deviates photons coming from a background source.

As seen in Fig. 2.7, β is the direction from which the undeflected photon would arrive (also called true angle), θ the observed angular position (seen angle), α the deflection angle and α the reduced deflection angle (hereafter called deflection angle for simplicity because we will not use α), from Eq. (2.132) we have the following simple equation

β = θ -α,
(2.133) also known at the lens equation. Note that we considered the small angle approximation. This gives for the deflection angle [START_REF] Schneider | Gravitational Lenses[END_REF]) The deflection angle depends on the perpendicular acceleration of photons due to potentials along their path. We assume that we have a bijection between true angles and seen angles (for one source there is one single image): this is the Weak-Lensing (WL) approximation. In practice we can have more than one image for a source, or even a continuous solution as Einstein rings but these are small-scale effects we are not interested in at the moment.

α = -2 x 0 (x -x ) x ∇ ⊥ φdx . ( 2

Light beams

Up to now we have only considered the case of a single light ray but with the WL formalism we can study light beams and therefore tidal effects on lensing deviations. WL can modify the apparent position of sources but also their properties as shapes and luminosities. Assuming a linear mapping, we define the lensing distortion matrix A ij as the inverse Jacobian of the transformation from seen angles to true angles as

A ij = ∂β i ∂θ j = δ ij - ∂α i ∂θ j , (2.135) = δ ij -2 x 0 (x -x )x x ∂ 2 φ ∂x i ∂x j dx .
(2.136)

We can define the lensing potential Ψ(θ, x) as α = ∇Ψ. Inserting the lensing potential in Eq. (2.136) reads simply

A ij = δ ij -∂ i ∂ j Ψ.
(2.137)

Chapter 2. Theoretical framework Due to the commutativity of the derivative operator, the matrix A ij is symmetric. It can be written as

A ij = 1 0 0 1 (1 -κ) + -γ 1 -γ 2 -γ 2 γ 1 , (2.138) with κ = 1 2 (∂ 1 ∂ 1 + ∂ 2 ∂ 2 )Ψ, γ 1 = 1 2 (∂ 1 ∂ 1 -∂ 2 ∂ 2 )Ψ and γ 2 = ∂ 1 ∂ 2 Ψ.
The first term is the isotropic modification of the source shape, a source can be seen as bigger or smaller than it really is. The term κ is called convergence. The second term is the anisotropic stretching of the source image: a circular image is mapped into an ellipse. The term γ = (γ 1 , γ 2 ) = γ 1 + iγ 2 is called shear. The final distortion matrix is

A = 1 -κ -γ 1 -γ 2 -γ 2 1 -κ + γ 1 . (2.139)
Since the size of the source is changed, and using flux (or photons) conservation, the source luminosity will also be modified to be brighter or fainter. This effect is called magnification. This quantity is given by the inverse determinant of the distortion matrix

µ = 1 det(A) = 1 (1 -κ) 2 -|γ| 2 ,
(2.140)

with µ the magnification which gives µ = 1 + 2κ when κ, γ 1 and γ κ. Lensing quantities can be inferred from the observed ellipticity of galaxies, assuming that statistically there is no intrinsic alignment (actually there is due to the cosmic web structure, see [START_REF] Hirata | Intrinsic alignment-lensing interference as a contaminant of cosmic shear[END_REF] this is beyond the scope of this manuscript). The shear deduced from observed ellipticities is not the "real" shear but rather the reduced shear g = γ 1κ .

(2.141) which depends on the convergence. Estimating the convergence is more tedious because it is an isotropic effect and we generally do not know the angular size of the objects we observe, however there are methods to probe it [START_REF] Schmidt | A Detection of Weak-lensing Magnification Using Galaxy Sizes and Magnitudes[END_REF].

Lensing quantities are projected quantities. For the convergence term, relating the convergence to the lensing potential and using the Poisson equation reads [START_REF] Kilbinger | Cosmology with cosmic shear observations: a review[END_REF]

κ(θ, x) = 3 2 H 0 Ω m,0 x 0 dx a (x -x )x x δ(x θ, x ). (2.142)
We note that we used the Born approximation, assuming the density is evaluated along the unperturbed path of the photon. To compute the convergence we need to integrate over the probability distribution of sources within the limits of our survey

κ(θ) = x lim 0 n(x )κ(θ, x )dx , (2.143)
with n(x) the source distribution w.r.t comoving distance. This finally gives

κ(θ) = 3H 0 Ω m,0 2 x lim 0 dx a q(x )x δ(x θ, x ), (2.144)
with q(x) the lensing efficiency which acts as a weighting function. Sources at roughly half the comoving distance contribute the most to lensing. For q(x) we have

q(x) = x lim x dx n(x ) (x -x) x .
(2.145)

In a more realistic approach, if we consider multiple lenses [START_REF] Hilbert | Ray-tracing through the Millennium Simulation: Born corrections and lens-lens coupling in cosmic shear and galaxy-galaxy lensing[END_REF], the distortion matrix becomes non-symmetric and we should add an off-diagonal rotation component ω for the light beam at first order. The full expression however yields

A = cos(ω) -sin(ω) sin(ω) cos(ω) 1 -κ -γ 1 -γ 2 -γ 2 1 -κ + γ 1 .
(2.146)

Using this matrix gives for the magnification and lensing quantities

µ = (A 11 A 22 -A 12 A 21 ) -1 , ω = -arctan A 12 -A 21 A 11 + A 22 , κ = 1 - A 11 + A 22 2 cos ω , γ 1 = - 1 2 [(A 11 -A 22 ) cos ω + (A 12 + A 21 ) sin ω] , γ 2 = - 1 2 [(A 12 + A 21 ) cos ω + (A 22 -A 11 ) sin ω] . (2.147a) (2.147b) (2.147c) (2.147d) (2.147e)
We note that to recover these results one can use the optical scalar, using the Sachs equation [START_REF] Sachs | Gravitational Waves in General Relativity. VI. The Outgoing Radiation Condition[END_REF], giving a more General Relativistic treatment focusing on the deformation rate of light beams.

Projected integrated quantities

Often as in lensing, the probes are not three dimensional but rather a two dimensional projection of integrated quantities on the sky. For example, gravitational convergence gives the projection of the integrated density contrast along the l.o.s. These calculations need a specific treatment (Kaiser, 1992) in order to understand the subtleties and different approximations.

Correlation function

Let us consider such a two-dimensional projection

g(θ) = dxW(x)δ(x), (2.148)
where θ is the source angular position, W(x) can be interpreted as an unnormalized window function of the density contrast along the l.o.s. The vector position can be split into two components along and perpendicular to the l.o.s as x = (x, xθ) where we recognize the Born approximation. We also consider θ to be small. Its correlation function is given by

ξ gg (|θ 1 -θ 2 |) = g(θ 1 )g(θ 2 ) , (2.149)
Chapter 2. Theoretical framework replacing g by Eq. (2.148) gives

ξ gg (|θ 1 -θ 2 |) = dx 1 dx 2 W(x 1 )W(x 2 ) d 3 k 1 (2π) 3 d 3 k 2 (2π) 3 δ(k 1 )δ * (k 2 ) e -ik 1 •x 1 e ik 2 •x 2 ,
(2.150) with x 1 , x 2 the position for each source. As seen previously, δ(k

1 )δ * (k 2 ) = (2π) 3 δ D (k 1 - k 2 )P(k 2 )
. We also make the following changes of variables : x = (x 1 + x 2 )/2 and r = x 1x 2 and decompose the wavevector as k = (k , k ⊥ ). Since k 1 = k 2 we do not need to use subscripts anymore. This yields

ξ gg (|θ 1 -θ 2 |) = dx drW x + r 2 W x - r 2 d 3 k (2π) 3 P(k)e -ixk ⊥ (θ 1 -θ 2 ) e ikr .
(2.151)

Here we use the Limber approximation, meaning that we neglect correlations along the l.o.s considering

W(x + r/2)W(x -r/2) ≈ W(x) 2 . This leads to ξ gg (|θ 1 -θ 2 |) = dxW(x) 2 d 3 k (2π) 3 P(k)e -ixk ⊥ (θ 1 -θ 2 ) dre ikr .
(2.152)

The last integral gives rise to a Dirac delta function which implies that only modes perpendicular to the l.o.s contribute to the correlation. Using statistical isotropy and performing a first-order plane wave expansion for the exponential term, it is straightforward to show that

ξ gg (φ) = dxW(x) 2 dk 2π kP(k)J 0 (xkφ), (2.153)
where J 0 is the zeroth order Bessel function of the first kind and φ = |θ 1θ 2 |. Note that the same calculation be be carried out for any curvature Ω k by making the change x → f k (x).

Similar calculations can also be performed for g(θ)δ(θ ) .

Power spectrum

In the flat-sky approximation, the spherical harmonic angular mode analogous to the Fourier mode one can be expressed as = kx. The Fourier transform relations becomes

g(φ) = d 2 (2π) 2 e -i •φ g( ),
(2.154)

g( ) = d 2 φe i •φ g(φ).
(2.155) Analogously,

P g ( ) = d 2 φξ gg (φ)e i •φ , (2.156) = W(x) 2 dx d 2 k (2π) 2 P(k) d 2 φe i( -kx)φ , (2.157) = W(x) 2 dx d 2 k (2π) 2 P(k)δ D ( -kx), (2.158) = dx W(x) x 2 P x . (2.159)
As expected we recover the relation = kx. We also assumed that the power spectrum varies slowly. To see the impact of the Limber approximation on WL see [START_REF] Lemos | The effect of Limber and flat-sky approximations on galaxy weak lensing[END_REF]. To go beyond the Limber approximation see [START_REF] Loverde | Extended Limber approximation[END_REF] and for taking into account the sky curvature [START_REF] Kilbinger | Precision calculations of the cosmic shear power spectrum projection[END_REF].

Lensing quantities

Convergence

From the previous results we can determine several analytical formulas for lensing quantities in the flat-sky approximation. First we determine the convergence power spectrum. We remind that the window function for the convergence is

W(x) = 3 2 H 0 Ω m,0 q(x) x a , (2.160) with q(x) = x lim x dx n(x ) x -x x ,
(2.161) and x lim the comoving distance of background galaxies while n(x) is the galaxy distribution along the l.o.s. The convergence power spectrum is then

P κ ( ) = 9 4 H 2 0 Ω 2 m,0 q(x) 2 a 2 P x dx.
(2.162)

We can extract cosmological informations from the convergence power spectrum: we have the matter density in Ω m,0 , informations on initial conditions and the growth of structure in the P x and also informations on the redshift distribution of galaxies as well as the geometry of the universe in q(x). The convergence correlation function is then

ξ κ (φ) = d 2 (2π) 2 P κ ( )e -i •φ , (2.163) = d 2π P κ ( )J 0 ( φ).
(2.164)

Shear

After the convergence, we determine the statistics for the shear. We remind that κ =

1 2 (∂ 1 ∂ 1 + ∂ 2 ∂ 2 )Ψ, γ = γ 1 + iγ 2 where γ 1 = 1 2 (∂ 1 ∂ 1 -∂ 2 ∂ 2 )Ψ and γ 2 = ∂ 1 ∂ 2 Ψ
with Ψ the lensing potential. We see immediately that

P κ = k 2 4 P Ψ .
(2.165) Also, connecting convergence and shear

γ = 1 + i 2 2 κ = e -2iβ κ, (2.166)
with 2 = 2 1 + 2 2 and β the polar angle of . In terms of power spectrum we finally have P γ = P κ . In term of the correlation function we are often interested in tangential and cross component which can be decomposed following Schneider et al. ( 2002)

γ t = -Re γe -2iϕ ,
(2.167)

γ x = -Im γe -2iϕ , (2.168)
where Re and Im refers respectively to the real and imaginary part of the function. ϕ is the phase of the ellipse with respect to (γ 1 , γ 2 ) as cos(ϕ) = ˆ • φ. The factor 2 in the exponential comes from the fact that these quantities are invariant by a rotation of angle π. From these relations we have that for the power spectrum of the transverse and cross components of the shear

γ t = 1 2 d 2π P κ ( ) [J 0 ( φ) + J 4 ( φ)] ,
(2.169)

γ x = 1 2 d 2π P κ ( ) [J 0 ( φ) -J 4 ( φ)] .
(2.170)

From these quantities we can compute the two cosmic shear correlation functions

ξ ± = γ t γ t ± γ x γ x .
(2.171)

These functions finally gives

ξ + (φ) = d 2π J 0 ( φ)P κ ( ), (2.172) ξ -(φ) = d 2π J 4 ( φ)P κ ( ).
(2.173) Also, the mixed correlation function γ t γ x = 0. This is a good consistency check to test the data or numerical methods to infer ξ + and ξ -. These functions are also called cosmic shear (see Fig. 2.8) and their estimation is one on the main target of contemporary and future surveys. We note that another important lensing probe is galaxy-galaxy lensing, given by the cross-correlation between the shear of background sources with the position of foreground sources which could also be written δγ .

We have briefly shown the first-order WL formalism in the small-angle approximation, if one wants to go further with a full-sky treatment at second order it is done in [START_REF] Bernardeau | Full-sky lensing shear at second order[END_REF].

Distance perturbations

Light propagation in an inhomogeneous universe has an impact on the observed size of sources, and therefore on the angular diameter distance which is directly related to the luminosity distance by the distance duality relation. We have seen that gravitational convergence (Eq. 2.144) modifies the observed size of sources due to differential deviations in light beams. If we infer the convergence by computing the variation of sizes of objects of a given population at a given redshift, the "convergence" inferred will be different from gravitational convergence. Indeed, as seen in [START_REF] Bonvin | Effect of peculiar motion in weak lensing[END_REF], when we observe sources at a given redshift the sources are not at the same comoving radius due to redshift perturbations. An object closer to the observer w.r.t the comoving redshift recedes from the observer and an object further away come towards the observer. This means that we interpret the angular size of objects w.r.t to the observed redshift, meaning that an object will be seen bigger if it is closer to the observer and smaller if it is further away (see Fig. 2.9). If convergence is the term which specifies the perturbations of the angular size of a source, then following [START_REF] Bacon | Cosmology with Doppler lensing[END_REF] we can write (assuming |γ| 2 κ)

D A (z, n) = DA (z) [1 -κ(z, n)] , (2.174)
where n is the direction of light propagation. To estimate κ, we need to derive the angular diameter distance perturbations (at first order).

D A (z) = DA (z) 1 + δD A DA z + 1 - 1 + z Hχ δz 1 + z z , (2.175) with Observer Observer Gravitational convergence Doppler convergence z = cte z = cte FIGURE 2
.9: Sketch of different effects which modify the apparent size of sources at a given observed redshift. Top panel: gravitational convergence, it is the usual convergence effect, an object is seen larger or smaller depending on photon propagation. In solid line we have photon trajectories. Bottom panel: Doppler convergence, the arrows refer to the peculiar velocities of sources. For both panels we have the constant redshift hypersurface as a bold solid line, in dotted lines we have the unperturbed geodesics. The sources are shown as circles with solid contour while circles with dashed contours indicates the sources as they appear for an observer.

δD A DA z = -v O • n -φ S + 1 χ χ O dχ 2φ + (χ -χ)χ∇ 2 ⊥ φ , (2.176) δz 1 + z z = (v O -v S ) • n + φ O -φ S -2 χ 0 dχ ∂φ ∂η . (2.177)
Putting these equations in Eq. (2.175) and identifying with Eq. (2.174) we find the following components for the convergence

κ v = 1 + z Hχ v O • n + 1 - 1 + z Hχ v S • n, (2.178) κ SW = 2φ S -φ O + 1 + z Hχ (φ O -φ S ), (2.179) κ ISW = - 2 χ χ 0 φdχ + 2 1 - 1 + z Hχ χ 0 dχ ∂φ ∂η , (2.180)
where κ v , κ SW and κ ISW are the convergence terms due to redshift perturbations respectively from Doppler effect, gravitational redshift and ISW effect. These two last terms being negligible, we can focus on the Doppler convergence term, also called Doppler magnification when considering its impact on the magnification. Dropping the overall dipole we have

κ v = 1 - 1 + z Hχ v S • n (2.181)
We see that this effect is directly proportional to the source radial velocity and therefore measuring κ v may probe the velocity field along the l.o.s. There are two effects in this term: first the modification of the angular size due to the position of an object interpreted with the distance from redshift, and the fact that photons propagate in an expanding universe, therefore a photon further away will propagate longer through the expansion. These two effects cancels at redshift z ≈ 1.7 in a ΛCDM cosmology. It was shown in [START_REF] Bonvin | Effect of peculiar motion in weak lensing[END_REF] that Doppler convergence dominates the usual gravitational convergence at low redshift z 0.4. Note that this effect was also estimated for voids in [START_REF] Bolejko | Antilensing: The Bright Side of Voids[END_REF].

The full expression for convergence accounting for Doppler convergence is

κ tot = (1 + κ g )(1 + κ v ) -1 , (2.182)
which can be approximated by (2.183) when the coupling between the two convergence terms is negligible.

κ tot = κ g + κ v ,

Redshift-space distortions

We have seen that due to light propagation in an inhomogeneous universe, the apparent position of objects can be different from their "true" position. There are modifications of the angular position with WL, but also modification of their apparent distance. Estimating distances in cosmology is not simple and usually we use redshifts, meaning the shift of emission lines. This can be done using spectroscopy, photometric redshift or the more recent clustering redshift method [START_REF] Scottez | Clustering-based redshift estimation: application to VIPERS/CFHTLS[END_REF]. Surveys gives us the redshift and the angular position of objects, from these quantities we can go back to comoving coordinates assuming a given homogeneous and isotropic cosmology. But the redshift can be modified by many effects, the most usually considered being the Doppler effect (Kaiser, 1987;Hamilton, 1992). This means that the position of objects can be different from what we usually expect in a statistically homogeneous and isotropic universe. In this Section, we will see the impact of redshift perturbations on the statistical properties of the density field. We can decompose the redshift as a homogeneous part that accounts for the expansion flow of the universe and a perturbation part as z = z + δz. The modification of the radial distance due to redshift perturbations is

s = x + c H δzn, (2.184)
where s is the seen distance and x is the comoving distance. In principle n is the spatial tangent vector of the photon along the geodesic and should depend on space and time, however here we consider n as the l.o.s direction. We call the change from r to s Redshift-Space Distortions (hereafter RSD). Using mass conservation we know that

1 + δ (s) (s) d 3 s = 1 + δ (r) (r) d 3 r.
(2.185) δ (s) and δ (r) are the matter density contrasts respectively in redshift space and real space. So we have

δ (s) = 1 + δ (r) J -1 -1. (2.186)
Usually, we talk about real space when the position of objects is their comoving position and redshift space when their positions are perturbed by redshift perturbations. Here, J = |ds/dr| is the Jacobian for the mapping from real to redshift space.

Standard RSD

The first attempt to model RSD only took into account the Doppler effect, in that case

1 + z = a 0 a [1 + (v -v 0 ) • n] . (2.187)
a 0 is the scale factor today which will be set to 1. v is the source peculiar velocity and v 0 is the observer peculiar velocity that only contributes to an overall dipole. We can thus rewrite

s = r + 1 H [(v -v 0 ) • n] • n. (2.188)
The Jacobian is straightforwardly

|J| = 1 + 1 H ∇ r (v • n) • n.
(2.189)

The mapping using |J| -1 is therefore non-linear. Writing J = 1 + and considering small allow us to linearize the equation to J -1 = 1 -. This poses the question on the conditions in which this linearization is valid and how to take into account the non-linearity of the mapping. Another solution is to go to Fourier space. For the density contrast we have (2.191) where the superscripts (s) and (r) refers respectively to estimated density in redshift space and real space. Finally this reads

δ (s) (k) = d 3 se -ik•s δ (s) (s), (2.190) δ (s) (k) = d 3 se -ik•s 1 + δ (r) J -1 -1 ,
δ (s) (k) = d 3 re -ik•s 1 + δ (r) -J . (2.192)
Here we do not have any problems with the non-linearity of the mapping. For halos or galaxies, we can introduce (in comoving gauge) the linear bias b as follows δ = bδ m with δ m being the matter density contrast. This means that the density of galaxies tends to follow the matter clustering as it is a good approximation for distances > 3 h -1 Mpc [START_REF] Hayashi | Understanding the halo-mass and galaxy-mass cross-correlation functions[END_REF]. This bias is phenomenological and more complicated implementations can be performed but here we display the most common and simplest bias definition. We have

δ (s) (k) = d 3 re -ik•s bδ (r) m - 1 H ∇ r (v • n) • n . (2.193)
Generally, the mapping from real to redshift space involves δ, v and φ, respectively density contrasts, peculiar velocities and gravitational potential. However, using linear theory we can easily write the mapping only in terms of δ, which is interesting for us since it will lead to a power spectrum which we can easily infer at z = 0 from cosmological parameters and evolved linearly using the growth factor D + . Rewriting Eq. (2.193) in terms of density contrasts using the continuity equation to relate velocity and density contrast reads (2.194) where hat denotes a unit vector. Qualitatively, the observed galaxy distribution is different from its comoving distribution. In real space we assumed statistical homogeneity and isotropy, the correlation function was only a function of r meaning the overall distribution has a spherical symmetry. RSD break this symmetry as matter tends to fall toward overdensities: this translates in a squeezing of the correlation function along the l.o.s due to Doppler effect. This is known as the Kaiser effect (Kaiser, 1987). The amplitude of this effect depends on the growth rate which carries cosmological informations and allows to constraint modified theories of gravity. Unfortunately, at smaller scales the pairwise velocity probability density function (PDF) becomes heavily non-gaussian with high velocity dispersion and moreover the evolution and the mapping become non-linear. This also modifies the shape of the correlation function as the distribution of galaxies will appear more elongated along the l.o.s for smaller scales. This effect is called Finger of God (FoG) effect. Taking this effect into account is a challenge. These two effects can already be seen in Eq. (2.194).

δ (s) (k) = d 3 re -ik•r e -ik•(s-r) b + f k • n 2 δ (r) m ,
The e -ik•(s-r) term will give rise to the FoG term while f k • n 2 will give rise to the Kaiser term.

For now we will neglect the small-scale FoG effect, meaning that for large scales

δ (s) (k) = d 3 re -ik•r b + f k • n 2 δ (r) m (r). (2.195)
From here, and to recover the Kaiser formula we will not consider the angle average. As pointed by Zaroubi and Hoffman (1996), this approximations only hold if the data is in a volume seen under a small angle. The Fourier-space correlation reads .196) with ν = k • n. Finally, using the power spectrum this yields the Kaiser formula .197) This result was achieved using multiple approximations but a full Fourier-space treatment would be complicated due to redshift-space mode coupling. It is more straightforward, for linear scales, instead of computing the Fourier transform of the density contrast to directly compute the correlation function Fourier transform using a linearized mapping from real to redshift space, i.e.

δ (s) (k)δ (s) (k ) = (2π) 3 δ D (k + k ) b + f ν 2 2 P m (k), ( 2
P g (k) = b + f ν 2 2 P m (k). ( 2
δ(x 1 )δ(x 2 ) = 1 (2π) 6 k 1 d 3 k 1 k 2 d 3 k 2 δ(k 1 )δ(k 2 ) . (2.198)
The correlation function no longer has a spherical symmetry. Legendre polynomials give us a straightforward basis to expand the correlation function and estimate its new symmetries.

We can rewrite the correlation function and power spectrum as

ξ(r) = ∑ ξ (r)L (µ),
(2.199)

P(k) = ∑ P (k)L (ν).
(2.200)

With µ = r • n. We will now consider the factor in the Kaiser term, and see how it impacts the multipoles of the correlation function in redshift space.

b + f ν 2 2 = b 2 + f 2 ν 4 + 2 f ν 2 , (2.201) = b 2 + 1 5 f 2 + 2 3 b f + 4 7 f 2 + 4 3 b f L 2 (ν) + 8 35 L 4 (ν). (2.202)
It is straightforward to see that the plane-parallel Doppler only RSD generates a quadrupole, an octupole and modifies the monopole of the correlation function and power spectrum. We can also notice that only even multipoles contribute to the distortions. This is easy to see since we are only interested in the real part of the power spectrum and δ(k) does not have an imaginary part. This statement is only true in the distant-observer approximation. Using Eq. ( 2.202) we can easily extract some information. The Kaiser formalism is interesting as a first approximation to RSD, however there are more complex effects to take into account if we want to keep up with the increasing amount of survey data and this approximation unfortunately does not fit well the observations nor the simulations.

Extension to wide angles

An additional wide-angle term

A first improvement to the RSD formalism is to account for wide-angle effects. To my knowledge, this was made first by Szapudi (2004). Qualitatively, we no longer consider that galaxy pairs are seen under the same angle meaning we relax the distant-observer approximation as seen in Fig (2.10).

Observer FIGURE 2.10: Sketch of the wide-angle effect on RSD. The solid circle shows the real-space distribution of sources and in dashed lines we have tangent lines to the distribution. Due to the finite observer, the distance at which peculiar velocities are normal to the l.o.s is different from the one with an observer at infinity. This means that more sources are shifting toward than receding from the observer, leading to an asymmetry along the l.o.s.

We see that due to geometrical and Doppler effects, more galaxies are seen in front of the over-densities than on the far side. This leads to an overall negative dipole of the correlation function. Relaxing the distant-observer approximation for the galaxy power spectrum yields

P g (k) = 1 + f ν 2 1 1 + f ν 2 2 P m (k). (2.203)
Chapter 2. Theoretical framework

This differs from the Kaiser formula Eq. (2.197) as we now consider ν 1 = ν 2 . For simplicity we have set b 1 = b 2 = 1. Decomposing in Legendre polynomial we have

1 + f ν 2 1 1 + f ν 2 2 = 1 + 1 3 2 + 2 3 f + 2 9 f 2 (L 2 (ν 1 ) + L 2 (ν 2 )) + 4 9 L 2 (ν 1 )L 2 (ν 2 ).
(2.204) In order to see the impact of wide angles to the correlation function, we need to inverse Fourier transform Eq. (2.203). We see immediately that, using spherical harmonics

1 (2π) 3 d 3 k 2 3 f + 2 9 f 2 (L 2 (ν 1 ) + L 2 (ν 2 )) P(k)e ik•r = 2 3 f + 2 9 f 2 (L 2 (µ 1 ) + L 2 (µ 2 )) ξ 2 (r). (2.205) With µ 1 = x1 • r and µ 2 = x2 • r.
The last term of Eq. (2.204) can be expanded using tripolar spherical harmonics. However we find it inconvenient to write the results in terms of two angles and it would be preferable for generality to write the correlation function in terms of a single one. Then a question arises: How should we define the angle which will be used to compute the multipoles of the correlation function ? In [START_REF] Reimberg | Redshift-space distortions with wide angular separations[END_REF], the authors investigated this question and presented the results for the correlation function depending of the choice of angle. In [START_REF] Gaztanaga | Measurement of the dipole in the crosscorrelation function of galaxies[END_REF], the authors advocated for the angle which is defined by the scalar product of the median of the galaxy pair with the pair separation vector, defined as µ = x • r with

x = 1 2 (x 1 + x 2 ), (2.206) r = x 2 -x 1 .
(2.207)

In the following we also use

µ = x • r, ν = k • x, ν 1 = k • x1 , ν 2 = k • x2 , ν r = k • r.
The advantage of this definition is that the wide-angle term is now symmetric under exchange of pairs. Said differently, with this choice of angle there is no asymmetry (understood as asymmetry along the l.o.s, i.e. no odd multipole terms) in the auto-correlation function. In Szapudi (2004), the author expand the correlation function using tripolar spherical harmonics with ν, ν 1 and ν 2 . However we find it more convenient to rewrite ν 1 and ν 2 in terms of ν and ν r because it simplifies the underlying calculations. Writing everything in terms of x and r instead of x 1 and x 2 gives

ν 2 1 = ν 2 + r x νν r -ν 2 L 1 (µ) , (2.208) ν 2 2 = ν 2 - r x νν r -ν 2 L 1 (µ) . (2.209)
Here we only keep the terms in O r x . At the end we get

b 1 + f ν 2 1 b 2 + f ν 2 2 = A + r x B.
(2.210)

Where A is the standard term giving rise to monopole, quadrupole and hexadecapole while B is the asymmetric term. B is given by

B = (b 1 -b 2 ) f L 1 (ν r )L 1 (ν) - 1 3 L 1 (µ) - 2 3 L 1 (µ)L 2 (ν) . (2.211)
2.6. Redshift-space distortions

51

As derived in Section B.2, we see that odd wide-angle terms are given by

ξ wa odd (r, µ) = (b 1 -b 2 ) 2r 5x f [-L 1 (µ) + L 3 (µ)] γ 0 2 (r), (2.212) with γ m (r) = 1 2π 2 H 0 c m dkk 2-m j (kr)P(k, z). (2.213)
This generates a dipole and an octupole term.

An additional velocity term

In Pápai and Szapudi (2008), the authors showed that there is an additional Doppler term which was neglected in previous calculations that is non negligible. A proper derivation (however not taking into account the time dependence) of the Jacobian matrix at first order using Eq. (2.188) gives

ds dr = 1 + 1 H ∇ r (v • n) • n + 2 rH v • n. (2.214)
The last term is what differentiates Eq. (2.189) from Eq. (2.214). This is a purely geometrical term generated by the divergence of the l.o.s. Qualitatively, as seen in Fig. 2.11, a volume seen under a given solid angle is perceived as denser if it comes towards us and less dense if it recedes from us. This term is proportional to the velocity field along the l.o.s and therefore probes the growth rate in the linear regime. This is the most dominant term for the dipole at large scales.

Observer FIGURE 2.11: Sketch of the l.o.s divergence effect on RSD. In solid circles we show distributions of objects, the arrows refer to peculiar the overall peculiar velocity of the distribution. Dashed circles show the observed distribution.

Relativistic RSD

Until now, we have only considered classical (Doppler) and geometrical effects for RSD. But actually RSD can contain several effects of different nature. This is what makes RSD complicated: a simple ascertainment (peculiar velocities of galaxies modify their redshifts and therefore the apparent galaxy distribution) can become quickly a field where we have to take into account a lot of effects when computing the apparent distribution of galaxies.

To my knowledge, the first paper to take into account relativistic effects (in the form of the gravitational potential) is McDonald (2009). The author added the gravitational redshift perturbation term to the mapping from real space to redshift space. This leads to an imaginary part of the power spectrum, which, when considering the distant-observer approximation, leads to odd multipoles of the correlation function and therefore an asymmetry of the galaxy distribution when cross-correlating different galaxy populations. In all generality, the plane wave expansion will give even multipoles and imaginary odd multipoles for the correlation function. Odd multipoles arise if δ(k) has real and imaginary parts in the case of small-angle approximation (for wide angle there are some complications). Indeed, if δ(k) is only real or only imaginary, the power spectrum δ(k)δ(k ) will be real and will only give rise to even multipoles (again, in the distant-observer approximation).

More recently, some authors investigated the impact of relativistic effects in general on the galaxy number count and therefore the correlation function [START_REF] Yoo | New perspective on galaxy clustering as a cosmological probe: General relativistic effects[END_REF]Yoo, 2010;Bonvin and Durrer, 2011;Challinor and Lewis, 2011). The goal is to find new probes which will be tested with the increasing precision of data. In these papers, the authors do not use directly the galaxy density contrast δ but rather the galaxy number count ∆ as it gives an observable and therefore gauge invariant quantity. If the galaxy number count is a gauge invariant quantity, the density contrast is not. Fortunately, the gauge dependence of the density contrast is of order O H k 2 . These effects start to be non-negligible at the Gpc scale. In Bonvin and Durrer (2011), the authors first wrote the observed galaxy number count

∆(n, z) = N(n, z) -N (z) N (z) , (2.215) = δ z (n, z) + δV(n, z) V(z) , (2.216) = δ(n, z) - d ρ d z δz(n, z) ρ + δV(n, z) V(z) , (2.217)
where ∆ is the density number count contrast, N(n, z) the number count along the direction n, δV(n, z) the volume perturbation and δ the density contrast. For galaxy number count, this last quantity is proportional to the matter density contrast (assuming that galaxies follows the matter flow) via a bias. However this is only true for the comoving gauge where we can construct an invariant density contrast quantity. Otherwise we have to "correct" δ to account for the modification from comoving gauge to the one we use.

In [START_REF] Bonvin | Asymmetric galaxy correlation functions[END_REF], the authors showed that the most interesting multipole of the correlation function to probe relativistic effects is the dipole. This multipole has the nice property to remain unaffected by standard RSD (i.e. standard Doppler term) and should therefore in principle be more sensitive to subtle relativistic effects. Only considering terms of order O H k , the perturbations on the comoving position due to RSD is given in Eq. (2.132) and the redshift perturbation can be inferred from Eq. (2.124). At first order, the final galaxy number count is finally

∆ =bδ - 1 H ∂ r v • n + 1 Hc v • n - Ḣ cH 2 v • n - 2 Hχ v • n + 1 Hc ∇ r φ - 2 c 2 χ 0 (χ -χ )χ χ ∇ 2 ⊥ φdχ + v • n/c.
(2.218)

On the right-hand side of Eq. (2.218), the first term is the galaxy density contrast written in terms of matter density contrast δ and a bias b. Second term is the usual Doppler RSD term, third term is due to acceleration, fourth term is due the acceleration of the universe expansion, fifth term is the l.o.s divergence term seen in Section 2.6.2. Sixth term is due to gravitational potential and seventh is due to lensing. These terms can be easily derived by computing the Jacobian from Eq. (2.132). Last, there is the light-cone effect term which can be added to previous terms (see [START_REF] Bonvin | Asymmetric galaxy correlation functions[END_REF]. Finally we have quite a complicated equation while we are only at first order. This shows the difficulty to disentangle the different terms in order to extract relevant cosmological information.

To sum up, dark matter density fluctuations evolve through gravitational instability and galaxies form inside dark matter halos. In real space, assuming statistical homogeneity and isotropy, this would lead to only a monopole of the 2-point correlation function. This would be the ideal case, however with a limited sample we expect some noise on the different multipoles of the correlation function, for example cosmic variance due to the unique realization of our universe, and Poisson noise due to the finiteness of the data [START_REF] Bonvin | Optimising the measurement of relativistic distortions in large-scale structure[END_REF]). However we do not directly observe these objects but rather an image which can be affected by many factors, some due to the messenger and some due to the object we observe. Observing galaxies on the surface of our past light-cone already modifies their distribution. Indeed, the real-space distribution (or equal time-slice hypersurface) will be different from what we see on our past light cone due to galaxies peculiar velocities, as well as the evolution of bias, growth rate (and so on) on the light-cone. The peculiar velocity effect which modifies the galaxy distribution on the light-cone was investigated in Kaiser (2013) while the full transition from real space to the light-cone was derived at first order in [START_REF] Bonvin | Asymmetric galaxy correlation functions[END_REF]. Then we can finally investigate the transition from the unperturbed light-cone to the perturbed light-cone and RSD. We see that there are a lot of factors to take into account and that each effect need to be well understood and properly modeled. A huge volume and sample will be necessary to overcome the real-space noise fluctuations. These questions were addressed in [START_REF] Breton | Imprints of relativistic effects on the asymmetry of the halo crosscorrelation function: from linear to non-linear scales[END_REF].

At quasilinear and nonlinear scales

Until now, we have only considered the linear regime where the gravitational potential and peculiar velocities could be directly written in terms of density contrast. However, at smaller scales density-velocity and velocity-velocity couplings become non negligible and require a different treatment (see Section 2.4.3). This is also the case for RSD. From [START_REF] Wojtak | Gravitational redshift of galaxies in clusters as predicted by general relativity[END_REF], we know that there is an observable asymmetry in the distribution around clusters due to the gravitational potential. This was done at the scales of a few Mpc, where linear theory does clearly not hold. Directly probing the potential might be a powerful probe to test modified theories of gravity and therefore an RSD model at these scales seems necessary.

Perturbation theory

Here we will review some of the perturbation theory (PT) re-summation which took into account RSD. These different methods are estimated in [START_REF] Taruya | Baryon acoustic oscillations in 2D: Modeling redshift-space power spectrum from perturbation theory[END_REF]. The redshift-space density contrast in Fourier space (only accounting for the Doppler effect) can be written as

δ (s) (k) = d 3 x δ (r) (x) - 1 H ∇ z v z (x) e i(kνv z /H+k•x) , (2.219)
where v z is the velocity along the l.o.s. The redshift-space power spectrum can be written as

P (s) (k) = d 3 re ik•r e -ikν f ∆u z δ (r) (x) + f ∇ z u z (x) δ (r) (x ) + f ∇ z u z (x ) , (2.220) with r = x -x , u z (x) = -v z (x) and ∆u z = u z (x) -u z (x )
. Unlike in Section 2.6.1, here we keep the FoG term (first term in the brackets). In standard PT (SPT), the one-loop power spectrum can be written as

P (s) SPT (k, ν) = 1 + f ν 2 2 P lin (k) + P (s) 1-loop (k, ν), (2.221)
where P lin (k) is the linear power spectrum. The first term on the right-hand side of Eq. (2.221) is the usual Kaiser term, while the second term is the one-loop correction of the power spectrum in redshift space, accounting for gravitational clustering and redshift perturbations.

Lagrangian PT (LPT) can also account for RSD (Matsubara, 2008). Here the power spectrum is expressed in terms of the SPT power spectrum as

P (s) LPT (k, ν) = e -k 2 (1+ f ( f +2)ν 2 )σ 2 v,lin P (s) SPT (k, ν) + 1 + f ν 2 2 1 + f ( f + 2)ν 2 k 2 σ 2 v,lin , (2.222)
where σ 2 v,lin is the one-dimensional velocity dispersion from linear theory given by

σ 2 v,lin = 1 3 d 3 k (2π) 3 P lin (k) k 2 . (2.223)
There are also phenomenological model which try to model the FoG effect. They are usually written as

P (s) (k, ν) = D FoG (kν f σ v )P Kaiser (k, ν), (2.224)
where D FoG (x) is the function which contains the FoG model. Typically we can write this function as a Gaussian as exp -x 2 or a Lorentzian damping of the form 1/ 1 + x 2 . P Kaiser (k, ν) refers to the standard term either in linear theory or using PT

P Kaiser (k, ν) = 1 + f ν 2 2 P δδ (k) ; linear P δδ + 2 f ν 2 P δθ (k) + f 2 ν 4 P θθ (k) ; nonlinear (2.225)
An improved model for RSD in PT was done in [START_REF] Taruya | Baryon acoustic oscillations in 2D: Modeling redshift-space power spectrum from perturbation theory[END_REF], where there is an additional free parameter σ v which needs to be calibrated on the data. PT is an interesting framework to compute RSD since it is an expansion to higher order of linear theory which accounts for coupling terms. However for the moment most of the RSD work in this formalism was done using the distant-observer approximation, and only accounting for the peculiar velocity (Doppler) term. An interesting future work would be to add wideangle as well as relativistic effects to this formalism.

Streaming model

Another possibility to account for RSD at smaller scales is to use a streaming model. In this formalism, we convolve the real-space distribution with the displacement probability distribution function (PDF) due to redshift perturbations. Following Scoccimarro (2004), it is convenient to express the mapping from real space to redshift space directly as function of (1 + δ) instead of δ as it does not depend on the Jacobian of this transformation. When only considering peculiar velocities, the density in Fourier space reads

δ D (k) + δ (s) (k) = d 3 x (2π) 3 e -ik•x e i f ku z (x) 1 + δ (r) (x) , (2.226)
with δ D the Dirac delta function. In term of power spectrum this yields

δ D (k) + P (s) (k) = d 3 r (2π) 3 e ik•r e i f k∆u z 1 + δ (r) (x) 1 + δ (r) (x ) , (2.227)
while in configuration space this can be written as

1 + ξ (s) (s , s ⊥ ) = dr δ D (s -r + f ∆u z ) 1 + δ (r) (x) 1 + δ (r) (x ) , (2.228)
with s and s ⊥ the distance of an object in redshift space along and perpendicular to the l.o.s. Similarly, r and r ⊥ are the separation vectors of the pair along and perpendicular to the l.o.s. We note that Eq. (2.228) is quite intuitive. Finally, at first order we see that the mapping depends on the pairwise velocity. In terms of the correlation in real space, the redshift-space correlation function using the streaming model reads

1 + ξ (s) (s , s ⊥ ) = dr 1 + ξ (r) P (r -s , r).
(2.229)

The pairwise-velocity PDF along the l.o.s is contained in P (rs , r). This can be done analytically using PT or a halo model. This can also be done numerically either by computing every pairwise velocity or the moments of the PDF. If the PDF is slightly non-Gaussian, computing the higher-order moments (in the Gaussian case there are only two non-zero moments, the mean and the variance) and using an Edgeworth series might be an interesting prospect for computing RSD in the streaming model formalism. However there are some limitations: how should we define the angles in order to compute the pairwise-velocity PDF? Also, to my knowledge the distant-observer approximation have not be relaxed yet in the literature. Here we have shown the formalism when only peculiar velocities were taken into account. In Croft (2013), the author uses the same formalism to investigate the effect of gravitational potential. The problem of streaming model is that the PDF of the mapping from real to redshift space is usually only phenomenological and estimated numerically, commonly fitted by an exponential or a Gaussian. Predicting analytically and computing numerically the moments to infer the PDF from could be an interesting prospect if the PDF is not strongly non-Gaussian [START_REF] Bianchi | Improving the modelling of redshift-space distortions -I. A bivariate Gaussian description for the galaxy pairwise velocity distributions[END_REF][START_REF] Bianchi | Improving the modelling of redshift-space distortions-II. A pairwise velocity model covering large and small scales[END_REF].

To sum up, there are interesting tools to investigate the effects of RSD at quasilinear and non-linear scales. However, often the treatment is done by only taking into account peculiar velocities and with the distant-observer approximation. A more general treatment of RSD is still missing either in PT or using streaming models. We note that recently, [START_REF] Castorina | The Zeldovich approximation and wide-angle redshiftspace distortions[END_REF] have calculated RSD with wide-angles using the Zel'dovich approximation. I reckon that in a near future more people will work out new formulas taking into account these effects as well as relativistic effects which, for now, are only done in linear theory. This will be necessary to understand the data future surveys will bring.

In the next Chapter we will address the full complexity of the problem by using N-body simulations and ray-tracing.

Numerical simulations of cosmic structure formation

Simulations play an important role in contemporary research. A given physical phenomenon is first modeled mathematically, its equations are discretized allowing to implement numerical algorithms to compute the evolution of a given physical system. In particular, it allows to investigate non-linear evolution of structure formation and to compare the results with theory or observations. Simulations are now a mandatory element included in the analysis pipeline for future surveys. It stands in between theory and observations, allowing at the same time to test theories beyond analytical developments and to prepare and interpret observations. Simulations allow us, given a theory, to study matter distribution in the universe from a point of view external to the system. This allows us to interpret the outputs depending on the initial conditions set at the beginning of the simulation. Simulations are interesting when studying non-linear problems: a fairly known one is the Newtonian 3-body problem which does not have an analytical solution (except for particular configurations). Instead, numerically computing the 3-body problem is straightforward. To study the evolution of structures we consider numerous particles and compute the evolution for each of them. This is why numerical simulations are also referred as N-body simulations. These simulations are usually performed in a cubic box with periodic boundary conditions. Indeed, at large scales the universe is assumed to be homogeneous and therefore self-similar. Periodic boundary conditions in numerical simulations mean that the universe is paved by replications of the simulations box, which allow to compute forces from outside of the initial box as shown in Fig. 3.1. This corresponds to a torus topology. In simulations we control everything from parameters to evolution equations, allowing 3.1. Numerical simulations of cosmic structure formation 59 to compare the results with analytical predictions, to estimate the noise for a given observable, and to study non-linear processes. If numerical simulations are widely used in cosmology, it is because it allows us to study the non-linear process of structure formation which is very sensitive to the nature of the dark sector of the universe. Also with simulations we can probe scales that are smaller than analytical and semi-analytical methods, as well as complex processes like structure formation and evolution. But mostly, it allows to determine the properties of observables depending on the theory, therefore testing theoretical assumptions and their effect on observables.

To perform simulations, we need to compute the evolution of particles (for example their positions and velocities) at some locations inside the simulation. The following (Newtonian) reasoning is based on [START_REF] Hockney | Computer simulation using particles[END_REF]: The force and potential at the position of the i th particle depends on their interaction with all the other particles and some external forces and potential. Coupled with the geodesic equations we have the following system

F i = ∑ i =j F ij + F ext i , (3.1)
a i = F i m i (3.2)
where F i is the total force applied on the i th particle, a i the acceleration for the same particle with m i its mass and F ij the force of interaction between the i th and j th particle. The external quantities as F ext i can be set by boundary conditions in simulations. A similar equation to Eq. (3.1) can be written for the potential. Considering the force and potential as fields, we can compute the field equation which depends on the system we are interested in. For Newtonian simulation we would use the Poisson equation while in GR we would use the Einstein field equation. These relate the potential to the density field and therefore the fluid distribution. For simple brute-force simulations, we perform a double sum on all the particles and compute for each particle the force applied by all the other particles, and infer from this the acceleration, velocity and finally the position of the particle at the next time step. However this particle-particle (PP) scheme is very time consuming since it scales as O N 2 with N the number of particles. For DM particles, we can roughly estimate N DM in our observable universe assuming constrains give a mass between 1 keV and 10 -7 M [START_REF] Polisensky | Constraints on the dark matter particle mass from the number of Milky Way satellites[END_REF][START_REF] Brandt | Constraints on MACHO Dark Matter from Compact Stellar Systems in Ultra-faint Dwarf Galaxies[END_REF][START_REF] Carr | Primordial black hole constraints for extended mass functions[END_REF]. Using Ω m ≈ 0.3, this gives approximatively 10 30 N DM 10 85 which is enormous and computing the force would be unfeasible numerically. However, there are many methods and implementations to perform cosmological simulations, first we describe Newtonian simulations which are use the most in cosmology, and then briefly an example of cosmological GR simulation.

Vlasov-Poisson equations

For generalized coordinates (q, p), the Liouville equation (which is the phase-space volume conservation equation) reads

∂ ρ ∂t + N ∑ i=1 ∂ ρ ∂q i qi + ∂ ρ ∂p i ṗi = 0, (3.3)
with ρ(q 1 ...q N , p 1 ...p N , t)dq 1 ...dq N dp 1 ...dp N the density of probability to have the system in the element of volume dq 1 ...dq N dp 1 ...dp N at a given time t. When considering the 6dimensional phase space (x, v), with equation of motion

dx i dt = v i , d(m i v i ) dt = F i , (3.4)
with m i the mass of the i th particle, we finally infer Liouville's conservation equation

∂ ρ ∂t + N ∑ i=1 v i • ∂ ρ ∂x i + N ∑ i=1 F i m i • ∂ ρ ∂v i = 0 . (3.5)
This is the general Newtonian formula for a fluid phase-space volume conservation. However, Eq. (3.5) is not convenient to use because N is very large. To go further we can use the BBGKY hierarchy, writing the Liouville equation of an N-dimensional distribution function in terms of hierarchy of lower rank equations. The one-particle distribution for a set of N particles can be written as

F 1 (x, v, t) = N ∑ i=1 δ D (x -x i )δ D (v -v i ), (3.6)
with δ D the Dirac delta function. Similarly the two-particle distribution is defined as

F 2 (x, v, x , v , t) = N ∑ ij δ D (x -x i )δ D (v -v i )δ D (x -x j )δ D (v -v j ). (3.7)
The hierarchy is set by performing ensemble averages over F N . This leads to

f 1 (x, v, t) = F 1 (x, v, t) = N ρ(x, x 2 ...x N , v, v 2 ...v N , t)dx 2 ...dx N dv 2 dv N , (3.8) f 2 (x, v, x , v , t) = F 2 (x, v, x , v , t) (3.9) = N(N -1) ρ(x, x , x 3 ...x N , v, v , v 3 ...v N , t)dx 3 ...dx N dv 3 dv N , (3.10)
here f 1 (x, v, t) is the probability to find a particle at (x, v) in a volume dxdv. Similarly, f 2 (x, v, x , v , t) is the joint probability to find a particle at (x, v) in a volume dxdv and another at (x , v ) in a volume dx dv .

The Liouville conservation equation for f 1 is

∂ f 1 ∂t + v 1 • ∂ f 1 ∂x 1 + F ext 1 m 1 • ∂ f 1 ∂v 1 + F 12 m 1 • ∂ f 2 ∂v 1 dx 2 dv 2 = 0 (3.11)
Here we see that the equation on f 1 gives an f 2 term. This goes on as a chain where the equation for f s gives a term in f s+1 . The chain can be broken by a closure which assumes as an approximation that f s can be written in terms of f s-1 only and possibly additional correlation terms. At lowest order, f 2 is written in terms of f 1 as

f 2 (x, v, x , v , t) = f 1 (x, v, t) f 1 (x , v , t) + g(x, v, x , v , t) (3.12)
3.1. Numerical simulations of cosmic structure formation 61 with g(x, v, x , v , t) the correlation term. Inserting Eq. (3.12) in Eq. (3.11) gives the Boltzmann equation

d f dt = ∂ f ∂t + v • ∂ f ∂x + F ext m + F m f (x , v , t)dx dv • ∂ f ∂v = - F m • ∂ ∂v gdx dv , (3.13)
where we dropped the subscript as f refers only to the one-particle distribution. The righthand term can be rewritten as (∂ f /∂t) c so that we have

d f dt = ∂ f ∂t c ≈ f -f 0 τ rel , (3.14)
with the last term being the relaxation time approximation and f 0 the equilibrium state for the distribution (i.e. gaussian for a collisional plasma). The relaxation time τ rel tells us how long it takes for a distribution to reach its equilibrium. The point is that for DM τ rel is very large while for plasmas (accounting for baryons) it is not w.r.t the dynamical time of the system. This means that for DM particles we can safely neglect collisions. Dropping the collision term gives the following closure relation

f 2 (x, v, x , v , t) = f 1 (x, v, t) f 1 (x , v , t), (3.15)
where the joint probability is reduced to a product of one-particle distributions, therefore assuming independence between the two particles. This describes an uncorrelated (or collisionless) system. Using the collisionless approximation, Eq. (3.15) yields

∂ f ∂t + v • ∂ f ∂x + F ext m + F m f (x , v , t)dx dv • ∂ f ∂v = 0 , (3.16)
here we have d f /dt = 0. Eq. (3.16) is known as the Vlasov equation. As an approximation, it is valid if the effect (potential) of one particle does not affect the other one or is significantly smaller than its kinetic energy. Accounting for the universe expansion gives [START_REF] Peebles | The large-scale structure of the universe[END_REF])

∂ f ∂t + p ma 2 • ∂ f ∂x -m ∂φ ∂x • ∂ f ∂p = 0 (3.17)
with p = ma 2 dx dt with x the comoving distance and φ the gravitational potential. In cosmological simulations, we use the Vlasov equation when we account for CDM. However computing the 6D Vlasov equation is complicated and a naive approach would be to compute its moments integrating on velocity space as

m f dv = ρ, (3.18) m f vdv = ρ v , (3.19) m f (v -v ) ⊗ (v -v )dv = P, (3.20)
with P the pressure tensor. The zeroth and first moments of the Boltzmann equations give respectively the continuity equation (or 3D spatial conservation equation) and the Euler equation. In that case the system is reduced to a 3D problem which is easier to perform. While this approach is efficient for collisional plasma, in practice we do not use these equations for DM particles since the velocity distribution is non gaussian (higher moments cannot Chapter 3. Methods be neglected as they develop due to free-streaming, meaning we cannot break the hierarchy of moments). We note that for baryons we should also account for energy conservation and the equation of state. On the numerical side, Yoshikawa, Yoshida, and Umemura (2013) computed the 6D Vlasov equation (therefore the collisionless limit) in phase space, it has advantages over usual simulations since the matter distribution in velocity space is continuous and less noisy. Here the authors solved on a 6D regular grid the Vlasov equations as a set of 6 one-dimensional partial-differential equations and the Poisson equation. While this is a promising method, it is difficult today to achieve high spatial resolution [START_REF] Hahn | A new approach to simulating collisionless dark matter fluids[END_REF][START_REF] Hahn | An adaptively refined phase-space element method for cosmological simulations and collisionless dynamics[END_REF][START_REF] Sousbie | ColDICE: A parallel Vlasov-Poisson solver using moving adaptive simplicial tessellation[END_REF]. This is why, for DM we use N-body simulations where we sample the phase space. The particles we consider in Nbody simulations can be thought as packages of DM particles, their number is N part N DM which makes computation easier. From now on, when we talk about DM particles we mean the gravitationally interacting, collisionless particles used to discretize the simulation.

In this thesis we used RAMSES (Teyssier, 2002). It is a Particle-Mesh (PM, [START_REF] Hockney | Computer simulation using particles[END_REF] and Adaptive Mesh Refinement (AMR) code:

• Particle-Mesh: Here, as in any N-body code we consider particles in a given volume but also a mesh as a regular grid. These grid elements (also called cells) are used to compute the evolution of particles. Said differently, unlike particle-particle codes where we compute the force at distance between particles, in PM codes the force is described as an external field (thus avoiding 2-body collisions). However due to the finite resolution of the grid, a PM method is only accurate at scales larger than the grid size.

• Adaptive Mesh Refinement: For a simple PM code there is only a regular mesh covering the simulation volume. In RAMSES however, for high-density regions the mesh is locally refined in order to increase the accuracy of the computation at these locations. The refinement of the mesh is local, and allows for refinement until a given level specified as input. It allow for a better resolution of potential and force field with a more frequent update of more refined cells.

We note that using cells instead of particles is closer to the fluid approach used in numerical simulations for plasma physics. RAMSES is also designed to incorporate gas and complex baryonic physics, however computing the equations for baryons is very time-consuming and would give a very poor spatial resolution for LSS. Usually hydrodynamical simulations (with baryons) are done to investigate scales smaller than a few Mpc. In this thesis we were interested in subtle effects in the non-linear and linear regime of LSS formation and distribution, hence computing baryonic physics was not suitable. We therefore performed DM only simulations, consisting only in collisionless CDM particles, allowing for large simulation box size and high spatial resolution. However we plan to investigate these baryonic effects in the future.

We will see all the steps needed to perform a N-body simulation, here specifically for RAMSES: starting from initial conditions to the solver used to displace the particles and then to the outputs. About cosmological models, in our codes we read cosmological tables as inputs for background evolutions, therefore varying the cosmology of a simulation is easily done.

Initial conditions generator

To start the simulation, we need an initial snapshot. A snapshot refers to the simulation box at a given time step, containing all the particles and cells. Then two question arises:

1. What is the initial distribution of particles in the box ? 2. At what time (or redshift) should we start the simulation ?

We assume gaussian Initial Conditions (IC, as it has been confirmed by CMB observations) where the density field is fully determined by the power spectrum P(k). We generate a linear power spectrum using a Boltzmann solver, for example CAMB [START_REF] Lewis | Efficient Computation of Cosmic Microwave Background Anisotropies in Closed Friedmann-Robertson-Walker Models[END_REF] or CLASS [START_REF] Lesgourgues | The Cosmic Linear Anisotropy Solving System (CLASS) I: Overview[END_REF]. We set a periodic, homogeneous and isotropic box in the matter density field where each particle is at the center of one cell on the regular grid at coarse (or least refined) level. The power spectrum will be used to displace the particles from an homogeneous distribution to the initial distribution of particles in the snapshot. The density contrast can be expanded in waves in Fourier space as

δ(x) = ∑ δ(k)e -ik•x . (3.21)
The initial density field has a gaussian distribution in Fourier space. It is determined by its first two moments

|δ(k)| = 0, (3.22) |δ(k)| 2 = P(k), (3.23)
with |k| = k. In practice, to obtain the initial distribution we convolve a white noise by the inverse Fourier transform TF -1 ( P(k)). From this initial density distribution, a simple scheme would be to use the Zel'dovich approximation (ZA, Zel'dovich 1970) to displace the particles

x(q, τ) = q + D + (τ)d(q) , (3.24) with x the new particle position, q the initial one, D + the growth factor and d the displacement field. The velocity field is then ẋ = Ḋ+ (τ)d.

(3.25)

From linear theory we can infer D + (τ)∇d = -∇Φ with Φ = φ/(4πGa 2 ρ) and φ the gravitational potential. Using ∆Φ = δ we can finally write

d = -∇Φ 0 , (3.26) ∆Φ 0 = δ 0 , (3.27)
with the subscript "0" referring to the initial distribution. The last relation yields in Fourier space Φ 0 = δ 0 /k 2 . Noting that we used the ZA, we must have a box size which has its largest mode k min = 2π/L in the linear regime, with L the length of the box along one direction. The initial redshift is chosen so that the variance of the initial density field is significantly smaller than unity at the coarse grid scale. The initial redshift must be chosen in order to avoid shell crossing (multi-stream regions) but also the initial displacement must be significant to avoid numerical noise. We neglect the fluctuations of the radiation density in the Vlasov equation, therefore we cannot start in a radiation-dominated epoch. The simulation cannot start too early also because of numerical errors which, accumulated, would be nonnegligible compared with the faint density fluctuations. In this thesis, IC where computed using MPGRAFIC (Prunet et al., 2008), a parallel version of GRAFIC [START_REF] Bertschinger | COSMICS: Cosmological Initial Conditions and Microwave Anisotropy Codes[END_REF]. The displacement field is computed up to second order using second-order Lagrangian Perturbation Theory (2LPT). As pointed out by [START_REF] Scoccimarro | Transients from initial conditions: a perturbative analysis[END_REF], the ZA works fine for the linear growing mode for density and velocity fields, however it fails to reproduce the non-linear behavior. Therefore using the ZA would take time to establish the expected statistical properties for density and velocity fields. To avoid these transients, a possibility is to use an more accurate initial condition displacement field as the 2LPT. Furthermore, in [START_REF] Jenkins | Second-order Lagrangian perturbation theory initial conditions for resimulations[END_REF], the author showed that considering a spherical collapse, the ZA collapsed later than the exact solution while the agreement with 2LPT is much better. Finally, we use 2LPT which allow us to start simulations at z ≈ 50 whereas generally, when using the ZA the initial redshift is set to z ≈ 100 to avoid transients.

Dynamical solver

Once the initial particle distribution and velocity are set, we can compute the evolution of the simulation box. The system of equations is

dx p dt = v p , dv dt = -∇φ, ∆φ = 4πGρ, (3.28)
with the subscript p denoting Lagrangian quantities for a given particle. For cosmology however, the simulation has to account for the expanding universe. It is done considering the homogeneous and isotropic FLRW background. A popular choice of cosmological variables is comoving distance and conformal time. With these variables the perturbed FLRW metric takes the form of a perturbed minkowski metric multiplied by the scale factor. It is convenient when we have ds 2 = 0 since the scale factor can be removed. However, it is argued in [START_REF] Martel | A convenient set of comoving cosmological variables and their application[END_REF] that for the fluid equations it is better to use a superconformal time: the positions are computed as comoving coordinates x = x/(aL) with L the box length and the time as d t = H 0 dt/a 2 . The continuity and Euler equations then take the same form as the non-cosmological ones. With this set of coordinates we only have to account for the scale factor in the Poisson equation. These are the coordinates used in RAM-SES. Since we have a PM-AMR code, we need to define the notion of octree to describe the 3D mesh. An octree refers to a data structure where a region (or cell) is subdivided into eight more refined cells. The level of subdivision can change depending on the resolution needed: level 1 would refer to one subdivision of the cubic box into eight smaller boxes.

Level 2 would mean that these sub-boxes are also divided in eight boxes each and so on.

The level of subdivision of the initial grid is also called coarse level. In principle, for a given coarse level coarse , the number of cells in the simulation box is 2 3 coarse and is in principle equal to the number of particles in the simulations. Lagrangian quantities will be computed at particle position while Eulerian quantities are computed at cell positions.

As discussed in Teyssier (2002), there are usually 6 steps to compute the evolution in PM codes:

1. From the particle distribution, we interpolate the density at the center of each cell.

The interpolation was initially done using the Cloud-In-Cell (CIC) interpolation scheme which is equivalent to a trilinear interpolation. In our case we go to the next order using a Triangular Shape Cloud (TSC) interpolation (Li et al., 2012) so as to make the density field more isotropic.

2. Once the density is computed, we can infer the potential using the Poisson equation.

There are different methods to compute the potential. In RAMSES, the potential is computed using a 7-point finite difference (for discretized laplacian). Along the xdirection this gives the equations φ i+1 -

2φ i + φ i-1 = ρ i ∆ 2
x with i the index of a cell along the x-direction. This yields a linear system ∆ ij φ j = ρ i . The potential is computed using a multigrid method [START_REF] Guillet | A simple multigrid scheme for solving the Poisson equation with arbitrary domain boundaries[END_REF] which scales as O(N). Using an iterative algorithm as the Jacobi method (or in our case, the Gauss-Seidel method), we can determine x up to a given accuracy. This method needs a good first guess to be effective: this is given initially on the coarse grid and then by successive estimations of the potential at more refined levels using coarser levels in order to converge faster for long-range modes. The first guess for the potential is given by an interpolation from the coarser level onto refined cell locations. When updating iteratively the value of the potential, an over-relaxation method is used. For refined levels the mesh is irregular and Dirichlet boundary conditions are used.

3. Similarly, we can compute the gradient of the potential using a 2-point finite difference along one direction as -(φ i+1φ i-1 ) = F i ∆ x . In practice we go to higher order and use a 5-point finite difference.

4.

From the gradient of the potential we can infer the acceleration which can be inverseinterpolated to particle position.

5. The acceleration computed previously is used to compute the new particle velocity.

6. From the velocity we can determine the new particle position

For the last two steps RAMSES uses a symplectic integrator to preserve the volume of the system in phase space. For an AMR code, the procedure is computed at each mesh level, with higher frequency for more refined levels. Since this is computed in an iso-time box, there must be a synchronization time step for all levels. The synchronization is given by the time step at the least refined (coarse) level. This time step is referred to as the coarse time step. It is interesting to note that DM particles are not point-like objects, but rather a cloud due to interpolation and inverse interpolation effects on its evolution. There can therefore be no collisions even if the center of two DM clouds crosses each other. We note that for PP algorithms this would lead to brutal changes in the trajectory of objects and a smoothing scale is often added to the 1/r 2 interaction to prevent from this behaviour.

The simulation has two types of output: snapshots and light-cones. RAMSES usually generate binary files which can be complicated to use. We thus post-process the outputs to produce HDF5 files since this format is much more convenient to use (and share).

Outputs Snapshots

Snapshots are the simulation box saved at different times. It contains the particles (position and velocity) as well as cells (position, acceleration, potential, density) and a given background redshift and is therefore the closest to real-space quantities. Usually snapshots are not written at each coarse time step due to disk-space issues. A snapshot from a 4096 3 particles simulation (and therefore the same number of coarse cells) with a box length of 3 Gpc weights 20 -25 Terabytes. Moreover, writing many snapshot implies heavy input/output operations which slows down the simulation. In practice, running a "light" simulation with a low number of particles is effortless. However running a high-resolution simulation can lead to some complications. For a large number of particles the simulation usually needs more than a few days to run on 10, 000 -20, 000 CPUs. However the run is limited to 24h on supercomputers. In that case the simulation runs until a given snapshot, then launched again from the snapshot previously saved as keeping the data for all the snapshots during the simulation is not possible for huge simulations. Therefore between two runs we can analyze the snapshots produced during the previous run, and once the analysis is done we can erase useless snapshots. To give an order of idea, a simulation produces approximatively 50 snapshots (roughly 1 Peta-byte).

Light-cones

From N-body simulations we can also compute light-cones. Meaning that for an observer at a given position, we store the distribution of particles on its past light-cone, with particles further away from the observer are at a higher redshift (as seen in Fig. 3.3). Light-cones are interesting to link simulations to observations since, by definition, we only observe objects on our past light-cone (if we observe these objects via photons or gravitational waves). Light-cones allow for more realistic mock catalogs when comparing with data, but also allows for ray-tracing, meaning tracing the path of photons inside the simulation. There is no unique method to construct light-cones from simulations, we will see two popular approaches. This means that for a cell at a position r we have a redshift z which is inferred given a background cosmology at |r|. From two snapshots at z 1 and z 2 so that z 1 < z < z 2 , we can interpolate the values of the cells at redshift z. This method is more accurate than the previous one but still has the same issues.

2. A second approach was developed to address the time-resolution problem, [START_REF] Fosalba | The onion universe: all sky lightcone simulations in spherical shells[END_REF] implemented the so-called onion-shell method. This was used in Fosalba et al. (2015a), [START_REF] Fosalba | The MICE grand challenge lightcone simulation -I. Dark matter clustering[END_REF]Teyssier et al. (2009) as well as in our simulations.

The idea is to construct the light-cone on the fly during the simulation with the highest accuracy possible. This means that for each coarse time step we output a thin shell containing particles and cells at a given redshift. The final light-cone is the concatenation of these shells. By construction, this method gives the most accurate time-resolution possible (coarse time step) and no replicas (for full-sky cones). In our simulations the shells sufficiently overlap to ensure that every cell is present at least twice (except for refined cells at the moment of their creation) to save the time-derivative of the potential. In other words we have 2 cones slightly shifted in time: one just before the null light-cone and one just after. This will be discussed in the ray-tracing Section.

Last, there are two kinds of light-cones: fullsky or narrow. A fullsky light-cone gives the distribution of particles in every direction around the observer, up to a redshift related to half the box length. On the other hand, a narrow light-cone only accounts for a smaller portion of the sky. Narrow light-cones are slightly tilted compared to the axis of the simulation to avoid crossing the same structures multiple time at different redshifts. Light cones have a conic geometry with a vertex at the observer location. It goes to a higher redshift than fullsky light-cones but necessarily accounts for replicas. The volume of a narrow cone is the same as a fullsky one, meaning that the smaller the aperture, the higher we can reach in redshift.

To give an order of idea, a fullsky cone has approximatively 300 shells (and more for narrow cones) which allows for a better time resolution than using only snapshots to build the light-cone.

Post-processing Power spectrum estimation

As previously explained, N-body simulations are mandatory to have access to the non-linear regime of structure formation. To do so we compute the density field using a parallel CIC algorithm on a regular grid. From this we compute the power spectrum using POWERGRID (Prunet et al., 2008). In that case we are interested in the shape of the power spectrum at k > 0.3h Mpc -1 , at scales where analytical predictions fail to predict the power spectrum with high accuracy. For a given snapshot in a simulation, the power spectrum is shown in Fig. 3.4. There are several effects which alters the shape of the power spectrum. There is a large dispersion at low k due to cosmic/sample variance (a simulation is only one realization with initial particle distribution randomly set) and the low number of modes we can compute. To resolve well the large scales it is mandatory to perform a huge-size box simulation, as in the DEUS-FUR simulation [START_REF] Alimi | DEUS Full Observable {\Lambda}CDM Universe Simulation: the numerical challenge[END_REF] with a box size of 21 h -1 Gpc. Only with this kind of box (or multiple realizations) it is possible to have a good accuracy at BAO scale (Rasera et al., 2014). At large k there are two effects which induces errors in the estimation of the power spectrum, both due to the discretization and finiteness of the data. First a shot noise which is an additional contribution to the power spectrum and is equal to (L/N) 3 with L the box length and N the number of coarse cells along one direction. Secondly, we see an artifact at k ≈ 10 hMpc -1 happening and the power spectrum stops at the Nyquist frequency of the grid used to compute the power spectrum, which, in terms of wavenumber is k Nyq = πN/L. Beyond Nyquist frequency we cannot extract information. Close but below k Nyquist there is aliasing (i.e. pollution from higher frequencies). In practice we use the matter power spectrum from the simulation up to k Nyq /2 where we expect the aliasing to be small [START_REF] Colombi | Accurate estimators of power spectra in N-body simulations[END_REF] . Since we compute the power spectrum on a grid with twice the resolution of the coarse grid, this means that in practice we use the matter power spectrum until the coarse k Nyq . Also, the overall power spectrum estimation depends on the interpolation used for the density: using a CIC or TSC will yield different results but this effect can be corrected since we know the expected effect of the interpolation scheme.

Halo detection

Due to gravitational instabilities, DM particles tend to form gravitationally bound objects: halos. These are virialized objects in which baryons falls to form galaxies. Numerically it is interesting to detect halos in order to study their properties, for example the mass function [START_REF] Courtin | Imprints of dark energy on cosmic structure formation -II. Nonuniversality of the halo mass function[END_REF] or profile (Balmès et al., 2014). Halos are also interesting since in DM only simulations we do not have galaxies, and therefore instead of probing the matter density field it is interesting to probe the distribution of halos in which galaxies would form.

A popular algorithm to detect halos is the Friend-Of-Friend (FoF) algorithm. To detect a halo with this method we first choose a linking length b. The linking length is a fraction of the mean inter-particle distance, usually set to b = 0.2. Starting from a particle, we link every particle at a distance inferior to the linking length. This operation is repeated for every particle linked. If the number of particles linked together is higher than a given number (usually 100), we consider it to be a halo. In our simulation the center of the halo is defined at the center of mass, its velocity is the mean velocity of particles. To increase numerical performances, we use the Parallel Friend-of-Friend (PFOF, Roy, Bouillot, and Rasera 2014) algorithm which is used to detect halos on snapshots and on light-cones.

The code writes halo particles and halo properties in the HDF5 format.

Other N-body codes

There are many numerical implementations for PM-AMR N-body codes, for example AP 3 M [START_REF] Couchman | Mesh-refined P3M -A fast adaptive N-body algorithm[END_REF], AMIGA [START_REF] Knebe | Multi-level adaptive particle mesh (MLAPM): a c code for cosmological simulations[END_REF], ENZO (O'Shea et al., 2004;[START_REF] Bryan | ENZO: An Adaptive Mesh Refinement Code for Astrophysics[END_REF], ART [START_REF] Kravtsov | Adaptive Refinement Tree: A New High-Resolution N-Body Code for Cosmological Simulations[END_REF], EMMA [START_REF] Aubert | EMMA: an adaptive mesh refinement cosmological simulation code with radiative transfer[END_REF]. But there are also other numerical implementations to perform N-body codes.

A popular method to perform simulations is the tree algorithm (we therefore talk about tree codes), see also [START_REF] Barnes | A hierarchical O(N log N) force-calculation algorithm[END_REF]: it consist in refining the simulation grid until each particle is contained in a single cell. Then we can group particles together in a given volume, and compute the interaction of a particle with the center of mass (or artificial particle) of a given volume containing multiple particles (if the volume is seen under a sufficiently Chapter 3. Methods small angle). The interesting feature of this method is that it scales as O(N log N). Alternatively, one can use a fast multipole algorithm [START_REF] Greengard | A fast algorithm for particle simulations[END_REF] which scales as O(N). The idea is the same as the previous tree algorithm but treating long-range interaction (or well separated) by performing a field multipole expansion (also known as fast multipole method, FMM) as an approximation. Typically for potentials which scales as 1/r, a multipole expansion yields

1 |x 1 -x 2 | = 1 x 1 1 -µz + z 2 = 1 x 1 ∞ ∑ =0 z L (µ), (3.29)
for two masses at locations x 1 and x 2 with typically x 1 as the center of mass. z is defined as z = x 2 /x 1 (with x 1 > x 2 ) and L is the Legendre polynomial of order . The tree algorithm is similar to a FMM method only using the monopole, allowing particle-particle and particle-cell correlations while the FMM also accounts for cell-cell correlations.

As an illustration, we briefly mention two codes representative of tree-PM and tree algorithm widely used by the community.: GADGET-2 [START_REF] Springel | The cosmological simulation code GADGET-2[END_REF] and PKDGRAV3 [START_REF] Potter | PKDGRAV3: beyond trillion particle cosmological simulations for the next era of galaxy surveys[END_REF].

1. GADGET-2: This is a Tree-PM code. These hybrid codes make a differentiation between short and long-range interactions. Similarly to P 3 M (or Particle-Particle/Particle-Mesh) codes where short ranges interactions are computed using a PP scheme and long range with a PM scheme, Tree-PM codes uses a tree method when dealing with short range interactions and the PM method for long-range interactions. The (oc)tree is similar to [START_REF] Barnes | A hierarchical O(N log N) force-calculation algorithm[END_REF] and the force is accounted using a hierarchical multipole expansion (or tree algorithm). At large separation the potential is computed with a discrete Fourier transform on the mesh consisting in a regular grid. The potential is the sum of short and long-range interactions. Note that this code uses an hamiltonian integrator which preserve the volume in phase space and give stable long-term behavior.

2. PKDGRAV3: This is a tree-code, using the fast multipole method (FMM). It does not contain a mesh and this approach does not depend on the degree of clustering, which is interesting since it can slow down the force calculations at low redshift. Contrarily to a standard tree algorithm, FMM allows for cell-cell interactions (cells as volume containing multiple particles). PKDGRAV3 have been used to compute simulations with trillions of particles thanks to memory efficiency and GPU acceleration, taking advantage or the best supercomputers today which are hybrid CPU/GPU. Note that other N-Body codes are also being modified to use GPUs.

Beyond the Newtonian limit

So far we have used Newtonian simulations written in supercomoving coordinates to account for the background expansion. While this is well motivated in a ΛCDM cosmology dominated by non-relativistic elements, it may be interesting to construct a more general framework which account for relativistic species and corrections at the horizon scale. The cosmological framework is GR and using fully GR simulations is therefore interesting to be more accurate and test the limits of Newtonian simulations. First, Chisari and Zaldarriaga (2011) were interested in how to interpret Newtonian simulations in GR terms and how to correct the outputs from these simulations top match a full GR treatment. One could assume that Newtonian simulations are performed in Newtonian gauge, however we note that this yields a different Poisson equation with important corrections at horizon scale. In Newtonian gauge one should account for proper time perturbation and spatial perturbation of the metric. If the e.o.m is well computed, the potential, density and the initial particle displacement in the simulation should be corrected. It is argued that actually most of these correction terms cancel and to interpret the output from Newtonian simulations in Newtonian gauge we only need to displace the particles w.r.t an initial displacement which depends on the initial particle distribution (meaning a time-independent correction) while the observed density contrast is equivalent to its expression in comoving gauge. More recently, several works in this direction were made to connect Newtonian simulations to GR with, for example, the construction of a convenient gauge to interpret the data from N-body simulations, the Nbody gauge (Fidler et al., 2016).

There exists GR simulation codes but usually they are restricted to small-scale/highcompacity systems. However, in the cosmological context was recently developed the GR N-body code GEVOLUTION (Adamek et al., 2016a). This is a purely PM code, computing the geodesic equations for a perturbed FLRW metric in Poisson gauge

ds 2 = a 2 (τ) -(1 + 2Ψ)dτ 2 -2B i dx i dτ + (1 -2Φ)δ ij dx i dx j + h ij dx i dx j , (3.30)
where, in a SVT decomposition all the scalar, vector and tensor perturbations are taken into account. Assuming weak metric perturbations (but not necessarily weak perturbations of the stress-energy tensor), the code uses the Einstein equations in the weak-field regime and the different species evolve along geodesics. The interesting feature is that relativistic species can be added and will be treated as collisionless particles. In GR there is no "absolute" time as in Newtonian physics, in a computational aspect this can be tricky since the very nature of simulations is discrete and we can still compute a coordinate time. Actually, the evolution equations are recast in terms of coordinate time.

In terms of outputs, GEVOLUTION produces snapshots at a given constant coordinate time hypersurface, storing all the particles and cells. For the light-cone the method (which is currently in testing phase) is slightly different from ours: here all the particles are stored when they cross the background (homogeneous) past light cone with the lookback time corresponding to the comoving distance from the particle. The positions of the particles can be corrected a posteriori using ray-tracing methods. The cells are saved using an onion-shell method.

In Adamek et al. (2016b), the authors compared the results for the matter power spectrum between GEVOLUTION using the Newtonian limit, GADGET-2 and RAMSES with no AMR. Overall the results are similar within one percent below the Nyquist frequency. Also we might expect that due to a purely PM algorithm, GEVOLUTION might not be accurate at small scales. On the other hand, it allows to account for very large scale effects as well as testing vector, tensor perturbations and much more. These effects are small in ΛCDM but might play an important role in alternative cosmologies or with relativistic particles.

Ray-tracing of LSS

N-body simulations give us realizations of real-space clustering for a given size box. But we do not observe the real-space universe and all our information comes from messengers. Here we are interested in light propagation, which can be simulated using ray-tracing, meaning following photons inside a given simulation. First we review the usual ray-tracing methods, second we will introduce MAGRATHEA [START_REF] Reverdy | Propagation de la lumière dans un Univers structuré et nouvelles approches numériques en cosmologie[END_REF], the ray-tracing library used for the present work. Third we present the modifications to this library in order to produce catalogs and maps. These modifications are important contributions from the author of the present manuscript.

State of the art A simple integration scheme

There are many possibilities to compute photon's paths, but let's first see the simplest integrator as possible. We start from the lensing equation in conformal Newtonian gauge

dn dη = -2∇ ⊥ φ = 2a ⊥ , (3.31)
where the acceleration a = -∇φ. In general, given the equation of motion we can integrate the path of a given object with a system of two differential equations on its position and velocity. For the position, we can compute it using

x i+1 = x i + v i ∆t, (3.32)
where the position of the particle is x, its velocity v and the time difference between two integration steps ∆t. The superscript denotes the step at which the quantities are computed. Eq.(3.32) give the first differential equation used to compute the path of a particle, it does not change depending on the nature of the particle. The change will occur in the second differential equation on the velocity condition. Considering two cases : first a non-relativistic particle and then a photon, we compute the velocity as

v i+1 = v i + a i ∆t, non-relativistic species (3.33) v i+1 = v i + 2a i ⊥ ∆t, photons (3.34)
Eq.(3.32) and (3.33) give one of the most naive integration scheme when considering the movement of objects (this example is often as an introductory exercise to study the trajectory of planets). For a photon however, we have Eq.(3.34) which depends on the perpendicular component of the acceleration at the photon location at a given step. We also note that unlike the non-relativistic case, the velocity for the photon must be normalized using ds 2 = 0. This integrator is very simple and is straightforward to implement, however it is known that it is not very accurate on the long term. The integration scheme presented is the Euler integrator and is only first order. For the present work we used the Runge-Kutta integrator which relies on many estimations (or sub-steps) before computing the step i + 1. This integrator can be computed at different orders, the most common implementation being the 4th order integrator (which we chose), also known as RK4. It could be interesting for the future to implement a 4th-order symplectic integrator to ensure that the phase-space volume is conserved. However since the acceleration varies slowly, the difference with RK4 should be small.

Multiple lens algorithm

The most common ray-tracing technique the multiple-lens approximation [START_REF] Schneider | Gravitational Lenses[END_REF][START_REF] Hilbert | Ray-tracing through the Millennium Simulation: Born corrections and lens-lens coupling in cosmic shear and galaxy-galaxy lensing[END_REF]. As its name indicates, we consider several lenses where the lens equation is computed. This means that we have to know the projected ∇φ at the photon position on the lenses. This can be done by inverse interpolating from a grid in a PM code, or by interpolating from the particle positions in tree codes. Usually, photons are assumed to propagate in straight lines, the potential is evaluated at the photon position on his unperturbed path. Then the final deflection is computed by summing the previous contributions from all the lenses. This is the Born approximation. One improvement over this approximation is to use the Post-Born approximation, in that case photons propagate in straight lines between two lenses and are deflected at each lens. The potential is evaluated along this perturbed path. Using multiple lenses is interesting since the overall computation is not heavy because here we solve the lensing equation β = θα. However, even if this method yields good results, with increasing quality of data and simulations we might need more accuracy. First, this is a purely geometrical approach, considering the small-angle approximation. Here we only consider a small patch of the sky where we do not account for the sky curvature. Second, the lenses are considered flat, which is in line with the previous point : effects on the z-axis (along the l.o.s) are neglected. Also this technique focuses on one type of analysis, meaning photon deviation angle and lensing quantities. Lenses are usually manually set equidistant, which may not be the most efficient method since photons will be more deviated in high density regions. The lack of generality of this approach with numerical simulations may be a problem when needing more flexibility.

Other methods

Very recently, many interesting ray-tracing methods were developed in order to go beyond the multiple-lens technique. We will briefly review here some of these ray-tracing codes, their strengths and weaknesses. Barreira et al. (2016) presented the code RAY-RAMSES which computes ray-tracing inside the RAMSES simulation. Note that a generalization of this work should be possible in any PM-AMR simulation. Here the idea is to compute photon trajectories on the fly (during the simulation). Generally, ray-tracing is used as a post-processing tool after the simulation is completed but here it is not the case. If we construct the light-cone from snapshots, then we should save all the snapshots from a given simulation in order to keep a maximum information. If one uses an more advanced method like the onion-shell method, we still need to store the light-cone. For huge-box/high spatial-resolution simulation, storing this amount of data may be complicated, that is why computing ray-tracing during the simulation is a good alternative, plus we do not lose any informations compared to a reconstructed lightcone from snapshots. This method should also be in principle more accurate to compute integrated quantities. Another nice feature is that the ray-tracing method described takes full advantages of the AMR structure of the grid, modifying the integration step size depending on the refinement of the cell containing the photon. However, to propagate photons the code use the lens equation with Born approximation and neglecting lens-lens coupling. Apparently the authors are working in order to remove these approximations. There are many advantages to compute ray-tracing on the fly, however from an observer point of view it may not be the best option since we cannot be sure that the rays will converge onto a given observer at a given event.

It is interesting to note that in the field of compact objects, ray-tracing is also done but in a full GR framework since we are not anymore in the weak-field regime. This approach could also be implemented in cosmological ray-tracing studies in order to go beyond usual approximations. In [START_REF] Giblin | Observable Deviations from Homogeneity in an Inhomogeneous Universe[END_REF] and Giblin et al. (2017), the authors compute photon's trajectory using the geodesic equations and the Sachs equation accounting for infinitesimal beams. In this framework we are interested in the beam's morphology and the Sachs equation gives the evolution of infinitesimal separations from photon inside the beams w.r.t the central ray, depending on the Ricci and Weyl tensors. The discretization from a computational point of view poses the question on the theoretical infinitesimality of separation vectors (4-vectors at a given affine parameter, set to zero at the vertex of the beam) from a ray to the central ray. The question of finite light beams [START_REF] Fleury | Weak gravitational lensing of finite beams[END_REF] is interesting and would need more theoretical work in order to make the connection at least with simulations. Also, this fully general relativistic method cannot be used in simulations with high resolution as for the moment it is performed on a 160 3 grid.

Last, we note the existence of the code LIGER [START_REF] Borzyszkowski | liger: mock relativistic light cones from Newtonian simulations[END_REF], which is not only ray-tracing but takes into account relativistic effects on the apparent position of objects as well as magnitude in order to create mock catalogs. The light-cone is constructed from snapshots and the ray-tracing uses the Born approximation but the overall idea is interesting also when making the connection from Newtonian simulations to a relativistic framework and gauge issues (Chisari and Zaldarriaga, 2011).

MAGRATHEA: a library for ray-tracing

In this Section we present a new ray-tracing library, MAGRATHEA [START_REF] Reverdy | Propagation de la lumière dans un Univers structuré et nouvelles approches numériques en cosmologie[END_REF]. When developing this library, the main motivation was to produce a generic and efficient raytracing code using high-performance computing (HPC) and low-level coding. The results presented in this manuscript were produced using an improved version of MAGRATHEA. This allowed us to create mock catalogs and fullsky maps. The role of this library is therefore central in the present thesis. We will first see how it works (more details can be found in Reverdy 2014) and then we will emphasize the new functionalities developed during the thesis and how it makes the link between simulated quantities and observable quantities.

Geodesic equations

One of the particularities of this code is that it directly computes the geodesic equation (in conformal Newtonian gauge), similarly to Killedar et al. (2012). It uses a RK4 integrator, directly computing

d 2 η dλ 2 = - 2a a dη dλ dη dλ - 2 c 2 dφ dλ dη dλ + 2 ∂φ ∂η dη dλ 2 , (3.35) d 2 x i dλ 2 = - 2a a dη dλ dx i dλ + 2 c 2 dφ dλ dx i dλ -2 ∂φ ∂x i dη dλ 2 , (3.36)
where λ is the affine parameter along the photon path. As an initial condition we impose ds 2 = 0, later this equation is used as a consistency check for the integrator. As shown in [START_REF] Reverdy | Propagation de la lumière dans un Univers structuré et nouvelles approches numériques en cosmologie[END_REF], using 4 integration steps per AMR cell (adaptive step depending on the level of the most refined cell the photon is in, see Fig. 3.6) gives deviations of the computed homogeneous redshift to the exact solution close to rounding errors up to z = 25. This was tested assuming a homogeneous tree (gravitational potential set to zero). Adding the potential changes the deviations from ds 2 = 0 because (a, ρ, φ, ∇φ) all come from RAMSES and these quantities are stored in float-4, meaning a precision of 10 -8 . Therefore, using these quantities in the integration will also yield deviations of the same order.

FIGURE 3.6: Propagation of a photon inside the AMR structure. In red we have the photon trajectory and in blue the locations at which the geodesic equations are solved using an adaptive step.

However these effects are negligible compared to the precision of the N-body simulations.

It is important to note that while this library was applied to RAMSES light-cones, it can be applied to any PM-AMR light-cone with very little modifications.

An efficient ray-tracing library

MAGRATHEA is a C++11 template metaprogramming (TMP), hybrid MPI/std:thread library performing backward ray-tracing as post-processing of N-body simulations. Metaprogramming is a coding method which allows to perform some calculations at compile time with no cost at execution. Coupled with the need to create a generic library, the choice was made to use the C++11 standard which allows for templates, meaning a generalization of the concept of class which also allows for metaprogramming. It is interesting from many points of view:

• importing new programming techniques in numerical cosmology

• performance enhancement

• lower the execution time as some calculations are done by the compiler. This is interesting when dealing with supercomputers where we have a limited cpu time which only takes into account job execution time.

• genericity

The basic idea is to replace a variable or a function by "executing a code" at compile time.

An example of variable replaced by a value at compilation time is the define function in C or C++ which works as1 #DEFINE VAR 5 int a = 1; int b = a + VAR; std::cout << b << std::endl;

Here, VAR is set to 5 at compile time, meaning that when it appears in the definition of b at execution, it was already replaced by its value. No time at execution was used to understand that VAR equals 5. On the second line, we specify that a is an integer with value 1. This is understood at execution. Finally at execution b will be defined as the sum of the two previous variables and gives the result. Thank to the C++11 standard, we can now compute functions at compilation time. A basic example of C++ TMP is the implementation of the factorial function implementation. The factorial of N is defined as

N! = ∏ 1≤i≤N i (3.37)
There are many possibilities to code this function, we will see some example from Reverdy (2014). First we could use an iterative process as unsigned int iterative_factorial(unsigned int n){ unsigned int fact = 1; while ( n > 0) fact *= n--; return fact ; } where unsigned int stands for positive integers. We can also use a recursive process unsigned int recursive_factorial ( unsigned int n ) { if ( n > 0) return n * recursive_factorial (n-1); else return 1; } These two approach computes the function at execution. On the other hand, using templates we can write template < unsigned int N > constexpr unsigned int meta_factorial (){ return N > 0 ? N * meta_factorial <N-(N > 0) >() : 1; }

The constexpr expression specifies that the function can be evaluated at compile time. The return line means that if N > 0, we compute the expression after the question mark and before the two points, otherwise it returns 1. This code is computed at compile time if N is also known at compile time. If in the code we write meta_factorial<4>, the compiler will compute the recursive process in order to have the final value, which is substituted to the original expression in the executable. At execution time the code will directly read the value of the function instead of computing the function. TMP and recursive coding are extensively used in order to perform a maximum of calculations at compile time in order to spend less time at execution, but this comes with a cost. First, using templates means that a single .cpp file is the main function. All the other files are .h files (which contains the declaration and body of the functions), meaning that we always have to compile the whole code every time we make a modification (as opposed to only compiling the modified file as it can be done with classes). Also, one has to be aware that TMP produces heavy executable (in terms of size), which may reduce performances.

Light AMR trees

Having (briefly) presented the TMP idea, we now introduce the core of the library. Even if MAGRATHEA is a library developed to perform high-performance ray-tracing, it is not at first a ray-tracing library. Ray-tracing only comes on top of a more general and complex basis: trees. When performing ray-tracing, there are two central questions :

1. Where is the photon ? 2. What are the values of quantities needed to compute the integration ? This last question raises another one: How to interpolate the values at the photon locations, and how to find the emplacements from which these values will be interpolated ?

In our case, we compute ray-tracing as a post-processing of a N-body simulation performed with RAMSES. This code is PM-AMR and it therefore gives us a natural frame to compute interpolations at any location inside the simulation. This means that for any given position of the photon, we have to find the neighbouring cells. Implementing such an algorithm is not an easy task, especially when it has to be optimized for HPC.

The basis of MAGRATHEA is the construction of a possibly N-dimensional tree (usually referred as octrees in three dimensions), optimized to find any locations on the tree and all the Chapter 3. Methods neighbouring cells. This is done by producing indexes which contains all the informations about location of any point, up to a given resolution. We therefore do not need to store the three floats for 3D position together with the associated index. It makes the fully threaded tree lighter than usual implementations. Also, it makes finding parent and child cells very fast. The indexing is shown in Fig. 3.7, where we see that an index only contains zeros and ones. In 3D, a zero or a one is followed by a sequence of three numbers. The initial number means if we enter or not to the next refined level of the tree. Then, the three numbers tells the position of the cell containing the point we are interested in. With this method it is extremely easy to find parent cells or to know if a cell belongs to a less refined one. This method is easily generalizable to N-dimension by putting a sequence of N numbers which would give an n-dimensional position. We also note that we can recreate an AMR grid using this method. The octree would contain n cells, each cell is defined by one index containing its position and level, as well as eulerian quantities given by the simulation. Interestingly, in order to match perfectly the eulerian data from simulations (with a box length equal to 1), the size of the octree along one dimension must be of size 2 p with p an integer. To produce an index of a cell at a given level, closest to a given position is done very efficiently, given the level and position. For a given position, we can produce an index of the most refined cell containing the position. Using this method we can reach great accuracy as the octree allows for 31 refinement levels (to give an order of idea, the most resolved simulations at 16384 3 coarse cells are at level 14, with refinement going to level ≈ 20 at most). To perform the raytracing, we will therefore need to rewrite the RAMSES AMR cells from the light-cone (the tree is broken by the onion-shell approach) in terms of a clean octree. There are many possibilities to index cells in a tree, a common technique is to use a linear index where the index of a given cell is given by i lin = i x + i y n y + i z n x n y , which n x and n y the number of cells along the x and y axis. RAMSES (and some other N-body codes as GADGET-2) uses a Peano-Hilbert curve which allows for efficient parallelization, and MAGRATHEA uses a Lebesgue curve (or z-curve) which is interesting locally when dealing with refinements.

Once we construct a tree which allows to easily and quickly find any location, we need to know the neighbouring cells at a given refinement level in order to perform an interpolation of eulerian quantities at any location. We interpolate from cells using an inverse CIC method. While this can be implemented easily when dealing with a regular grid, the AMR structure can lead to some complications. Indeed, the interpolation has to account for refinement without discontinuity of any quantity at any position. To address this issue, in RAY-RAMSES (Barreira et al., 2016) the authors reconstructed a tessellation at cell vertices by interpolating from cell centers, slightly reducing the volume in which we can perform the interpolation (cutting the edges but in practice it is not a problem), but actually managing to perform an interpolation free from discontinuity between cells of different levels. However this method is not applicable in our case because it relies on the assumption that the AMR grid on which we compute the integration is smoothly refined (meaning that neighbouring cells can only have one level of difference). While this is true in RAMSES snapshots (and during the simulation), it is not necessarily the case for post-reconstructed light-cones from the onion-shell technique. Indeed, at the edge between two shells we might find more than one level of refinement difference, therefore not allowing us to use the interpolation reconstruction method from Barreira et al. (2016). In MAGRATHEA, the interpolation is done in many steps:

1. Finding the level of the most refined cell containing the photon at a given position 2. Are there 8 neighbouring cells at the same level ? If yes, compute the interpolation. If it is not :

3. Go to the less refined level, are there 8 neighbouring cells at this level ? Repeat until this becomes true, in that case compute the interpolation. If it is still not the case at coarse level, the integration is stopped meaning there is no more data.

We have seen the main particularities of MAGRATHEA, meaning TMP and indexation of the tree. This library is also hybrid MPI/std::thread. We focus here on the MPI aspect. Obviously, to compute ray-tracing one has to load the octree in memory. However, loading the full light-cone for one task may not be possible due to the memory size of nodes in supercomputers. Then, instead of loading the full light-cone, we perform a domain decomposition where each sub-domain is related to different tasks (each task reads the HDF5 data efficiently thank to a cubic data slicing, where only data cubes that intersects the subdomain is read). The parallel ray-tracing procedure contains independent tasks (except at the finalization if we need to average on all the directions, in that case a MPI_REDUCE or MPI_ALL_REDUCE might be used). This means that there are no communications between tasks during ray-tracing, which is interesting in terms of performances. The shape of subdomains do not look like refined cells: indeed, since we are performing backward raytracing the sub-regions necessarily contains the observer at the center of the box. Therefore sub-domains will look like cones with the vertex at the observer. At the observer position we need the neighbouring cells in order to initialize the integration, we therefore add a spherical buffer zone around the observer.

To sum up, we construct several cone-shape sub-domains with small overlap (to account for photon deviation) from the light-cone produced by the simulation. These sub-domains are loaded in memory independently by each task as an octree containing the relevant eulerian informations. The implementation of the octree is optimized to find cells from position an interpolating at a given position, exactly what is required for efficient ray-tracing.

In [START_REF] Reverdy | Propagation de la lumière dans un Univers structuré et nouvelles approches numériques en cosmologie[END_REF], this ray-tracing library was used calculate angular diameter distances by integrating a bundle of photons and inferring the area size of the bundle for different cosmologies. Then the following question arises:

• How do we define light-beams, and therefore ray bundles ?

There could be many criterion to stop the rays at a given hypersurface and then computing the bundle area. From GR, a natural definition of the bundle is to stop all the rays at the same affine parameter. However we acknowledge that it may be slightly more complicated due to the observer or sources four-velocity. Numerically it is an interesting question since we could stop rays at scale factor, redshift, conformal time, affine parameter or comoving distance hypersurface. We note that in a homogeneous universe these hypersurfaces are the same. However they are different in a inhomogeneous universe: this is why the definition of light bundle matters. The exact definition should even depend on the source, resulting in different distances for different objects.

Computing distances was the first application of MAGRATHEA, but the efficiency and generality of this library allows one to go further with great accuracy. This is the topic of the next Section.

Producing observables

Connecting sources and observers

Having presented the library and one concrete application, it is time to present some developments made during this thesis. These modifications aim at computing relevant cosmological informations and to test them with theoretical predictions. We will see two approaches implemented in the library: production of mock catalogs with relativistic effects (for source averaging) and production of fullsky maps (for direction averaging).

First we focus on catalogs production. The idea is the following: since we directly compute null geodesic starting the integration from the observer today, is it possible to find the null geodesic connecting the observer and a source ? Knowing this geodesic, we would know the direction from which is coming the perturbed photon, also referred as the seen angle θ in lensing while the true angle β is known from the comoving position of the source. Also, if the photon arrives to the source, by comparing k ν u ν at source and observer location, we can compute the observed redshift (and therefore an apparent radial comoving position) taking into account many effects such as the Doppler effect, gravitational redshift and so on (see Fig 3 .8). Finding the geodesic connecting the observer and a source comes down to finding the root of a function. We want the angle difference between the source and the photon at the same comoving radius to be zero. Any root-finding algorithm can be used, we chose Newton's method for speed and simplicity. Numerically, we cannot ensure that an integration step will be exactly at the same comoving radius as a given source, therefore we perform a linear interpolation of the photon position at the source's comoving radius. This is done by finding the two integration steps with comoving radius χ i and χ i+1 such as χ i < χ source < χ i+1 . These algorithms relies on two things:

1. the function we want to know the root must be smooth The first ray will generally miss the source, we then iterate using Newton's method in order to get a new initial angle. In this example we iterate twice to find a ray close enough to the source at the same radius, the initial angle of ζ 2 is given by θ and is interpreted as the seen angle. From [START_REF] Breton | Imprints of relativistic effects on the asymmetry of the halo crosscorrelation function: from linear to non-linear scales[END_REF] In our large-scale cosmological simulations we are in the weak-field approximation, therefore the function to minimize should be smooth enough. Concerning the first guess, we count on the fact that photons are weakly deviated by the density field along the l.o.s, therefore a photon going toward the comoving position of the source should not arrive far from the source. In simulations sources are considered as point-like objects (in practice we choose the center of DM halos), we therefore need a convergence criterion. In our case we took 10 -2 arcsec as the limit under which we consider the photon to reach the source. Iterating multiple times allows us to find the initial direction of the photon needed to reach the source.

In that case we have the lensing displacement (β and θ), lensing quantities, but also the RSD components. The Doppler effect is computed with v source the source peculiar velocity but also k i s the spatial wavevector of the photon at the source. It is slightly different than computing the approximated v • n where n is the l.o.s direction. From v source and k i s we can compute the Doppler and transverse Doppler effect. Interpolating at the photon location give us φ S the potential which is needed to compute the gravitational redshift. Last, there is the case of the ISW/RS effect. This last effect needs a special treatment because it depends on the integrated derivative of the potential w.r.t conformal time. This computation is not straightforward in simulations. Another important quantity is the lensing distortion matrix.

Computing the WL distortion matrix

Using Newton's method, we need to compute the Jacobian of the mapping from true angle to seen angle, which is exactly the definition of the lensing distortion matrix A ij in the smallangle approximation. To compute this matrix we start from its definition:

A ij = ∂β i ∂θ j . (3.38)
Chapter 3. Methods

We then use the ray-bundle method [START_REF] Fluke | The ray-bundle method for calculating weak magnification by gravitational lenses[END_REF]Fluke and Lasky, 2011). To compute the derivative of a function f , one can perform a two-point finite-difference scheme

∂ f (x) ∂x = f (x + h) -f (x -h) 2h . (3.39)
This is the algorithm chosen to compute A ij , in our case we have a 2D problem. Considering that we are already on the light-cone, we do not take into account peculiar velocities and the time component which is equivalent to perform an NGP interpolation in time. Performing a linear interpolation could be an interesting prospect in the future. We therefore consider a central ray, surrounded by four rays to form a bundle. The four rays will be used to compute the matrix as they are each launched with an initial angle different from the central ray by an angle z ,z , xy andxy . Here | z | = | xy |, z is the infinitesimal angle displacement along the z coordinate while xy in the angle displacement along the plane at z = cte (see Fig. 3.9). Considering the small angle approximation, we can compute ratio of distances Observer FIGURE 3.9: Sketch of the ray-bundle method used to compute the Jacobian distortion matrix for a source (blue circle). In black circles we have the reference points for the derivation. We launch photons towards these points but due to lensing the photons will not arrive at the same location (red circles) on the plane orthogonal to the l.o.s. We use finite displacement between black and red circles to compute the Jacobian.

from perturbed photon w.r.t unperturbed photons on a plane at source location which is 3.2. Ray-tracing of LSS 83 perpendicular to the l.o.s. We stop the photons at the same affine parameter as the central ray arriving to the source, and project the bundle onto the plane. We follow here the usual convention from the lensing community (Bartelmann and Schneider, 2001) for first order quantities but several improvements could be made, for example computing the matrix on the Sachs basis, performing higher-order statistics or estimating effect of finite beams.

Implementing the ISW/RS effect

In [START_REF] Cai | Full-sky map of the ISW and Rees-Sciama effect from Gpc simulations[END_REF], the authors computed the ISW/RS effect with ray-tracing, using the Poisson equation in Fourier space. It yields

φ(k, t) = 3 2 H 0 k 2 Ω m ȧ a δ(k, t) + ik • p(k, t) a , (3.40)
where the momentum field is defined as p(x, t) = [1 + δ(x, t)]v(x, t). To compute the ISW/RS effect we would therefore need the density and velocity fields. If the density field is computed during the simulation, it is not the case of the velocity field which has to be reconstructed from Lagrangian quantities. If we assume linear theory, φ can be expressed only in terms of the density field, leading to the ISW effect. However, in non-linear regime (RS effect) we cannot make this assumption and computing the velocity field is not trivial numerically and strongly depends on the implementation at small scales. This will be discussed later on.

In our case, we wanted to compute the time derivative of the potential from its definition. with k 0 = dη/dλ. All the terms of the right-hand side of Eq. (3.42) are known during the raytracing, we can therefore compute φ at each integration step. We call this implementation Method 1. In that case, we know dφ/dλ and we infer ∂φ/∂η. Here dφ/dλ is computed as the ratio between the potential difference between two steps and the affine parameter difference, as

dφ dλ = φ i+1 -φ i λ i+1 -λ i , (3.43)
where superscripts denotes the integration step. Alternatively, we also implemented a second method to compute the ISW/RS effect more accurately, hereafter called Method 2. Instead of constructing shells in order to pave space exactly, we produce wider shells to produce heavy overlaps in order to have at least two cells at the same location and slightly shifted in time (one coarse time-step). This is equivalent to storing 2 cones around the null light-cone. In this case, we have the Eulerian quantities for all the cells twice, with only a slight time shift. For every cell we can compute φ using

∂φ ∂η = φ 2 -φ 1 a 2 -a 1 da dη . (3.44)
Chapter 3. Methods

The subscript denotes if a quantity is evaluated at the first or second shell. the quantity da/dη comes from the background evolution computed numerically. By construction, this implementation takes into account time evolution without any assumption and therefore would be preferred to Method 1 or the method from [START_REF] Cai | Full-sky map of the ISW and Rees-Sciama effect from Gpc simulations[END_REF]. It appears that if we wish to compute the geodesic equations with great accuracy as well as the ISW/RS effect without needing the velocity field, it seems mandatory to save two light-cones (or to produce wide light-cone shells) slightly shifted in time, allowing to compute the time derivative of the potential for each cell of the light-cone. Note that this can also be used for time interpolation.

Producing catalogs accounting for relativistic effects

Finally, using a geodesic-finder algorithm, connecting the observer and sources with a null geodesic allow us to produce catalogs of sources with their true angle β, seen angle θ, the lensing distortion matrix A ij as well as various redshift accounting for different redshift perturbations terms as

z 0 = a 0 a -1, (3.45) z 1 = a 0 a 1 + φ o /c 2 -φ s /c 2 -1, (3.46) z 2 = a 0 a 1 + φ o /c 2 -φ s /c 2 + v s • n/c -1, (3.47) z 3 = a 0 a 1 + φ o /c 2 -φ s /c 2 + v s • n/c + 1 2 v s c 2 -1, (3.48) z 4 = a 0 a 1 + φ o /c 2 -φ s /c 2 + v s • n/c + 1 2 v s c 2 - 2 c 2 η o η s φdη -1, (3.49) z 5 = (g µν k µ u ν ) s (g µν k µ u ν ) o -1, (3.50)
Subscripts denotes if a quantity is evaluated at the observer or at the source. We have

g µν k µ u ν = -ack 0 1 + φ/c 2 + v • n/c + 1 2 v c
2 while the observer velocity is set to zero because we are not interested in this local dipole. On the other hand we keep the monopole from φ o since we do not want any discontinuity at the observer location. We also accounted for the transverse Doppler effect, which is non-negligible at small scales [START_REF] Zhao | Testing gravity theories via transverse Doppler and gravitational redshifts in galaxy clusters[END_REF]).

It appears that this kind of method to connect observers and sources will be implemented in GEVOLUTION (Adamek, private discussion). It is very interesting to see that more and more the question of observables in cosmology is being addressed as accurately as possible.

Producing full-sky maps

MAGRATHEA offers a lot of flexibility, allowing also for source averaging with the production of catalogs, but also direction averaging with map production. In that case we use the public library HEALPIX, adapted to our library. With HEALPIX we can compute maps and the angular power spectrum of any scalar quantity on the sky. To do so with ray-tracing, we launch the photons in the direction of HEALPIX pixels and compute quantities at a given redshift. Usually, fullsky maps are evaluated at the constant homogeneous redshift hypersurface. However, we observe source at a redshift perturbed by many effects and therefore different than the homogeneous redshift. If we want a better understanding of observations with simulations, we should therefore produce maps at the constant inhomogeneous redshift.

Comparing the results on the angular power spectrum considering a different redshift hypersurface is interesting in order to evaluate the effect of RSD on other quantities. At first, we intuitively assume that for any power spectrum of integrated quantities, the constant inhomogeneous redshift hypersurface case will give more power than the homogeneous case. This is because in the case of the perturbed redshift, the integration will be stopped at a different comoving radius, therefore adding variance in the estimation of a given quantity. The dominant effect is the standard Doppler effect. However as mentioned before we do not know the velocity in each AMR cells. This requires a special treatment as estimating the velocity field is a difficult task.

When we compute null geodesic between the observer and a source, the Doppler effect is computed with the velocity from the particle in the simulation. Here we want to stop photons at a given inhomogeneous redshift, not necessarily at a source. To do so we must be able to evaluate the inhomogeneous redshift at each integration step, and therefore the velocity for each step. This means that we need to compute the matter velocity field in the simulation, and evaluate it at every AMR cell of the octree. The genericity of the tree makes it easy to add slots containing additional information in each cell of the octree, but it also makes the tree heavier memory wise. Therefore, since we do not always need these velocity field slots in the octree, we write a second file containing the properties of the tree, this time adding velocity slots. Depending on the compile options, the octree will have these slots or not.

The implementation of the velocity field is not trivial: from DM particle position and velocity we can compute the velocity field but the method used can vary the results. The main difficulty is to evaluate the velocity in large empty regions (voids). We implemented two methods:

1. CIC interpolation: here we perform a straightforward linear interpolation. The advantage of this implementation is that it is easy to compute. But it has a major drawback: in cells where there are no neighbouring DM particles, the velocity must be artificially set to zero. It alters the smoothness of the velocity field and creates problems for smallscale correlations.

2. Delaunay tessellation, using the public code DTFE [START_REF] Schaap | Continuous fields and discrete samples: reconstruction through Delaunay tessellations[END_REF].

The idea is to create a tessellation from the particles in the simulation, in order to fill the simulation with tetrahedrons (in 3D). At any location should correspond a given tetrahedron, with its tips formed by particles. The velocity is interpolated linearly from the tips to the location inside the volume. It has the advantage to account for denser and less dense regions similarly and should be more accurate than the CIC method. However at small scales there can be some problems.

We note that there exist a more accurate and promising method to compute the velocity field by interpolating in phase-space [START_REF] Hahn | The properties of cosmic velocity fields[END_REF].

Knowing the velocity field we can now produce HEALPIX maps (and C 's) at a given inhomogeneous redshift.

Correlation functions

In cosmology we often rely on a single realization of catalogs, therefore to extract information we need proper statistical tools. In this Section we will see how these tools are implemented numerically. This is the last step of the process after the data is produced (either by observations or numerical simulations). Once we have catalogs, we can compute statistical quantities which will be compared to theoretical predictions, or be used to constrain cosmology.

Estimators

In catalogs, we usually have position of sources as well as scalar quantities like density contrast, convergence, shear, magnitude and more. To extract information we perform ensemble averages denoted by . For a scalar quantity g, the 2-pt correlation function (2PCF) is

ξ g 1 g 2 (r) = g 1 (x)g 2 (x + r) .
(

3.51)

There is no single procedure to determine ξ gg , plus we need to discretize this function. This means that we need to estimate ξ gg and therefore to construct estimators. Generally we want estimators to give a high signal-to-noise ratio, as well as being unbiased, meaning with infinite precision the estimator should give as a mean result (and by construction) the expected value.

Number counts

First we consider the case of what is usually referred as "the correlation function" even if in practice we should specify which 2PCF it is.

ξ(r) = δ(x 1 )δ(x 1 + r) , (3.52)
where we can write r = (r, µ) with µ defined as µ = x • r, with x the vector going from the observer to the median of the separation vector r between two pairs. A hat denotes a unit vector. There can be multiple definitions of this angle, we choose this convention because it gives by construction a symmetric correlation function along the l.o.s when performing auto-correlations [START_REF] Reimberg | Redshift-space distortions with wide angular separations[END_REF][START_REF] Gaztanaga | Measurement of the dipole in the crosscorrelation function of galaxies[END_REF]. Note that we implicitly average the 2PCF on the direction transverse to the l.o.s. Here the density contrast δ is not a directly observable quantity, the number count however, is.

There are two main methods to compute the 2PCF: direct pair counting and a grid method. In the latter, we would estimate δ on a fixed grid and directly compute Eq. (3.52). The problem comes when we need small-scale correlations with a limited amount of data (with halos), in that case the interpolation on a fixed grid would not give accurate results. This is why we used the former to compute the 2PCF. In practice we verified that both methods gave similar results at large enough scales.

We usually have some datasets denoted D i containing position and scalar quantities for sources. We can discriminate two types of correlations:

• Auto-correlation: in the case we correlate a given dataset D i with itself. Meaning that for each source, we loop over all the other sources of the same dataset and count how many pairs falls in each (r, µ) bin. Here we actually do not need to loop over all the elements of the catalog twice because we would count the same pair (with opposite direction) twice. Meaning that for a catalog of N sources, we only need to compute N(N -1)/2 pairs.

• Cross-correlation: here we correlate different catalogs. We first loop over the elements of the first catalog, then over the elements of the second catalogs and then we compute pair separations. In that case we need to compute every pair, hence N 1 N 2 pairs if there are N 1 elements in the first catalog and N 2 in the second one.

The correlation function gives us the deviation of the data distribution w.r.t to a Poisson distribution. From a number count perspective, we generate a uniform random catalog which accounts for Poissonian distribution. The data correlation will then be compared to the random one. To perform this we of course need more elements in the random catalog than in the data. Random catalogs are denoted by R i . Correlating data with data is noted D i D j , data with random is D i R j , and last random with random is R i R j . These quantities are histograms of number pair counts for each (r, µ) bin. Since we are interested in density, D i D j , D i R j and R i R j are normalized by the product of the number of elements in each catalog. The first estimator proposed is the one from [START_REF] Peebles | Statistical Analysis of Catalogs of Extragalactic Objects. III. The Shane-Wirtanen and Zwicky Catalogs[END_REF]

ξ PH = DD RR -1, (3.53)
we do not explicitly write the (r, µ) dependence as it is implicitly assumed. With this estimator, for each bin we divide the normalized data-data number count by the equivalent normalized random-random number count, and subtract one. This estimator is very intuitive as we wanted to construct a quantity probing deviation from a Poissonian distribution. However, as said, there can be different estimators. A few of them are

ξ DP = DD DR -1, (3.54) ξ Ham = DD × RR (DR) 2 -1, (3.55) ξ Hew = DD -DR RR -1, (3.56) (3.57)
with ξ DP , ξ Ham and ξ Hew respectively from [START_REF] Davis | A survey of galaxy redshifts. V -The two-point position and velocity correlations[END_REF], Hamilton (1993), and[START_REF] Hewett | The estimation of galaxy angular correlation functions[END_REF]. However, one of the most popular estimator comes from Landy and Szalay (1993) (hereafter LS)

ξ LS = DD -2DR + RR RR . (3.58)
The LS estimator is interesting because its large-scale variance is almost Poissonian and unbiased (the estimated value is the expected one). Comparisons of these different estimators are shown in [START_REF] Kerscher | A Comparison of Estimators for the Two-Point Correlation Function[END_REF]. In the following, we only consider the LS estimator. Eq.(3.58) is the auto-correlation estimator. For cross-correlations we use the generalization

ξ LS = D 1 D 2 -D 1 R 2 -R 1 D 2 + R 1 R 2 R 1 R 2 . (3.59)
We can also use the same random catalogs if the data distribution is uniform, in that case

R 1 = R 2 = R.
If the data is not uniform, we usually generate random points which follow the real data redshift distribution. In practice the redshift distribution is smoothed on scales larger than the one we are interested in. Said differently, one has to make sure that the random catalog produced do not follow the data one with too much accuracy because this could suppress correlations along the l.o.s. When cross-correlating different datasets, it is Chapter 3. Methods important to note that D 1 D 2 = D 2 D 1 due to asymmetries along the l.o.s. Therefore in crosscorrelating, we should take care in which order we correlate datasets.

Scalar correlation

On the other hand, considering a scalar quantity g, an estimator is

ξ gg = ∑ ij w i w j g i g j ∑ ij w i w j , (3.60)
where i, j are indices referring to the first or second dataset and w i are weights. These are also binned in (r, µ) depending on their separation. For galaxy lensing (correlating background source ellipticities with foreground source positions) and cosmic shear (correlating ellipticities). This was investigated in detail in [START_REF] Schneider | Analysis of two-point statistics of cosmic shear. I. Estimators and covariances[END_REF].

Numerical implementations

Having seen correlation function estimators, it is now necessary to present some numerical implementations. First we see the simplest algorithm: the direct pair counts, then a more complex one, a tree code algorithm. The latter being a sophistication of the former.

Direct pair counts

Performing an ensemble average, we count every pair possible between two datasets. Then compute (r, µ) and bin accordingly. Numerically it gives (when cross-correlating data with data).

for(int i = 0; i < N1; i++){ for(int j = 0; j < N2; j++){ int ibin = get_bin_from_separation(position_dataset1[i], position_dataset2[j]); BIN[ibin]++; } } with N1 and N2 respectively the number of elements of each dataset. In this example we see that the function get_bin_from_separation computes (r, µ) and give the corresponding bin index. For a given index we can add one pair to the bin. Note that for auto-correlation, the second loop can be written for(int j = i+1; j < N1; j++) ensuring that we do not compute twice the same pair.

Performing the same operation for DD, DR and RR allows to use Eq. (3.58) or Eq. (3.59). The advantage of this method is that it is very simple. Also here the parallelization is straightforward. Using multi-threading (for example OPENMP), one can parallelize the operations. However here we still compute every pair, and the complexity of the code grows as O N 2 which can easily become time consuming when dealing with large amount of data (and therefore large random data).

Note that this method can be used for particle or cell counts similarly. In a simulation we can compute the density field (and therefore the density contrast) in every cell of the simulation for a PM code. In that case, to determine the correlation function we can loop over the cells and multiply the density of every cell pairs as in Eq. (3.60) with the weights set to one.

Tree code

We have already seen the concept of tree algorithms in the context of N-body simulations. The same tools can be used for pair counts in order to diminish the number of operations. Indeed, considering nodes which contains several close sources, for distant pairs instead of computing every pairs individually we compute once the correlation between a source and the node containing several sources. Of course there must be some thresholds (the maximum distance between two sources of the node should not be seen under an angle superior to a given value). The scalar values for the node are computed as the mean of the values from the sources it contains and the weight attributed would be the number of sources in the node. The interesting feature of this implementation is that depending on the angular threshold chosen to compute source-nodes or nodes-nodes correlations, the calculation will be more or less time consuming (as well as more or less accurate). With a tree algorithm we do not need to compute every long-range pairs and setting the angular threshold to zero is equivalent to the direct pair count method.

For lensing quantities we use the tree-code ATHENA [START_REF] Schneider | Analysis of two-point statistics of cosmic shear. I. Estimators and covariances[END_REF] because it is well tested and fast. This code computes the usual 2PCF (although for this application we prefer CUTE since it contains a more effective MPI parallelization as we shall see later) but especially lensing correlations (galaxy lensing and cosmic shear) or any scalar correlation (correlation function of the convergence). The correlation being entirely computed through Eq. (3.60). Due to the curvature of the sky, correlating scalar quantities at different observed comoving radii is not straightforward and we recommend either reading the implementation in ATHENA or the Section 3.2 of [START_REF] Kilbinger | CFHTLenS: combined probe cosmological model comparison using 2D weak gravitational lensing[END_REF].

Efficient correlation-function algorithms

There are many correlation function codes, but for this work the decision has been to use the public code CUTE (Alonso, 2012) for multiple reasons:

• MPI parallelized and multithreading

• implementation of cross-correlations • easy to understand

The last point is interesting when one wants to modify a code. A non-negligible advantage of the code is that it can take the RR correlations as an input file instead of computing it every-time. It is time saving since in our work we often cross-correlate several datasets with the same random catalogs. In CUTE, the volume containing the data is divided in smaller cubes, each cube containing a given number of elements. Setting the distance upper bound of the correlation function, we can correlate cubes within a sphere of radius lower than the maximum distance separation of the correlation function computation. We can then correlate every elements of a given cube with the elements of another one, making sure that the pair computation will be relevant for the scales we are interested in. The MPI parallelization in used for the loop over the cubes, while the multithreading is used for the loop over cube elements using a direct pair count method. The code assumed a symmetry along the l.o.s (the computation of µ was done between 0 and 1), and had to be modified in the present work since we were interested in the asymmetry of the cross-correlation function.

Variance estimation

A last point concerns the error bars, and how to estimate it from data. A discussion between variance estimators can be found in Norberg et al. (2009). In this paper is underlined the difference between internal estimators and external estimators. This is equivalent to ask if the data is self-sufficient or not in order to infer error bars. When it is not the case, it is an external estimate. An example of external estimate is the Monte-Carlo method. In that case we produce multiple realizations of the data with the same statistical properties. The difference between the different realizations will give us the error bars. In our case, re-running multiple time the same simulation is not an option, we therefore lean toward internal estimators. A first simple estimate is the sub-sample method: the data is divided in sub-volumes, treated as independent. We perform our analysis in each sub-volume, then the mean result for a given quantity g is given by ḡ

= 1 N N ∑ k=1 g k , (3.61)
with N the number of sub-volumes and g k the estimation of the quantity in each one. The variance is given by

σ 2 = 1 N N ∑ k=1 ( ḡ -g k ) 2 . (3.62)
This method is interesting due to its simplicity but there are limitations due to the lack of independence of the data and the fact that long-range modes can affect small-scale ones, which cannot be treated carefully with this method. Another internal method, which we use, is the jackknife method. Here we divide our data the same way as in the previous method. But we perform the analysis on the volume containing all but one sub-volume, N times. This means that we perform N analysis on N-1 N times the full volume. The mean of a given quantity is computed as in Eq. (3.61), while the variance is

σ 2 = N -1 N N ∑ k=1 ( ḡ -g k ) 2 .
(3.63)

The variance given in Eq. (3.63) is accurate in the linear regime, but becomes less accurate at smaller scales in the non-linear regime. As stated earlier, for precise estimate of the variance in the non-linear regime it would be better to use a Monte-Carlo method.

Simulation, data and tests

RAYGALGROUPSIMS: simulation suite

RAYGALGROUPSIMS stands for Ray-tracing Galaxy Group Simulations. It is a suite of simulations dedicated to the study of the universe in redshift-space. As constructed from highresolution simulation and sophisticated ray-tracing techniques. The combination of good mass resolution and large volume allows to probe halos from galaxy cluster size to Milky-Way size with a special accent on group of galaxies which are the main deflections of light at low redshift.

Characteristics of the simulation

We have performed simulations in the standard ΛCDM model with a cosmology calibrated on WMAP 7-year CMB data (Komatsu et al., 2011), hereafter ΛCDM_W7. The parameters are given in Table . 4.1. The extension to other cosmological models is ongoing. Box length (h -1 Mpc) N part Mass (h -1 M ) ∆x coarse (h -1 kpc) ∆x (h -1 kpc) z ini 82.03125 128 3 1.9 × 10 10 640 5 46 656.25 1024 3 1.9 × 10 10 640 5 46 2625 4096 3 1.9 × 10 10 640 5 46

These parameters were chosen to ensure a good resolution at the level of galaxy groups since they contribute a lot to lensing deviations. A large volume is mandatory to avoid sample variance at linear scales. Enough particles and halos are required to compute correlation function with a good accuracy at redshifts relevant for RSD and galaxy clustering probes This led us to choose a box size of 2625 h -1 Mpc with 4096 3 DM particles. The initial power spectrum is computed using CAMB [START_REF] Lewis | Efficient Computation of Cosmic Microwave Background Anisotropies in Closed Friedmann-Robertson-Walker Models[END_REF] but also crosschecked with CLASS [START_REF] Lesgourgues | The Cosmic Linear Anisotropy Solving System (CLASS) I: Overview[END_REF].

Run

Such a simulation is tedious to run and post-process due to the number of AMR cells. Indeed, due to box characteristics we will precisely account for late-time structure formation which produces a lot of AMR cells at low redshift (our refinement criterion was deliberately chosen to be 8 times the particle mass in a given cell to pave the space with many resolution elements). This is an advantage of this simulation because we have access to the non-linear 4.1. Simulation, data and tests 93 regime of structure formation with good accuracy but it is numerically difficult to process. This simulation ran on the CURIE supercomputer using more than 25.000 CPUs. For the 4096 3 particles simulation it produced ≈ 0.4 × 10 12 cells with a data volume of order 100 Terabytes (most of heavy data was post-processed during the run).

Snapshots

It would be unrealistic to keep all the snapshots (≈ 50) from such a simulation (each snapshot weights approximatively 25 Terabytes). We therefore need to post-process the snapshots once they are created and erase most of them after. In particular we compute the power spectrum for each snapshot: to do so we use a CIC method on a regular grid with twice the resolution of the coarse grid (so that the limit of validity of the power spectrum is the coarse Nyquist frequency). In Fig. 4.1 we show the absolute relative difference between the power spectrum computed on several snapshots and two predictions (COSMICEMU, Heitmann et al. 2016 andHALOFIT, Smith et al. 2003). For HALOFIT the parameters were re-calibrated on our simulation: the goal is to reproduce the power spectrum of our simulation.

We computed the relative difference of the power spectrum on snapshots in the redshift range we are interested in for this work. There are four interesting features:

1. At low k, at k = 0.02 hMpc -1 and below the error goes above one percent. It is mainly due to the finite size of the box and cosmic variance: there are very few large-scale modes to compute the power spectrum..

2.

At BAO scale k ≈ 0.1 hMpc -1 , COSMICEMU seems to be in a better agreement than HALOFIT. It is known that HALOFIT does not capture well the non-linear effects at BAO scale, and therefore if we want to compare the correlation function from our simulation at BAO scales with a theoretical prediction we would use COSMICEMU (or PT)

3. At intermediate scales k ≈ 0.2 -2 hMpc -1 , HALOFIT is closer to our power spectrum than the emulator. Therefore the predictions for which we need to go deep in the quasilinear, non-linear regime and where we want to test the kinematics of photons, we would use our HALOFIT.

4. At high k, over approximatively k = 2 hMpc -1 the difference becomes significant when comparing the emulator to the computed power spectrum while the agreement with the fitted HALOFIT remains acceptable. Above this scale the power spectrum starts to be sensitive to finite resolution effects. We note that baryonic effects start to play a role at the 1% level at this scale according to [START_REF] Springel | First results from the IllustrisTNG simulations: matter and galaxy clustering[END_REF].

Still, we want to point out that overall we have a good agreement between our estimation of the power spectrum and the predictions on a wide range of scales.

Before erasing the snapshots we run the parallel Friend-of-Friend pFoF [START_REF] Roy | pFoF: a highly scalable halo-finder for large cosmological data sets[END_REF] code to detect halos in snapshots for different linking lengths and different over-density thresholds. These outputs were used in [START_REF] Corasaniti | Probing Cosmology with Dark Matter Halo Sparsity Using X-ray Cluster Mass Measurements[END_REF] for sparsity measurement, a proxy of the halo mass profile which allow to constrain cosmology.

Light cones

Our simulation also produces light cones which will be used for ray-tracing. We ran pFoF on the light cones (produced with an onion-shell method to ensure a good time resolution), meaning that for each light cone we have FIGURE 4.1: Absolute relative difference on the power spectrum for different snapshots covering the redshift range used for the light-cone analysis (between z = 0.05 and z = 0.465). The black horizontal bar show the 1% difference. In green full lines we have the relative difference between the power spectrum and (our re-calibrated) HALOFIT. In blue dashed lines we have the relative difference with the COSMICEMU emulator.

1. Cell informations 2. DM particles informations

DM halos informations

where informations stands for center position, potential, gravitational field, density, scale factor (although it is constant for a given shell) and number of DM particles for each halo.

In the RAYGALGROUPSIMS simulation we produced one full-sky light cone and two narrow. These light cones are summed up in Table 4.3 and shown in Fig. 4.2. The different light cones contain the same volume, meaning that a narrower light cone can reach a higher redshift. Narrow light cones necessarily contain replicas of the simulation Chapter 4. Results box, meaning that a photon ray-traced on these light cones could pass through the same structures at different redshifts. However these effects are minimized because the lightcones are not aligned with the axis of the simulation box. For this work we focused on fullsky light cones as they were built with no replicas and easier to manage with MAGRATHEA, but we leave the analysis of narrower light cones for the future.

RAYGALGROUPSIMS: Ray-tracing

Once the light cones are created, we construct octrees with MAGRATHEA and propagate photons using backward ray-tracing in the simulation. We remind that during the raytracing procedure we directly compute the geodesic equations, saving various informations on the photon trajectory at each step. The analysis can be done at different levels • For each photon, analyze the evolution of different quantities during its propagation

• For each bundle, analyze its deformation and the impact of screens to characterize the bundle • Map production, propagating photons and bundle in every direction and analysis of the angular power spectrum with HEALPIX

• Catalog production connecting observer and sources. This allow us to compute 2PCF and various configuration-space quantities.

Testing the ray-tracing in an AMR structure

Let's investigate the effect of AMR on various quantities. PM-AMR codes are more difficult to perform than simple PM codes but also give more spatial resolution. This comparison is relevant especially to estimate the limitations of PM codes. In particular, we show in Fig. between the estimation of the force with and without AMR is due to two factors: first the number of integration steps is variable and depends on the level of refinement at the location of the photon. This means that in refined (denser) regions, there are more integration steps (in this case, 10 4 steps with the AMR and 8 × 10 3 without; the number of steps on the coarse level is roughly constant while with the AMR it depends on the regions crossed by the photon) and the shape of potential wells (and derivative) will be more accurately captured. The AMR allows a better estimation of the potential due to a better resolution and we see indeed that the force is stronger using AMR than without. We can apply the same reasoning with the potential (which is smoother than the force, but we show the latter because it is directly used in the geodesic equations). The main difference between ray-tracing in a PM-AMR and PM code will therefore lie in high-density regions (by definition), in particular this would give different results for light-beam deformations and therefore for lensing quantities . In Fig 4 .4 we compute the convergence power spectrum at different homogeneous redshifts with and without the AMR. First, we notice that our computation of the convergence power spectrum is in agreement with the prediction. We also noticed that HEALPIX is accurate until ≈ nside with the total number of map pixels being N pixels = 12 × nside 2 . For different values of nside we see that D = ( + 1)C /(2π) is similar up to the value ≈ nside. The main feature of Fig. 4.4 is the behaviour of the coarse angular power spectrum. We see that for low-( < 200) we have an agreement with a fully refined computation, however at large the power is suppressed. This comes from the fact that for small-angle correlations, photons propagate in the same coarse cells and therefore tidal effects are negligible compared with a refined computation. This shows the importance of AMR in our simulation and why it is especially important for non-linear scales (on the other hand, larger-scales computation can be performed at coarse level with a precision which should be determined by ray-tracing in a AMR grid).

From the unperturbed light cone to the perturbed one

From the fullsky light-cone we apply our ray-tracing procedure to produce catalogs 1 . We remind that our catalog give β the true angle, θ the seen angle, as well as various redshift perturbations and the lensing distortion matrix A ij . In the unperturbed case in our catalogs, the position of halos are not exactly the same as in the unperturbed light-cone from the simulation. If the angle is the same, its radial position is slightly different due to Shapiro time delay. Indeed, the time along the photon trajectory is computed using the geodesic equation on the k 0 term. The scale factor is then directly inferred from this conformal time. This means that the scale factor will be different from the homogeneous case. Shapiro time delay indeed modifies the observed redshift but is not of the same nature as other redshift perturbations, in that case what changes is the time of emission of the photon. However this effect is negligible compared to other redshift perturbations. First, to test our catalogs we can compute the 2PCF on the "unperturbed" light-cone to the COSMICEMU (Heitmann et al., 2016) emulator. We randomly pick 10 8 DM particles and produce a random catalog of 10 9 particles with a uniform distribution. We compute the 2PCF using CUTE (Alonso, 2012) with an LS estimator (Landy and Szalay, 1993). We compute the prediction at the volume-average redshift as seen in Fig. 4.5. We see that the agreement between our result and the prediction is remarkable (within 2% error on the scales from 30 to 120 h -1 Mpc).

For the background FLRW metric, the time, comoving distance, redshift and affine parameters along a photon trajectory are equivalent. However, accounting for perturbation disentangle these quantities and fixing one allow to study the others. We can launch photons in every direction, choose a stop criterion (either η, χ, z or λ) which become a hypersurface, and compute the relative difference of the other quantities on the sky w.r.t the homogeneous case. In Fig. 4.6, we fix the comoving distance and evaluate the other quantities. We first propagate a single ray in a highly refined, homogeneous grid where the potential and force are set to zero. This allow to compute homogeneous quantities. For a given value of the comoving distance, we can now propagate photons in the inhomogeneous light-cone and compute the relative difference with the homogeneous case.

We see in Fig. 4.6 that the relative difference for affine parameter and conformal time are respectively of the order of 10 -5 and 10 -4 at z ≈ 0.4. Of course the amplitude of fluctuations 1 These catalogs are available here 2018), we show the matter monopole autocorrelation at z = 0.34 computed on the unperturbed FLRW light cone compared with COSMICEMU (Heitmann et al., 2016). Subplot shows the relative difference.

increases with redshift and it would be interesting to estimate this effect for the CMB.

In what follows, we focus on configuration-space quantities sourced by halos and not DM particles because we want to stay closer to observables objects (the next step would be to populate these halos with galaxies).

Direct physical applications

We first illustrate direct applications of our data analysis: wide-angle RSD, low-redshift lensing and ISW/RS effect on galaxies. We then illustrate some non-trivial coupling between standard RSD and lensing: Doppler lensing. Finally in the next Section we will investigate relativistic RSD with all the effects together.

RSD

We can now investigate the effect of RSD on halo clustering. For each redshift perturbation we can generate a new dataset where the particles are displaced from the unperturbed case to the perturbed one. Then computing the 2PCF on each dataset allow to study the the imprint of each effect on the correlation function multipoles. In Fig. 4.7 we show the shape of the 2PCF for different cases.

As expected, the 2PCF with no perturbations has a spherical symmetry. The isotropy should be true in real space but in our case we are not exactly in real space but rather on the unperturbed light cone, meaning that there is still the effect from real space to the light-cone (Kaiser, 2013) which could break the isotropy. However this effect is small enough so that we cannot see clearly. On the middle panel of Fig. 4.7 we see the standard RSD term on halo 2PCF. We see the usual Kaiser effect squeezing the correlation function along the l.o.s. On the right panel we also see the FoG effect due to small-scale velocity dispersion. It is interesting Chapter 4. Results

to note that there are no FoG in the halo 2PCF, this is due to the halo-finder algorithm which only detects massive halos and merges sub-halos.

Computing the quadrupole of the 2PCF in redshift space, accounting for the Doppler effect allows us to test our methodology (velocity field for the simulation and ray-tracing catalogs). In 2018), absolute value of the quadrupole autocorrelation in redshift space (Doppler term only). Red full lines give the prediction from RegPT [START_REF] Taruya | Baryon acoustic oscillations in 2D: Modeling redshift-space power spectrum from perturbation theory[END_REF]Taruya et al., 2012). Black circles give the computation on the full light-cone. Purple triangles gives the computation using a weighted average on multiple light-cone shells.

The computation is done using halos with a linear bias b = 1.08.

We see that at large scales we have a good agreement with the RegPT code (Taruya et al., 2012) using PT with a 2-loop correction on the power spectrum and TNS model [START_REF] Taruya | Baryon acoustic oscillations in 2D: Modeling redshift-space power spectrum from perturbation theory[END_REF]. Overall it shows that the velocity field is properly estimated in our simulations. At smaller scales we see (as expected) discrepancies between the theoretical prediction and our computation. Thanks to the simulation we can determine the limit of validity of perturbative approach (here near 20-30 h -1 Mpc). Since our calculation includes wide-angle effects, it also shows that these effects are small below 120 h -1 Mpc. A more in-depth study on the perturbed light cone using odd multipoles, from linear to non-linear scales is done in [START_REF] Breton | Imprints of relativistic effects on the asymmetry of the halo crosscorrelation function: from linear to non-linear scales[END_REF].

Weak gravitational lensing

For lensing quantities we have seen the convergence power spectrum in Fig. 4.4 where the theoretical prediction comes from the public code NICAEA [START_REF] Kilbinger | Precision calculations of the cosmic shear power spectrum projection[END_REF] which goes beyond the Limber approximation to give a fully spherical treatment. We modified this code in order to give as an input the linear power spectrum of our simulation and in the non-linear regime we fitted HALOFIT [START_REF] Smith | Stable clustering, the halo model and non-linear cosmological power spectra[END_REF] parameters with RAYGALGROUP-SIMS snapshots power spectrum. In this way we can really focus on the lensing itself. We already had a good agreement with the theoretical prediction until the HEALPIX resolution. We also noted that using standard [START_REF] Smith | Stable clustering, the halo model and non-linear cosmological power spectra[END_REF] or [START_REF] Takahashi | Revising the Halofit Model for the Nonlinear Matter Power Spectrum[END_REF] parameters would yield a worse agreement than our procedure. This could be intuited since the photons propagate in a given simulation whose density field is governed by the power spectrum (and higher-order statistics). The prediction should therefore be computed with the simulation power spectrum if one wants to be accurate. In Fig. 4.9 we show the cosmic shear computed with about 7 × 10 6 halos on the full sky in a redshift bin z = [0.36, 0.48]. 10 0 10 1 10 2 θ (arcmin) 10 -7 10 -6 10 -5 ξ ± (θ) ξ + ξ - FIGURE 4.9: Cosmic shear correlation function computed in the RAYGAL-GROUPSIMS simulation with halos. Red solid line and blue solid line shows the theoretical predictions for respectively ξ + and ξ -using our calibration (using snapshots from the simulation) on HALOFIT for the power spectrum. In red dashed line and blue dashed line we show the prediction using the [START_REF] Takahashi | Revising the Halofit Model for the Nonlinear Matter Power Spectrum[END_REF] HALOFIT model for the non-linear power spectrum . The predictions where computed with a modified version of NICAEA [START_REF] Kilbinger | Precision calculations of the cosmic shear power spectrum projection[END_REF]. In red circles we have ξ + and in blue triangles ξ -.

We see an excellent agreement with the prediction accounting for the non-linear power spectrum calibrated on our simulations for ξ + over the whole range from 1 to 100 arcmin. The agreement with ξ -is good at scales over 10 arcmin, part of the small-scale discrepancy can be due to the limited sample. The error bars are likely under-estimated since they are computed with the jackknife method which is not accurate at small scales (Norberg et al., 2009). One of the conclusions of this study is that the cosmic shear predictions are very sensitive to the non-linear modeling of the power spectrum. To properly compare the results from ray-tracing in a simulation one should use the power spectrum from the same simulation. The parametrization from [START_REF] Takahashi | Revising the Halofit Model for the Nonlinear Matter Power Spectrum[END_REF] gives poor results at small scales. The discrepancy at small scales for ξ ± is probably due to the limits of the validity of our fit of the power spectrum of our simulations. The HALOFIT parameters were only adjusted up to k = 20 hMpc -1 . Moreover a (too) simple shot noise model was considered to subtract the noise. Precisely recovering the non-linear power spectrum of simulations is therefore mandatory in order to test lensing to high accuracy: this can be further investigated.

ISW/RS effect

Last, we want to emphasize the ISW/RS implementation. In the last Chapter we have seen two implementations of the ISW/RS effect. In particular, in the first method (Method 1, with one light-cone) we computed dφ/dλ using finite difference between two steps and then infer ∂φ/∂η. For the second method (Method 2, with two light-cones) we do the opposite, FIGURE 4.11: For a single photon we estimate the time derivative of the potential effect with two methods. In blue solid lines we have the ISW/RS effect computed with Method 1 while in red dashed lines we use the Method 2. In the left panel we follow the photon during its full propagation while in the right panel we zoom in a tighter redshift bin.

computing the time derivative of the potential using shell overlaps and then inferring the total derivative w.r.t the affine parameter. The computation of dφ/dλ is very important and should be carefully implemented if we wish to be the most accurate possible since this quantity is used in Eq. (3.35)-(3.36), therefore impacting the whole ray-tracing procedure.

Of course, the implementation of φ will also change and therefore we can study the effect of the implementations on the ISW/RS effect. This is shown in Fig. 4.11, where we follow .12: ISW/RS angular power spectrum at different redshifts. In black solid lines we have the linear prediction for the ISW effect. In red dotteddashed lines we have the angular power spectrum D = ( + 1)C /(2π) using Method 1 and in green dashed liens we have the angular power spectrum using Method 2.

the value of the integral of φ along the path of one photon. The ISW/RS effect has a "stair" shape (similar to dφ/dλ) using the Method 1. Indeed, φ is null in one shell, then changes sharply at the intersection between two shells. On average it gives the same results as the more accurate method but we expect discrepancies at small scales. On the other hand, the shape of the integral with Method 2 is smooth. In Fig. 4.10, we see the evolution of this quantity w.r.t the homogeneous redshift of one photon during its propagation. We see on the left panel that the overall shape is similar and that to notice differences we need to zoom as in the left panel. The implementation using Method 1 has a "stair shape" and oscillates around the smoother Method 2 implementation. We will see in more detail the reason we have this shape using the first method but we see that overall, the second implementation is much better as it does not contain artifacts. This stresses the importance of the implementation of very basic (but very important) quantities. This could be intuited since this is an exact estimation of the time derivative of the potential: we remind that to estimate φ in every cell we used shell overlaps, with two cells at the same spatial location but at different times. This implementation is very general and should 4.2. Direct physical applications 107 also work to investigate non-linearities. As we see in Fig. (4.12), for large separation we have similar results, however at small scales Method 1 has to much variance. This comes from the fact that for two close rays, if the ISW/RS effect is evaluated near the edge of a shell, therefore if one ray is in one shell and the other one is in another shell it will add a large φ term, which will add more power for small angular separation. To sum up, Method 1 is intuitive from a ray-tracing point of view, but one has to take care of the light-cone construction and acknowledge edges effect. We still note that for the low-ISW effect, the results are similar. On should take care of these effects to account for the RS effect. In Fig. 4.12, the agreement between both methods seems acceptable. However computing the relative error in Fig. 4.13 shows that we are overall above the percent error for > 50 at z = 0.2 and > 100 at z = 0.45.

However we see that the agreement becomes better for higher redshift, which makes sense since the ISW/RS effect is an integrated quantity and usually we are interested to estimate its angular power spectrum for the CMB at redshift ≈ 1100. That means that Method 1 should be accurate for the ISW effect for the CMB although for non-linearities it is mandatory to use another method. In practice, to compute the ISW/RS effect the community uses the method from [START_REF] Cai | Full-sky map of the ISW and Rees-Sciama effect from Gpc simulations[END_REF] where we need to compute the density and momentum field. The comparison this method with our exact computation using Method 2 will be investigated in the future. Using this method we are able to show that the RS contribution starts before = 100 and even dominates near this scale (for z = 0.45).

Doppler lensing

The interesting feature of our ray-tracing approach is to calculate WL and RSD at the same time. These kinds of couplings are often missed by studies which are specialized on one effect (WL or RSD). Lensing convergence can be inferred from the variation of the average angular size of a population of similar objects at the same redshift. However objects at the same observed redshift may not be at the same comoving distance and can therefore be seen as smaller (respectively bigger) if they move towards us (respectively receding from us). This leads to additional variance in the determination of convergence, proportional to the line of sight velocity and called Doppler convergence κ v . This term dominates the usual gravitational convergence κ g at low redshift [START_REF] Bonvin | Effect of peculiar motion in weak lensing[END_REF][START_REF] Bacon | Cosmology with Doppler lensing[END_REF].

To estimate the gravitational convergence power spectrum, we usually consider a constant homogeneous redshift but in order to be closer to observations we estimate the convergence at the constant inhomogeneous redshift (only accounting for the Doppler effect) in Fig. 4.14, meaning that we need to compute the velocity field in the simulation and compute the perturbed redshift during the ray-tracing. For this purpose we linked DTFE [START_REF] Schaap | Continuous fields and discrete samples: reconstruction through Delaunay tessellations[END_REF] to MAGRATHEA.

We see that the convergence power spectrum at constant inhomogeneous redshift has more power than the constant homogeneous redshift one. This is consistent with the fact that estimating the convergence at different comoving distances would add variance to the estimation. The relative difference increases with and reaches 2.5% at = 1000. We expect this effect to be smaller at high redshift, where the impact of perturbed hypersurfaces should be small compared to the value of the convergence (which increases in redshift as it is an integrated quantity). However at small scales it is relevant for precise estimation of the gravitational convergence power spectrum.

To estimate the Doppler convergence on the sphere we also need to evaluate the velocity field along the line of sight at any point. Knowing the velocity field we can compute the radial velocity field on the sphere (see Fig. 4.15), which is proportional to Doppler convergence and infer the C 's using HEALPIX. We see artifacts on the CIC velocity field map in Fig. 4.15. This comes from the fact that the velocity is set to zero in cells where there are no particle nearby. In Fig. 4.16 we compare the results from a smaller simulation (box of 656.25 h -1 Mpc with 1024 3 particles) at low redshift with different predictions such as linear theory, RegPT (Taruya et al., 2012) with 2-loop corrections and a fit given by [START_REF] Jennings | An improved model for the non-linear velocity power spectrum[END_REF].

For the predictions we first generated the associated 3D power spectrum and inferred the angular power spectrum using Eq. (2.35). To compute the velocity power spectrum we use

P v (k, z) =      H f D + (z) k 2 P δδ (k, z = 0) ; linear H f k 2 P θθ (k, z) ; nonlinear (4.1)
with θ = -∇v/(H f ) the normalized velocity divergence. We find that the linear prediction does not agree at all with the numerical results whereas the best agreement seems to be with RegPT 2-loops until ≈ 70 which corresponds approximatively to the limit of validity of perturbation theory at this redshift. The interesting point is that Doppler convergence is proportional to the velocity field meaning that we can, in principle, directly probe the velocity field at low redshift from WL and RSD coupling. This is an ongoing project as we will perform the same analysis on the larger simulation and improve the velocity-field estimation (using for example a phase-space interpolation method as [START_REF] Hahn | The properties of cosmic velocity fields[END_REF]. The comparison between accurate measurements of κ g and κ v will allow to extend the work of [START_REF] Bacon | Cosmology with Doppler lensing[END_REF] and [START_REF] Bonvin | Effect of peculiar motion in weak lensing[END_REF].

INTRODUCTION

Late time structure formation is a non-linear process which is very sensitive to the underlying cosmology. However we do not observe large-scale structures in themselves but rather an image of these objects via messengers (photons, neutrinos, gravitational waves, etc.). Most of our observations come from light, but the information transported by photons is altered during their path from the source to the observer. This leads to several distortions of the image and spectrum of the objects we are interested in. Because of lensing (Schneider et al. 1992;Bartelmann & Schneider 2001), the angular position as well as the shape/luminosity of objects can be modified: this is related to the bending of light near local energy overdensities and tidal deformations of light beams respectively. The observed redshift of an object is also perturbed by its proper motion, its gravitational potential and light propagation in time-varying potentials. As a consequence, the comoving radial distance inferred from redshift (assuming a given homogeneous cosmology) is also perturbed. The apparent distribution of structures is therefore modified by redshift perturbations and lensing: this ef-fect is called redshift-space distortions (RSD1 ) (Kaiser 1987;Hamilton 1992). RSD modify the position and properties of objects but also carry relevant cosmological information: studying these effects is a major contemporary challenge.

Early RSD studies only took into account peculiar velocities at linear order in the distant-observer approximation. However with the improvement of data precision more subtle effects need to be accounted for: in Szapudi (2004); Reimberg et al. ( 2016) the distant-observer approximation has been relaxed leading to a wide-angle calculation. In Pápai & Szapudi (2008); Raccanelli et al. (2016) a more sophisticated treatment of Doppler terms has been implemented and, in McDonald (2009) the effect of gravitational redshift has been included leading to an imaginary part of the power spectrum. However linear theory does not provide a fully satisfactory prediction since small scales are dominated by nonlinear clustering and large-scale modes can also be affected by smaller scale modes through mode coupling. In fact, nonlinear effects are already visible in real space at 100 h -1 Mpc scales in Baryon Acoustic Oscillations (BAO) (Crocce & Scoccimarro 2008;Taruya et al. 2012;Rasera et al. 2014). Moreover the mapping from real space to redshift space also becomes non-linear. The question of non-linearities has been addressed through semi-analytical approaches: either using different flavours of perturbation theory (Crocce & Scoccimarro 2006;Matsubara 2008;Carlson et al. 2009;Taruya et al. 2010Taruya et al. , 2012Taruya et al. , 2013;;Carlson et al. 2013), using streaming models (Scoccimarro 2004;Reid & White 2011), Effective Field Theory (Carrasco et al. 2012) or halo model (Tinker et al. 2008). Alternatively, N-body simulations have been performed (Tinker et al. 2006;Tinker 2007) to investigate RSD beyond the quasi-linear regime. One important limitation of most of these works is that only standard RSD have been considered (distant-observer approximation and no relativistic effects).

Recently, several authors computed the observed galaxy number count including all relativistic effects at first order in the weak field approximation (Yoo et al. 2009;Yoo 2010;Bonvin & Durrer 2011;Challinor & Lewis 2011). Given the complexity of the calculation, all the terms were computed using the linear regime approximation and, assuming a linear mapping between real space and redshift space. These works allow to better understand the relative amplitude of all the contributions to the multipoles of the observed galaxy power spectrum (or two-point correlation function) at large linear scales. Measuring the so-called relativistic effects (i.e. beyond standard RSD effects) in a galaxy survey would be exciting since it would provide alternative ways of testing the nature of gravity and of the dark sector. Unfortunately the (usually studied) even multipoles of the observed halo correlation function are dominated by standard RSD and the detection of such effects might be challenging.

While standard RSD generate only even multipoles, the relativistic and wide-angle effects generate an asymmetry in the observed galaxy distribution (i.e. odd multipoles) when cross-correlating two halo populations living in different environments (or more, Bonvin et al. 2016). Using a multipole expansion of the linear cross-correlation function including all relativistic terms, Bonvin et al. (2014) has shown that the dipole is dominated by relativistic terms (which scale as H/k, where H is the conformal Hubble constant and k is the wavenumber of interest). Without confirmation by simulation, the validity of these results was however limited to large linear scales (> 100 Mpc). At these scales the dipole generated by the gravitational potential is cancelled out because of velocity terms present in the Euler equation.

On the other hand at halo scale (< few Mpc), the asymmetry of the distribution of galaxies caused by the gravitational potential of galaxy clusters has been investigated through analytical models (Cappi 1995;Kaiser 2013;Zhao et al. 2013) and simulations (Cai et al. 2017). In these studies the relative shift between the mean redshift of two galaxy populations was considered instead of the dipole of the galaxy cross-correlation. Wojtak et al. (2011) claimed a detection of this effect by stacking galaxy clusters: this has provided an alternative way to test gravity in cluster although the exact interpretation of the measurement is debated (Kaiser 2013;Zhao et al. 2013). Croft (2013) proposed to use the same concept at larger scales in order to probe the gravitational redshift outside galaxy clusters. They introduce a new estimator since a clear boundary cannot be defined in the universe as is the case in galaxy clusters. The shell-estimator measures the relative shift of galaxy's redshift within spherical shells centred on galaxy clusters. In a recent paper, they have measured this estimator from snapshots of N-body simulations (Zhu et al. 2017). Because of the noise related to the limited size of the simulation, they have used an artificial boost factor to increase the signal-to-noise ratio. Interestingly, Alam et al. (2017) have claimed a detection of this effect within the SDSS survey. However, exact predictions for this estimator remains difficult at all scales (Giusarma et al. 2017). While predictions of the dipole at large linear scales are already well established, a clean dipole measurement from linear to non-linear scales within simulations (or observations) is still missing (Zhu et al. 2017;Gaztanaga et al. 2017;Alam et al. 2017).

In this paper, we directly measure the cross-correlation between two halo populations within the full-sky light-cone of a larger and more resolved simulation. We use sophisticated ray-tracing techniques to self-consistently include all relativistic effects at first order in the weak-field approximation. For the first-time, we fill in the gap between large-scale linear predictions of the dipole (dominated by the contribution from the divergence of the line-of-sights) and smallscale non-linear expectations (dominated by the contribution from gravitational redshift). We also decompose all the contributions to the dipole, compare them to linear theory and shed light on to new ones.

The paper is organized as follows. In Section 2 we review the theoretical predictions for dipole in the linear and non-linear regimes. We then present in Section 3 the methodology used to compute halo cross-correlation function from our simulated light-cone. In Section 4 we describe our halo catalogues and test our measurements. Finally in Section 5 we show the results of the dipole from linear to non-linear scales.

Relativistic effects: correlation-function dipole 3 2 THEORY

In this paper, we will consider a well defined mass-limited collection of haloes within a given cosmological volume. We will not consider observational effects such as selection effects, magnification-bias, absorption/diffusion of light, redshift errors or the fact that galaxies can be hidden if they are aligned along the line-of-sight.

Apparent halo overdensity: from real space to redshift space

We consider scalar perturbations of the Friedmann-Lemaître-Robertson-Walker (FLRW) metric in conformal Newtonian gauge. The metric reads (Ma & Bertschinger 1995)

g µν dx µ dx ν = a(η) 2 -(1 + 2ψ/c 2 )c 2 dη 2 + (1 -2φ/c 2 )δ i j dx i dx j , (1)
where a is the expansion factor, c is the speed of light, δ i j is the Kronecker delta, ψ and φ the Bardeen potentials (Bardeen 1980), x is the comoving position and η the conformal time. Using k ν k ν = 0 (where k ν are the components of the wavevector) and the lensing deviation equation we know that the apparent comoving position of a source is (Challinor & Lewis 2011)

s = χn+ c H δzn-n ∫ χ 0 (φ+ψ)/c 2 d χ - ∫ χ 0 ( χ-χ )∇ ⊥ (φ+ψ)/c 2 d χ , (2)
where n is a unit vector pointing towards the direction from which the unperturbed photon is coming and χ is the unperturbed comoving distance of the source. On the right hand side the first term x = χn is the unperturbed comoving position of the source, the second term is the distance perturbation along the line-of-sight due to redshift perturbation δz. The third term is the (small) Shapiro effect and the last term is the transverse displacement due to lensing.

For the redshift perturbation we will consider the usual first order terms plus the special relativistic transverse Doppler effect that can be a non negligible fraction of the gravitational redshift at small scales (Zhao et al. 2013)

δz = a 0 a v • n c - (ψ -ψ 0 ) c 2 + 1 2 v c 2 - 1 c 2 ∫ η 0 η ∂(φ + ψ) ∂η dη , ( 3
)
where v is the velocity and φ the potential. Quantities with the subscript "0" are evaluated at the observer location today. In the above expression, we have assumed a comoving observer. Assuming mass conservation gives

1 + δ (s) (s) d 3 s = 1 + δ (x) (x) d 3 x, (4)
where δ (s) and δ (x) are the matter density contrast respectively in redshift space and real space. We have

δ (s) = 1 + δ (x) |J | -1 -1, (5)
where J is the Jacobian of the transformation from real space to redshift space.

Two-point halo-halo cross-correlation function: linear theory

The halo-halo cross-correlation function between two halo populations h 1 and h 2 is given by

ξ h 1 h 2 ( ì r 2 -ì r 1 ) = δ h 1 ( ì r 1 )δ h 2 ( ì r 2 ) , (6)
with δ h i ( ì r i ) the overdensity of population i and the ensemble average. The cross-correlation function is related to the cross power spectrum through

δ (s) h 1 (k 1 )δ (s) * h 2 (k 2 ) = ∫ d 3 s 1 d 3 s 2 e -ik 1 s 1 e ik 2 s 2 δ (s) h 1 (s 1 )δ (s) h 2 (s 2 ) , (7)
where δ (s) (k i ) is the Fourier transform of δ (s) (s i ). To rewrite this expression in terms of real space quantities we can use Eqs. ( 4) and (5). Eq. ( 7) is the general formula for the power spectrum in redshift space but this leads to complicated mode couplings (Zaroubi & Hoffman 1996). In the linear regime, we can linearise the mapping between real and redshift space,

∆ (s) = ∆ (r) + 1 -|J |, (8)
where we use ∆ to denote the galaxy number count as an observable thus gauge invariant quantity. Assuming no velocity bias, the observed galaxy number count is given by the sum of the following terms (Challinor & Lewis 2011;Bonvin & Durrer 2011;Bonvin et al. 2014;Tansella et al. 2017)

∆ std = bδ - 1 H ∇ r (v • n), (9)
∆ acc = 1 Hc v • n, (10)
∆ q = - H cH 2 v • n, (11)
∆ div = - 2 H χ v • n, (12)
∆ pot,(1) = 1 Hc ∇ r ψ • n, (13)
∆ pot,(2) = H H 2 + 2c H χ ψ/c 2 - 1 Hc 2 ψ, (14)
∆ shapiro = (φ + ψ)/c 2 , (15)
∆ lens = - 1 c 2 ∫ χ 0 ( χ -χ ) χ χ ∇ 2 ⊥ (φ + ψ)d χ , (16)
∆ isw = 1 Hc 2 ( φ + ψ), (17)
∆ LC = v • n/c, (18)
with δ the matter density contrast and b a scale-independent bias. ∆ std is the standard contribution to RSD (Kaiser 1987), ∆ acc the contribution from the acceleration of sources, ∆ q the contribution related to the acceleration of the expansion of the universe, ∆ div the contribution from the divergence of line-of-sights due to a finite observer, ∆ pot,(1) the contribution from the gravitational redshift at first order in H/k, ∆ pot,(2) the contribution of the dominant terms in (H/k) 2 to the gravitational redshift, ∆ shapiro the contribution from the Shapiro time delay, ∆ isw the contribution from the Integrated Sachs-Wolfe effect, ∆ lens the lensing contribution equal to the lensing convergence as light-beam deformations modify the apparent source distribution, and ∆ LC the lightcone contribution as the observed position of sources on the light-cone is different from their position on constant-time hypersurfaces due to peculiar velocities (Bonvin et al. 2014).

A more refined calculation of this effect is given in Kaiser (2013). We neglect the following terms, which are the subdominant (H/k) 2 terms:

∆ neglect = H H 2 + 2c H χ 1 c 2 ∫ η 0 η ∂(φ + ψ) ∂η dη + 2 χc 2 ∫ χ 0 (φ + ψ)d χ . (19)
It is straightforward to see that these terms are subdominant: for the dipole the only contribution of integrated terms comes from the integration between χ-r/2 and χ+r/2 where χ is the pair centre and r the pair separation for the correlation function. We do not consider the term from transverse Doppler effect because it does not contribute to the correlation function in the linear regime. We also neglect higher order terms in redshift (see Ben-Dayan et al. 2012;Umeh et al. 2014). The linear correlation function of two different populations of galaxies is given by ξ = ∆ s 1 ∆ s 2 . In the following we will focus on the terms that generate an asymmetry

ξ A = i ∆ std 1 ∆ A 2 + (1) ↔ (2), (20)
where ∆ A is given by Eqs. ( 9) to ( 18). In the following, we will omit the subscript which indicates the halo population and we will implicitly assume that we perform the summation over the two populations (first and second term in the righthand side). Odd multipoles come from an asymmetry in the correlation function via exchange of pairs. If the position of each object of a pair is given by x 1 and x 2 we choose the convention x = (x 1 + x 2 )/2, r = x 2x 1 and µ = x • r, where a hat denotes a unit vector. The angle defined this way is symmetric under exchange of pairs and we therefore do not need any additional geometrical term for the dipole due to the choice of angle (Reimberg et al. 2016;Gaztanaga et al. 2017).

The contributions to the dipole are the following (Bonvin et al. 2014;Tansella et al. 2017),

ξ acc = -f 2 + f H + H H 2 f Gγ 1 1 (r), (21)
ξ q = H H 2 f Gγ 1 1 (r), (22)
ξ div = 2c H χ f Gγ 1 1 (r), (23)
ξ pot,(1) = 3 2 Ω m (z)Gγ 1 1 (r), (24)
ξ pot,(2) = - 3 2 Ω m (z) H H 0 Gγ 2 1 (r) 2c H χ + H H 2 -f + 1 , (25)
ξ shapiro = -3Ω m (z) H H 0 Gγ 2 1 (r), (26)
ξ isw = 3Ω m (z) H H 0 Gγ 2 1 (r) (1 -f ) , (27)
where we have f = ∂ ln D + /∂ ln a the linear growth rate, D + the linear growth factor,

G = (b 1 -b 2 ) H H 0 and γ m (r) = 1 2π 2 H 0 c m ∫ dk k 2-m j (kr)P(k, z). (28)
with j the th spherical Bessel function and P(k, z) the linear power spectrum at redshift z. A dot denotes a derivative w.r.t conformal time The wide-angle term, coming from the fact that two haloes have different line-of-sights, reads

ξ wa = - 2 5 (b 1 -b 2 ) f r χ γ 0 2 (r). (29)
The lensing term is given by (Matsubara 2000;Hui et al. 2007Hui et al. , 2008)

ξ lens = ∆ std ∆ lens = - 9 4 Ω m (z) rH c G (r, z), (30)
with

(r, z) = 1 2π H 0 c ∫ 1 -1 µ 2 dµ ∫ dk k J 0 kr 1 -µ 2 P(k, z). ( 31
)
J 0 is the Bessel function of the first kind of order 0. The lensing effect is due to the fact that galaxies on the far side of a massive halo look more spread out than the ones in front of the halo due to light bending. This generates an observed under-dense region on the far side of the halo which leads to a negative dipole. Following Bonvin et al. (2014), the lightcone term due to peculiar velocities is given by

ξ LC = -f Gγ 1 1 (r). (32)
The bias and growth factor are not constant. This leads to evolution terms

ξ evo1 = r 6 (b 1 -b 2 ) f -f (b 1 -b 2 ) γ 0 0 (r) - 4 5 γ 0 2 (r) , (33)
ξ evo2 = r 2 b 1 b 2 -b 1 b 2 γ 0 0 (r), (34)
where an apostrophe denotes a derivative w.r.t comoving distance. We find it convenient to split the evolution term in two parts because they appear in different configurations (depending on the velocity field) as we will see in Section 5. In computing Eqs. ( 35) and ( 36), while we use the bias parameter directly measured from our simulation, the comoving distance derivative of the bias is estimated from theoretical model, since the measured comoving distance derivative is basically noisy (see Fig. A1). Here, we specifically use the model given by Sheth & Tormen (1999):

b ST = 1 + dν 2 -1 δ c + 2 p/δ c 1 + (dν 2 ) p , (35)
where p = 0.3, d = 0.707, δ c = 1.673 for the ΛCDM cosmology that we used, ν = δ c /σ(M, z) and σ(M, z) = σ(M, 0)D + (z).

Finally we get

b ST = 2H f cδ c dν 2 -2 p 2 (dν 2 ) p (1 + (dν 2 ) p ) 2 . ( 36
)
We verified that this value is in agreement with the derivative computed from our simulation (see Appendix A). Note that in order to compute the full correlation function it is also possible to use the pressureless Euler equation

v • n + Hv • n + ∇ r ψ = 0.
We sum up in Table 1 the linear regime contributions Table 1. Dipole prediction table for the linear regime. This table indicates which terms to consider when predicting the dipole for a specific choice of angle (θ or β) and redshift (z i ) which are given by Eqs. ( 44) to (49). A cross shows if a term should be added to the prediction, while a zero indicates that the term should not be taken into account.

ξ pot,(1) ξ pot,(2) ξ acc ξ q ξ div ξ wa ξ LC ξ isw ξ lens ξ evo1 ξ evo2 flrw= (β, z 0 ) 0 0 0 0 0 0 × 0 0 0 × (β, z 1 )-flrw : Potential only (1) × 0 0 0 0 0 0 0 0 0 0 (β, z 1 )-flrw : Potential only (2) × × 0 0 0 0 0 0 0 0 0 (β, z 2 )-flrw : Doppler only 0 0 × × × × 0 0 0 × 0 (β, z 3 )-flrw : Transverse Doppler only 0 0 0 0 0 0 0 0 0 0 0 (β, z 4 )-flrw : ISW only 0 0 0 0 0 0 0 × 0 0 0 (θ, z 0 )-flrw : Lensing only 0 0 0 0 0 0 0 0 × 0 0 (θ, z 5 )-flrw : All 2 × × × × × × 0 × × × 0
to the dipole predictions used in this paper. The dominant term for large separation is ξ div . It is related to a geometrical effect due to the divergence of line-of-sights for an observer at finite distance. However this is not a "wide-angle" term. Indeed, even if we consider the pairs to be aligned the effect does not vanish. It comes from the fact that an element of volume seen under a given solid angle is perceived as less dense when receding from us and similarly is perceived as denser when coming towards us. This generates an overall positive dipole while the usual wide-angle term produces a negative dipole.

To infer the final prediction, we computed the linear theory prediction at 200 redshifts between the limits of our survey and took the volume average. Indeed, for some of the dipole terms, it is not equivalent to computing the prediction at the volume averaged redshift. Throughout the paper we always consider the case b 1 > b 2 .

Two-point halo-halo cross-correlation function: non-linear regime

Starting from Eq. ( 6), two difficulties arise in the non-linear regime of structure formation. The evolution of the matter fields (density, velocity and potential) becomes non-linear. Moreover, the mapping from real space to redshift space becomes non-linear too. A vast literature has addressed these questions in the context of the standard RSD with distant observer approximation (i.e. Doppler effect along one fixed direction). A naive perturbation theory expansion provides poor results because of Finger-of-God effect. Taruya et al. (2010) have developed a perturbation-based theory where the damping is characterised by a univariate function with one single free parameter. This model performs well in the quasi-linear regime. It however needs to be extended to include wide-angle effect and other relativistic effects. We plan to work on these aspects in the future. Another approach to the non-linear regime is to rewrite redshift-space distortions in the context of the streaming model. Following Scoccimarro (2004) the observed (Doppler-only) correlation func-2 Using the Euler equation, this term becomes: All = ξ pot,(2) + ξ q + ξ div + ξ waξ LC + ξ isw + ξ lens + ξ evo1 tion ξ st d s is given (in the distant observer approximation) by

1 + ξ std s (s ⊥ , s ) = ∫ 1 + ξ(r ⊥ , r ) P(v 12 |r ⊥ , r )dv 12 , ( 37
)
where the apparent position in redshift space is decomposed into a component perpendicular to the line-of-sight (s ⊥ ) and along the line-of-sight (s ), the real-space position is also decomposed as r ⊥ = s ⊥ and r = sv 12 /H, v 12 is the pairwise velocity along the line-of-sight and P(v 12 |r ⊥ , r ) is the pairwise-velocity Probability Distribution Function (PDF) at the position (r ⊥ , r ) in real space. This decomposition is exact even at non-linear scales. However one still needs to predict the PDF of the pairwise velocity using halo model or perturbation theory. Again an extension to wide angles is still missing as it is quite challenging. The detailed analytical modelling of the non-linear velocity PDF which is highly non-Gaussian (Scoccimarro 2004) (plus possible wide-angle effects at intermediate scales) is beyond the scope of this paper and we leave it for future work. However, as we will see the contribution from gravitational redshift dominates the dipole at small non-linear scales: we have therefore focused on this specific contribution. Taking into account the PDF of the gravitational potential at a given pair separation P(φ 12 |r ⊥ , r ), a general expression to the halo-halo correlation function with potential-only RSD is given by

1 + ξ pot s (s ⊥ , s ) = ∫ 1 + ξ(r ⊥ , r ) P(φ 12 |r ⊥ , r )dφ 12 , (38)
where r ⊥ = s ⊥ , r = s + φ 12 /(cH) and φ 12 is the difference of potential between the two halo populations. We assume a simple spherical model to derive the potential difference as a function of radius. Following Croft (2013), the PDF of the potential difference is a single-valued function which depends only on pair separation. The contribution from the potential difference φ 12 to the halo-matter correlation function (no velocity), is given by

M 12 (< r) = 4π ρ ∫ r 0 (ξ h 1 m (x) -ξ h 2 m (x))x 2 dx, ( 39
)
φ 12 (R) = -G ∫ R 0 M 12 (< r) r 2 dr, (40)
ξ pot,sing s (s ⊥ , s ) = ξ(r ⊥ , r ), (41)
where ξ hm is the monopole of the halo-matter correlation function, M 12 (< r) is the enclosed mass, G is the gravitational constant, R = r 2 ⊥ + r 2 , r ⊥ = s ⊥ and r = s + φ(R)/(cH). ξ hm is taken as the maximum between the linear prediction bξ mm and a spherical NFW profile (Navarro et al. 1997) with a concentration parameter given by Zhao et al. (2009). This model is an approximation as the distribution of matter is not spherical (Cai et al. 2017), the PDF of the pairwise potential is not single-valued and the halo profile can deviate from NFW (Balmès et al. 2014). Croft (2013) have also taken into account both the standard and (single-valued) potential contributions to the dipole with a simple streaming model. However they have neglected wide-angle effects, other relativistic effects and they have assumed a simple exponential model for the pairwise velocities. To conclude, a full model of the crosscorrelation function with all relativistic effects in the nonlinear regime is still missing. We will use cosmological simulations to address this regime including all contributions.

METHODS

The numerical setup is described in the three following subsections. In the first subsection, we introduce the new large N-body simulation that we have performed. It is part of the Raygalgroupsims 3 suite of simulations dedicated to ray-tracing studies (Breton et al., in prep). This simulation gives us Lagrangian and Eulerian quantities within snapshots (volume at constant times) and light-cones (volume as seen from an observer located at the centre of the box, a point further away from the centre being seen further back in time). In the second subsection, we use Magrathea 4 (Reverdy 2014), a ray-tracing library integrating photon paths using geodesic equations on the light-cones. Searching for the geodesics connecting a given observer to all detected haloes, we compute the seen angle and the observed redshift (which are different from the true angle and comoving redshift provided directly by the simulation). The ray-tracing gives us catalogues of apparent redshift and angular positions (z, θ, φ). In the last subsection, we introduce the correlation function estimator.

We would like to point out that in the following we use the Newtonian gauge to interpret the data from N-body simulation. In principle this can lead to errors in redshift due to the fact that in this gauge there are relativistic corrections at the horizon scale. To be perfectly rigorous we should interpret the position of particles in the N-body gauge (Fidler et al. 2015(Fidler et al. , 2016)). The difference of interpretation comes from the fact that contrary to the Newtonian gauge, the Nbody gauge leaves the spatial volume unperturbed in a similar way to Newtonian simulations. To account for relativistic corrections in Newtonian gauge we could also apply a timeindependent displacement on the particle position (Chisari & Zaldarriaga 2011) which depends on the initial particle 3 Ray-tracing Galaxy Group Simulations, soon available at http: //cosmo.obspm.fr/ 4 https://github.com/vreverdy/magrathea-pathfinder/

The version used for this work is currently very different from the master branch, however they will be synchronised soon distribution. However as shown by Adamek et al. (2016a,b); Adamek (2017) these gauge effects are small compared to the effects we are interested in, meaning for this work we can safely use the Newtonian gauge to interpret the data from our Newtonian simulation.

N-body simulation

The simulation used in this work consists in a dark-matter only simulation with 4096 3 particles within a volume of (2625 h -1 Mpc) 3 . The corresponding particle mass-resolution is 1.88 × 10 10 h -1 M . The final number of AMR (Adaptive Mesh Refinement) cells is 0.4 trillion and the spatial resolution reaches 5 h -1 kpc. We use CAMB (Lewis et al. 2000) to compute the initial linear matter power spectrum for a ΛCDM cosmology (seven-year WMAP data, Komatsu et al. 2011) with Hubble parameter h = 0.72, matter density Ω m = 0.25733, baryon density Ω b = 0.04356, radiation density Ω r = 8.076×10 -5 , slope of the primordial power spectrum n s = 0.963 and normalisation σ 8 = 0.801. Initial conditions were generated with a second-order Lagrangian perturbation theory (2LPT) version of MPGRAFIC (Prunet et al. 2008) at a redshift z start = 46.

Dark matter particles were evolved with an improved version of the particle-mesh adaptive-mesh-refinement (PM-AMR) N-body code Ramses (Teyssier 2002). We borrow the Triangular Shape Cloud assignment routine from Li et al. (2012) in order to make the density, potential and force more isotropic than with the standard Cloud In Cell assignment.

During the simulation, ∼50 snapshots (particles) and 3 light-cones (particles and gravity cells) with different depths and apertures were written. The light-cones were built using the onion-shells technique (Fosalba et al. 2008(Fosalba et al. , 2015a,b;,b;Teyssier et al. 2009). In this article, we focus on snapshots between z = 0.5 and z = 0 and the full-sky light-cone up to z max = 0.5. Choosing this maximum redshift ensures that we avoid any replica in the light-cone. The light-cone consists in ∼ 300 shells (i.e. every coarse time-step): this ensures a good time-resolution.

We use pFoF 5 [START_REF] Roy | pFoF: a highly scalable halo-finder for large cosmological data sets[END_REF]), a parallel friend-offriend algorithm to detect haloes both in snapshots and light-cones. We adopt a standard linking-length of b = 0.2 times the mean inter-particle separation and we only pick haloes with more than 100 particles (to guarantee that haloes are sufficiently sampled).

Last, we note that we use a Newtonian simulation and therefore the two Bardeen potentials are equal.

Ray-tracing

The goal of ray-tracing is to make a connection between sources and observers. There are many approaches to raytracing. The most basic approximation (widely used in analytical works) is the Born approximation where deflections and lensing are computed from integral along the undeflected path. Within simulations a commonly used method consists in splitting the universe in several thin lenses orthogonal to the direction of observation (multiple lens formalism, [START_REF] Hilbert | Ray-tracing through the Millennium Simulation: Born corrections and lens-lens coupling in cosmic shear and galaxy-galaxy lensing[END_REF]). The light is assumed to move in straight lines between lenses while being deflected when crossing the lenses. Lenses are usually flat and plane-parallel, thus inducing error for large angles. Moreover the potential is often computed by solving a 2D Poisson equation on the lens (instead of a 3D one). In order to deal with wide-angle effects an onion-shells technique has been implemented (Fosalba et al. 2008(Fosalba et al. , 2015a,b;,b;Teyssier et al. 2009) with spherical lenses. More recently the ray-tracing algorithm has been ported within Ramses in order to use the accurate 3D potential from the simulation (Barreira et al. 2016). In most of the works, lensing is computed using integral along the light-ray while redshift perturbations are computed independently, only considering the Doppler effect.

Our method consists in unifying deflection, lensing and redshift calculation by directly solving geodesics equations. While this approach is usually done in the field of general relativity, it is not common within cosmological simulations. To our knowledge, this approach has been introduced by Killedar et al. (2012) using a fixed grid resolution and limited-size simulation. Here we use Magrathea, a hybrid MPI/pthreads C++11 ray-tracing library to propagate photons on null geodesics within the hierarchy of AMR grids [START_REF] Reverdy | Propagation de la lumière dans un Univers structuré et nouvelles approches numériques en cosmologie[END_REF]. Using adaptive mesh is crucial to fully resolve lensing, potential and velocity profiles near haloes. We note that there has been a recent resurgence of interest for a relativistic approach to ray-tracing within cosmological simulations (Giblin et al. 2017 has solved optical scalar equation with a full general relativistic code at low resolution; Borzyszkowski et al. 2017 has solved it at higher resolution but using Born approximation).

A detailed description of our fast and very accurate ray-tracing library based on template-meta-programming is available in [START_REF] Reverdy | Propagation de la lumière dans un Univers structuré et nouvelles approches numériques en cosmologie[END_REF], we now review some of its specialities. The light-cone provides a regular grid at coarse level with refinement in high density areas. In each cell of the grid we have a, φ, ∂φ ∂x , ∂φ ∂y , ∂φ ∂z respectively the scale factor of the shell, the potential and derivatives of the potential with respect to spatial Cartesian coordinates of the simulation box. In order to propagate light-rays we interpolate these quantities at the photon space-time location and solve the geodesic equations. In this work, we chose the linear interpolation for space and nearest-neighbour interpolation for time. Higher order interpolation are interesting prospects for future work, but for this paper we will not consider it. Photons are launched backward in time (backward ray-tracing) from the light-cone centre at z = 0 with a given k i (spatial part of the wavevector) and initially setting g µν dx µ dx ν = 0. We then let Magrathea solve the linearised geodesic equations with the metric given by Eq. (1),

d 2 η dλ 2 = - 2a a dη dλ dη dλ - 2 c 2 dφ dλ dη dλ + 2 ∂φ ∂η dη dλ 2 (42) d 2 x i dλ 2 = - 2a a dη dλ dx i dλ + 2 c 2 dφ dλ dx i dλ -2 ∂φ ∂ x i dη dλ 2 ( 43
)
where λ is the affine parameter along the photon path.

As we are interested in source-averaged observables rather than direction-averaged ones (Kibble & Lieu 2005), we now describe recent modifications of the solver to build a catalogue of sources including all relativistic effects. To find the null geodesic connecting a source and the observer, we launch several photons from the observer to the tenta- The first ray will generally miss the source, we then iterate using Newton's method in order to get a new initial angle.

In this example we iterate twice to find a ray close enough to the source at the same radius, the initial angle of ζ 2 is given by θ and is interpreted as the seen angle.

tive directions of observation of the source. Then using a root finder, the geodesics intersecting both the source and observer world lines are identified. In practice, we assume that sources are present at any time (as opposed to an event which corresponds to a specific space-time location). Moreover, since sources are moving, we use a nearest-neighbour interpolation for the time location of the source. Because sources are moving slowly and light-ray deflections are small, the sources lie very close the null FLRW light-cone. A refinement would be to linearly interpolate the position of particles between two light-cones at different times. Moreover, we only search for one geodesic for each source since we focus on large scales, dominated by the weak lensing regime: generalisation to strong lensing (i.e. multiple geodesics for one source) is straight-forward with enough resolution. We leave these possible refinements for future work. Let a halo be at location (X, Y, Z) on the light-cone. For an observer at the centre of the simulation, the two components of the true angle β are (assuming the same convention as for lensing):

β 1 = arctan (Y /X), β 2 = arccos (Z/R) where R is the comoving distance R = √ X 2 + Y 2 + Z 2 .
We expect the lensing deviation to be small, we thus launch the photon in the direction β, but the ray is deflected and does not reach the position (X, Y, Z). As shown in Fig. 1, we iterate on the initial launching conditions using a root-finder method (Newton's method in our case) to find the initial angle that minimizes the angle difference between β and the position of the photon at same radius. In practice only one or two iterations are needed to get an angle difference lower than 10 -2 arcsec. With this method we know the true angle β and the seen angle θ. We can then directly derive the Jacobian matrix A i j = ∂β i ∂θ j , hence the distortion matrix (related to lensing). This way of computing the lensing directly from a beam of light rays (instead of integrating Sachs equation) is similar to the ray-bundle approach (Fluke et al. 1999;Fluke & Lasky 2011) except that the geodesic equations are directly integrated.

To gain comprehension on the various contributions to the total redshift we decompose it as follows:

z 0 = a 0 a -1, (44)
z 1 = a 0 a 1 + φ o /c 2 -φ s /c 2 -1, (45)
z 2 = a 0 a (1 + v s • n/c) -1, (46)
z 3 = a 0 a 1 + 1 2 v s c 2 -1, (47)
z 4 = a 0 a 1 - 2 c 2 ∫ η o η s φdη -1, (48)
z 5 = (g µν k µ u ν ) s (g µν k µ u ν ) o -1, (49)
with

g µν k µ u ν = -ack 0 1 + φ/c 2 + v • n/c + 1 2 v c
2 and the observer velocity set to zero. Each redshift corresponds to a specific contribution. z 0 is the redshift directly inferred from the scale factor. However this scale factor is related to the conformal time computed until arriving at the source, using the geodesic equation Eq. ( 42). It therefore implicitly takes into account time delay. z 1 only includes the gravitational redshift perturbation, z 2 the Doppler perturbation, z 3 the transverse Doppler perturbation and z 4 the ISW perturbation. z 5 is the exact general relativity redshift computation. It almost corresponds to z 0 plus all redshift perturbations above. The ISW effect is hidden in the k 0 term, which comes directly from our geodesic integration.

Finally, ray-tracing gives us catalogues with β, θ, A i j , various redshifts containing each terms of Eq. ( 3) and the number of dark matter particles for each halo. In these catalogues all the relativistic effects have been computed in a self-consistent way. These catalogues 6 will be described in detail in Breton et al. (in prep).

Estimation of the correlation function

The halo-halo two-point cross-correlation function ξ h 1 h 2 (r) = δ h 1 (x)δ h 2 (x + r) is a measure of the excess of probability relative to a Poisson distribution of finding a pair of haloes separated by a vector r. For a statistically homogeneous and isotropic field the correlation function can be written as ξ h 1 h 2 (r) since it only depends on the norm r of the separation. However the presence of an observer breaks the isotropy and one needs to specify two components of the separation vector r, for instance its norm r and projection µ along the line-ofsight.

To estimate the correlation function we used a modified version of Cute (Alonso 2012) (a parallel tree-code paircounting algorithm). It implements an LS estimator (Landy & Szalay 1993;Kerscher et al. 2000), which is one of the most commonly used estimator for the correlation function (since its variance is almost Poisson),

ξ LS = D 1 D 2 -D 1 R 2 -R 1 D 2 + R 1 R 2 R 1 R 2 , ( 50
)
6 http://cosmo.obspm.fr/raygalgroupsims-relativistic-hal o-catalogs

where D 1 , D 2 refer to different datasets to be cross-correlated while R 1 and R 2 are the associated random catalogues. Moreover the pair counts are normalised by the total number of pairs in the catalogues. Since we are interested in correlation function anisotropies, we bin in (r, µ). Once we compute ξ(r, µ), we deduce the multipoles as

ξ (r) ≈ 2 + 1 2 1 µ=-1 ξ(r, µ)L (µ)∆µ, (51)
where L (µ) is the Legendre polynomial of order .

We have cross-checked the results of this direct paircounting method to a grid method. In this method the halo density is estimated on a thin Cartesian grid using a Cloudin-Cell assignment scheme. The correlation function is then directly computed from its definition as a function of the over-densities of the halo populations. The two methods give very similar results. With the intention of comparing to linear theory we estimated the linear bias b i for data-set data H i (see Appendix A for more details),

b 100 ≈ ξ =0 h 100 h 100 ξ =0 mm , ( 52
) b i ≈ b 100 ξ =0 h i h 100 ξ =0 h 100 h 100 , (53)
where ξ =0 hh and ξ =0 mm are the halo-halo and matter-matter correlation function monopole respectively. The bias is estimated by fitting a constant to Eq. ( 53) for r between 25 and 75 h -1 Mpc. Below 25 h -1 Mpc the number of pairs is too low and the correlation function may fluctuate while above 75 h -1 Mpc the Poisson noise becomes non negligible

The last point concerns the estimation of statistical errors. Running again the same heavy simulation being much too time consuming, we estimate the variance using the jackknife method, as it is the internal method that minimizes most of the variance for the linear regime according to Norberg et al. (2009). In this paper we compute the jackknife method with 32 re-samplings. We then estimate the variance of the correlation function as follows,

σ 2 (r) = N -1 N N k=1 (ξ k (r) -ξ (r)) 2 , ( 54
)
with N the number of re-samplings, k the sample number and ξ (r) the mean correlation function given by

ξ (r) = 1 N N k=1 ξ k (r). (55)
It is important to note that the variance estimated with Eq. ( 54) is good enough in the linear regime where the density field is Gaussian but becomes much less accurate for smaller scales, in the non-linear regime. In this regime error bars should be taken with caution.

In the linear regime, we note that the theoretical predictions for the cross-correlation dipole are proportional to the bias difference (except for evolution effects). Therefore, normalising by this quantity should give the same signal for each pair of populations. We take advantage of this feature by using a weighted average of the normalised dipole for all mass combinations to increase our signal to noise ratio. In the linear regime, the mean signal is computed as

ξ lin 1 /∆b = i j ξ i j 1 b i -b j 1 σ 2 i j i j 1/σ 2 i j , ( 56
)
where b i and b j are the bias of different halo populations. ξ i j

1 is the dipole of the cross-correlation between two halo populations of bias b i and b j , and σ 2 i j its variance normalised by the bias difference. The variance of the weighted average dipole is

σ 2 = 1 i j 1/σ 2 i j . (57)
The error bars are probably underestimated due to the lack of independence.

DATA AND VALIDATION

We now proceed to the presentation and validation of our datasets. In Section 4.1 we introduce the halo catalogues and in Section 4.2 we validate our two-point correlation measurements on the monopole and quadrupole.

Datasets

We consider haloes between z min = 0.05 and z max = 0.465 (hereafter, when we refer to the full light-cone we mean the light-cone between these two redshifts), leading to a volume of 8.34 (h -1 Gpc) 3 . We choose redshift limits which are not too close to the observer to avoid issues when computing angles, and not too close from the edge of our full-sky lightcone to avoid edge effects. We also focus on haloes with mass between 1.9 × 10 12 h -1 M and 1.2 × 10 14 h -1 M . The total number of haloes in this volume is 1.2 × 10 7 leading to a mean halo density of n ≈ 5 × 10 -4 Mpc -3 . We divide the halo catalogue in six logarithmic mass bins as shown Table 2. data H N represents catalogues of haloes sampled by a number of dark matter particles between N and 2N. We cross-correlate all the datasets, with 15 linear bins in r going from 0 to 150 h -1 Mpc for large scales and 8 linear bins from 0 to 32 h -1 Mpc for smaller scales. We also use 201 bins in µ. For computations on the full light-cone we generate a random catalogue for each dataset with more than 2. The distributions from least to most massive haloes population are shown in black, purple, blue, green, orange and red. The distributions are normalised so that the integral is unity.

ten time the number of haloes. The redshift distribution for random catalogues follow the same distribution as the associated data catalogue. To avoid losing information on the clustering along the line-of-sight, the redshift distribution is smoothed using 8 redshift bins as shown in Fig. 2.

Otherwise, if our computation is done with shell averages we use a random catalogue with 10 8 object with a uniform distribution.

Monopole and quadrupole validation

Matter auto-correlation monopole on the light-cone

We first check our measurement of the well-known matter auto-correlation monopole. Out of the ≈ 30 billions particles in the light-cone we randomly pick 10 8 that we ray-trace. We expect this catalogue to be representative of the general distribution of dark matter in the simulation. We compute the monopole on our full light-cone using 10 9 particles for the random catalogue with a uniform distribution (since the mean matter density does not evolve with redshift), and we compare to the real-space prediction at the volume averaged redshift (the light-cone effect being negligible for this multipole). For the prediction we use the emulator CosmicEmu (Heitmann et al. 2016) which agrees with our power spectrum computation for different snapshots at percent level between roughly k = 0.02 hMpc -1 and k = 2 hMpc -1 . The result is shown in Fig. 3. The monopole of the matter autocorrelation is in good agreement (better than two percent) with the emulator in the range r = 20 -120 h -1 Mpc.

Halo auto-correlation monopole and quadrupole in redshift space

In this section we want to validate our monopole and quadrupole measurements in redshift space taking only into account the effects of peculiar velocity e.g. the standard RSD effect. We compute the correlation on the full light-cone and the errors bars are estimated with the jackknife method. (Heitmann et al. 2016). Subplot shows the relative difference.

For the quadrupole in redshift space we have subtracted the real-space quadrupole.

To predict the monopole (Fig. 4) and quadrupole (Fig. 5) in redshift space we use the RegPT+TNS (Taruya et al. 2010(Taruya et al. , 2012(Taruya et al. , 2013) ) model with the measured linear bias and the parameter characterising the damping of small-scale clustering σ v = 5.204 h -1 Mpc, which is estimated from the linear theory assuming that haloes trace dark matter flow. We compute the prediction at the volume averaged redshift. The prediction is supposed to be accurate in the weakly nonlinear regime, which roughly corresponds to the scales larger than 30 h -1 Mpc for this redshift. Note that the validity of the prediction relies on the assumption of linear bias and on the distant observer approximation.

We have a very good agreement on the redshift-space monopole and a good agreement for the quadrupole, although we see a small discrepancy at large scales which might be due to the cosmic variance of the measurement results or alternatively to the presence of a finite distance observer. Our procedure is therefore fully validated.

Finally we have also checked that the relative amplitude of effects beyond the standard Doppler RSD are of order of ∼ 10 -2 (monopole) or ∼ 10 -3 (quadrupole). Disentangling these effects from the main contribution is therefore a challenge. We now focus on the dipole where the standard Doppler contribution vanishes in the distant-observer limit.

RESULTS

We are now interested in the dipole. In order to investigate this multipole we will split it into three parts. The first part is the one generated by statistical fluctuations in real space. This is mostly interesting for the comparison to observations. It can be minimized by increasing the statistics (number and density of haloes). The second part is generated when the halo catalogue is projected from real space to the unperturbed FLRW light-cone. This part is a small contribution to the dipole which has to be taken into ac- Red full lines give the prediction from RegPT+TNS (Taruya et al. 2010(Taruya et al. , 2012(Taruya et al. , 2013)). Black circles give the computation on the full light-cone.

count when making accurate predictions. The third part of particular interest in this paper is the dipole generated by the perturbation of the FLRW light-cone (at first order in the weak-field approximation) related to the formation of large-scale structures in the universe.

In what follows, we compare our results with the linear theory predictions presented in Section 2.2, and summarised in Table 1. In the predictions including evolution terms (i.e. Eqs. 33 and 34), the comoving distance derivative of the bias changes the amplitude of dipole correlation, and the resultant prediction does not simply scale as ξ 1 ∝ ∆b. We thus plot the averaged prediction as well as the maximum and minimum of the predictions among possible combination of haloes, filling up the interval with gray shade (Fig. 8, upper-right panel of Fig. 10, and Fig. 11).

In Section 5.1 and 5.2 we focus on the dipole at large scales. At these scales the theoretical predictions are proportional to the bias difference between two halo populations (except for evolution effects). We take full advantage of all the cross-correlations by using them to compute the weighted dipole normalised by the bias difference (see Section 3.3). Each cross-correlation are shown in Appendix C. In Section 5.3 we investigate the dipole at smaller scales where non-linearities arise. For these scales we show the dipole and its mass dependence.

Statistical fluctuations and light-cone effect

In this section, we measure the dipole of the halo distribution using snapshot information (i.e. distribution of haloes at constant time). We consider 7 snapshots in the interval between z = 0.05 and z = 0.465. For each snapshot, we build a shell of size of order ∼ 300 h -1 Mpc centred on the comoving distance corresponding to the snapshot redshift. In this way, we are able to compute the mean dipole in real space. We can also compare the dipole computed at constant time to the one computed on the FLRW unperturbed light-cone at the same position (see Fig. 6).

Dipole generated by statistical fluctuations

After averaging the snapshot dipole computed in each shell (with a weigh given by the volume of each shell), we obtain the mean snapshot dipole. The standard errors on the mean are computed from the 7 snapshots and should therefore be taken with caution because of the lack of independence. For a wide range of radii (20 < r < 150 h -1 Mpc) the dipole shown in Fig. 7 is roughly compatible with zero within the statistical error bars (except for several points at 100 and 130 h -1 Mpc where the error bars are very likely underestimated). Moreover the error bars are limited to ∼ 2 × 10 -4 .

In principle, for a very large volume and for a very large density of haloes, the dipole tends towards zero. For finite volume surveys with finite number of galaxies per unit of volume such a fluctuation might blur the dipole. However, this noise can be minimized by increasing the size of the surveys and the density of pairs of haloes (smaller haloes, more halo populations, see Bonvin et al. 2016). As we will see for our light-cone, the noise is below the signal but it can sometimes reach the same order of magnitude as the signal. Increasing the halo statistics by a factor of ∼ 10 should be enough to boost the signal-to-noise ratio. In our simulation, we have simply subtracted this noisy contribution to extract the physical part of the dipole signal.

Light-cone and evolution effects

In this section, we compute the dipole within the shells in the light-cone and the corresponding shells in the snapshots. By subtracting the two we can extract the so-called light-cone effect (Kaiser 2013;Bonvin et al. 2014). The main contribution to this effect is related to the peculiar motions of haloes: haloes are not at the same position in the snapshot (constant time) and in the FLRW light-cone. Another contribution comes from the evolution effects: haloes are not exactly the same in the snapshot and light-cone as they experience merging.

While the light-cone effect has already been taken intoaccount in simulations (Cai et al. 2017;Zhu et al. 2017), our approach is more sophisticated since we have directly built the light-cone on the fly during the simulation (at each coarse time-step). In previous work, the light-cone effect was added as a post-processing procedure on top of the snapshots. This approach usually neglects the variation of the potential during the evolution. Moreover, evolution effect are not easily captured while they are a direct outcome of our approach.

As shown in Fig. 8, the light-cone effect (plus evolution effect) is in agreement with the linear expectation (see first line of Table 1) while error bars remain important and the points at small scales seem to depart from the averaged prediction. The normalised dipole is of order 10 -4 at most. As we will see later it is a subdominant contribution to the full dipole. The linear prediction is broad due to evolution effects which are not proportional to the bias difference. For the cross-correlation of the two most massive halo populations the evolution effect is of the same order as the light-cone effect. This shows the importance of an accurate modelling as well as precise bias measurement to disentangle these two effects.

Last, there is a difference between the particle positions on the FLRW light-cone given by the simulation and the particle position on the perturbed FLRW light-cone seen by photons due to time delay (Shapiro effect). However this contribution is too small to be detectable (inferior to 10 -5 ) as seen in Fig. 9 and will therefore be neglected.

The linear regime and its breakdown

From now on, we subtract the effects from statistical fluctuations as well as the light-cone effect described above. In this section we investigate the dipole at large scales from 20 h -1 Mpc to 150 h -1 Mpc. This corresponds to the linear regime (Section 2.2) and the beginning of the quasi-linear regime where, in principle, linear theory does not hold any more. We focus on the weighted average of the normalised dipole. Each cross-correlation is shown in Appendix C.

Contributions to the dipole at large scales

At first order in the metric perturbation, redshift-space distortions are the sum of five contributions: four redshift per- turbations (see Eqs. 44 to 49) plus the lensing effect which affects the apparent position of haloes (we neglect the small Shapiro term which is already subtracted). To investigate each of these effects we have produced five catalogues where only one effect is present at a time. This allows us to compare our measurements to the linear predictions summed up in Table 1 as shown in Fig. 10.

The upper left panel shows the dipole when we only consider the gravitational potential as a source of RSD. We find a good agreement at large scales with linear theory (even better with higher-order terms in H/k) down to a radius r ≈ 60 -80 h -1 Mpc where ξ 1 /∆b ≈ 5 × 10 -5 . The dipole drops sharply at smaller scales and even becomes negative at scales smaller than 30 h -1 Mpc. Linear theory fails to predict this drop. As we shall see, it is the second most important contribution to the total dipole at large scales. Figure 8. Light-cone-effect contribution to the dipole of the cross-correlation function, normalised by the bias. We use a weighted average of all the cross-correlations as well as a weighted average on 7 redshift shells. The linear prediction given by the first line of Table 1 is shown by the grey filled curve (as the prediction is not completely proportional to the bias difference) while the averaged prediction is shown with black solid line.

is much larger rising from ξ 1 /∆b ≈ 2 × 10 -4 at 100 h -1 Mpc up to ξ 1 /∆b ≈ 10 -3 at 20 h -1 Mpc. Data points and linear prediction are in agreement when looking at the scatter (except for two points at 65 and 75 h -1 Mpc which are at about 3σ above the linear expectation). This is the dominant term and it is mostly related to the divergence of the line-of-sights at this redshift (this term is inversely proportional to the comoving distance and is therefore fainter at higher redshift). In the middle left panel we only consider the transverse Doppler term which should be null in the linear regime. Our measurement is consistent with zero between r ≈ 60 h -1 Mpc and r ≈ 150 h -1 Mpc at a precision better than 2 × 10 -6 . Below 60 h -1 Mpc the data show a positive dipole. The transverse Doppler yields an overall redshift of the lighter galaxies w.r.t to the more massive ones which is The prediction for this effect is shown in Section 2.2. This contribution is very small and will be neglected afterwards.

explained (at smaller scales) by Zhao et al. (2013). In the middle right panel we see the dipole of the ISW/RS effect only. This effect is integrated and suppressed by a factor H/k compared to the other terms and is therefore expected to be small. Here we only check the consistency with zero that is given on the full scales of interest with a precision of order 5 × 10 -6 . Bottom left shows the effect of weak lensing only. This effect is much fainter than the potential and Doppler terms and the data clearly favours a negative dipole of order of a few 10 -6 which follows well the linear prediction.

Lastly, the bottom right panel shows the residual, i.e. the full dipole including all effects (full redshift perturbations and lensing) minus the individual contributions mentioned above. It includes all the cross-terms (potential-Doppler, potential-lensing, etc...) as well as the non-linear mapping that was ignored by the linear calculation. We see that the residual is consistent with zero to a good precision beyond 50 h -1 Mpc. However below this threshold the residual gives a negative contribution to the total dipole. We expect this term to be dominated by the potential-Doppler cross-correlation term as they are the two dominant terms. We can see that the departure of the residual from zero occurs at approximately the same scale as the departure of the dipole for the potential only term from the linear prediction. It indicates a failure of the linear regime at this scale. In Appendix C we show the behaviour of the residual for a wide range of cross-correlations. Depending on the values of bias and bias difference, the amplitude of the signal as well as the scale at which the residual departs from zero can change.

Total dipole

Now that we have seen all the individual contributions to the dipole, we show the final result that is the sum of all the previous contributions (see Fig. 11). As we expected the dipole is dominated by the Doppler term as the effects of the others terms are small. However the dipole departs from linear theory near 30h -1 Mpc due to the non-linear contribution from the potential and residual. In Bonvin et al. (2014) the authors claim that a measurement of the total dipole in the linear regime will allow us to probe velocity field and to test general relativity (through the Euler equation). As we have seen to reach this goal, one has to pay attention to real-space statistical fluctuations of the dipole (therefore huge sample and survey volume are mandatory), evolution effect (as we need to properly model bias evolution while for the moment we are limited to simple phenomenological models) and the bias itself (as the linear prediction is proportional to the bias difference between the population and simple scale-independent bias models are considered).

From quasi-linear scales to non-linear scales

After investigating the linear regime (beyond 50 h -1 Mpc) and its breakdown (at 40-60 h -1 Mpc scales for the potential contribution and the residual ), we now focus on the transition from quasi-linear to non-linear scales between 30 h -1 Mpc and 5 h -1 Mpc. We use the conservative lower bound of 5 h -1 Mpc because it stands well above the coarse grid size (0.6 h -1 Mpc), beyond halo's virial radii (∼ 0.9 h -1 Mpc for large group-size haloes) and it is larger than the light-cone shell size (∼ 4 h -1 Mpc). In this regime, we expect baryonic effects to be negligible although this has to be further investigated with dedicated simulations.

The theoretical predictions are not necessarily proportional to the bias difference, thus showing the weighted average of the normalised dipole would not make much sense.

Here we focus on the cross-correlation of data H 1600 (halo mass M h1 ≈ 4.5 × 10 13 h -1 M ) with data H 100 (halo mass M h2 ≈ 2.8×10 12 h -1 M ), which gives a bias difference ∆b ≈ 1.

Contributions to the dipole at small scales

The various contributions to the dipole are shown Fig. 12. The dominant contributions at non-linear scales (especially at r < 10 h -1 Mpc) are very different from the ones at linear scales. Here the dominant contributions are the potential term (upper left) and the residual (bottom right) while in the linear regime the dominant contribution is the Doppler term (upper right). Moreover both contributions are very negative resulting in a negative dipole.

The potential contribution (upper left) drops slowly from ξ 1 0 near 30 h -1 Mpc to ξ 1 -1 × 10 -4 at 20 h -1 Mpc. The fall is then much steeper at smaller separations, from ξ 1 -5 × 10 -4 at 14 h -1 Mpc down to ξ 1 -6 × 10 -3 at 6 h -1 Mpc. We also note that the measurement is very robust since the statistical error bars are very small (although error bars should be taken with caution at these scales). The linear prediction completely fails. The dipole of the halo-halo cross-correlation is a sensitive probe of the gravitational potential up to about ten virial radii for this halo mass.

The velocity contribution (upper right) remains high ξ 1 5-20×10 -4 between 30 and 6 h -1 Mpc. At smaller scales the error bars increase from σ ξ 5 × 10 -4 to σ ξ 5 × 10 -3 at smaller scales. Interestingly the Doppler-only dipole remains close to the linear expectation.

The transverse-Doppler contribution to the total redshift in the vicinity of galaxy clusters has originally been highlighted by Zhao et al. (2013). However it was restricted to the region r < 2 R vir inside or close to the virial radius R vir ∼ 1 -2 h -1 Mpc of the clusters. Interestingly, the transverse-Doppler contribution to the dipole (middle-left) is non-zero even at very large radii (r > 2 R vir ). It remains positive of order ξ 1 2-6×10 -5 at radii 14 < r < 30 h -1 Mpc. At smaller scales there is strong increase from ξ 1 = 2 × 10 -4 at 14 h -1 Mpc to ξ 1 = 5 × 10 -4 at 6 h -1 Mpc. The ratio to the potential contribution to the dipole is of order -10 at this scale.

The ISW contribution (middle right) and lensing contribution (bottom left) are consistent with zero at small scales. The size of the error bars provide an upper limit for the signal of ξ 1 < 5 × 10 -5 for ISW and ξ 1 < 10 -4 for lensing. It is still in agreement with the linear prediction which is of the same order of magnitude, however the fluctuations are too important to measure the signal.

Surprisingly, the residual (bottom right) is of the same order as the potential contribution (from ∼ -10 -4 at 30 h -1 Mpc to ∼ -6 × 10 -3 at 6 h -1 Mpc). This is an important result of this paper. It means that at these scales and especially below 15 h -1 Mpc, one cannot add up all the contributions one by one. On the contrary, there are some important contributions involving both potential terms and velocity terms together.

Total dipole

The total dipole at non-linear scales is presented Fig. 13. It remains slightly positive of order ξ 1 ∼ 1 × 10 -3 above 15 h -1 Mpc. As shown in the previous section, this is related to the velocity contribution which remains positive in this region. At smaller scales, the potential contribution dominates over the velocity contribution. The total dipole is then falling down quickly to ξ 1 ∼ -1 × 10 -2 at 6 h -1 Mpc. Moreover within our simulated survey of 8.34 (h -1 Gpc) 3 , error bars (mostly related to the fluctuations of the velocity field) are smaller than the signal at this scale. The dipole of the group-galaxy cross-correlation function is therefore a good probe of the potential far outside of the group virial radii.

Interestingly, deviations from linear theory are mostly governed by the potential and by the residual. The interpretation of the dipole is therefore non-trivial because of correlations between potential and velocity terms. However the dipole carries important information about the potential.

Mass dependence of the contributions

So far, we have focused on the cross-correlation between haloes of mass ∼ 4.5 × 10 13 h -1 M and haloes of mass ∼ 2.8 × 10 12 h -1 M . In Fig. 14, we investigate the halo mass dependence of the main dipole contributions (velocity, potential). The mass dependence on the residual is shown in Appendix C. We explore various configurations by cross-correlating all the different halo populations with the lightest halo population. At large linear scales the variation of the dipole is mostly governed by the bias difference between the two halo populations, however at small non-linear scales the evolution of the dipole is less trivial. The velocity contribution to the dipole does not evolve strongly with halo mass. It stays bounded in the range 0 < ξ 1 < 1 × 10 -3 . On the other hand, the potential contribution becomes more negative at larger mass from ξ 1 -5 × 10 -4 to ξ 1 -1 × 10 -2 at 6 h -1 Mpc. It means that for massive enough haloes the potential contribution dominates over the velocity contribution for a wide range of scales (as seen previously). However for haloes lighter than ∼ 10 13 h -1 M the velocity-contribution dominates. The residual also departs from 0 at larger radii for heavier haloes. Interestingly it is mostly following the potential contribution.

The prediction of the potential effect from Eq. (41) (assuming spherical symmetry) reproduces the trend at a qualitative level. However the potential contribution is overestimated. Taking into account the dispersion around the potential deduced from spherical symmetry as in Eq. ( 38) should improve the agreement with the measured dipole (Cai et al. 2017). Note that we have checked (see Appendix B) that our conclusions still hold for a very different halo definition (i.e. linking length b = 0.1). The main difference is a slightly better agreement with the spherical predictions for the potential contribution to the dipole.

CONCLUSIONS

In this work we explored the galaxy clustering asymmetry by looking at the dipole of the cross-correlation function between halo populations of different masses (from Milky-Way size to galaxy-cluster size). We took into account all the relevant effects which contribute to the dipole, from lensing to multiple redshift perturbation terms. At large scales we obtain a good agreement between linear theory and our results. At these scales the dipole can be used as a probe of velocity field (and as a probe of gravity through the Euler equation). However one has to consider a large enough survey to overcome important real-space statistical fluctuations. It is also important to take into account the light-cone effect and to accurately model the bias and its evolution.

At smaller scales we have seen deviation from linear theory. Moreover the gravitational redshift effect dominates the dipole below 10 h -1 Mpc. It is therefore possible to probe the potential outside groups and clusters using the dipole. By subtracting the linear expectation for the Doppler contribution it is in principle possible to probe the potential to even larger radii. This is a path to explore in order to circum-vent the disadvantages of standard probes of the potential, usually relying on strong assumptions (such as hydrostatic equilibrium) or being only sensitive to the projected potential (lensing). A simple spherical prediction allows to predict the global trend of the dipole but not the exact value. More- over as we have seen the residual (i.e all the cross terms and non-linearities of the mapping) is of the same order as the gravitational potential contribution and should be taken into account properly. At small scales the pairwise velocity PDF is also highly non-Gaussian, leading to high peculiar velocities and Finger-of-God effect. Coupled to gravitational potential and possibly wide-angle effect we expect this to be a non-negligible contribution to the dipole. To fully understand and probe cosmology or modified theories of gravity at these scales using the cross-correlation dipole we therefore need a perturbation theory or streaming model which takes into account more redshift perturbation terms and relaxes the distant observer approximation. This will be the focus of a future paper.

There are multiple possible extensions to this work. At large Gpc scales current analysis are limited by the volume of the simulation as well as gauge effect. At smaller scales the baryons as well as the finite resolution effect might play a role. Extension of this work in these two directions can open interesting perspectives. When analysing future surveys, it is also important to consider observational effects. One possibility would be to populate haloes with galaxies and to incorporate effects such as magnification bias, absorption by dust, redshift errors, alignment of galaxies, etc. Another straight-forward extension is to explore the influence of cosmology, dark energy, dark matter and modified gravity on the dipole of the halo cross-correlation to shed light on the nature of the dark sector with future large scale surveys. an enclosed over-density very roughly of order of 200 times the mean density of the universe, b = 0.1 corresponds to an enclosed over-density much larger (approximately 8 times more). Most of the usual halo definitions lie somewhere in between these two definitions. The datasets are shown in Table . B1, where the bias is computed on the full light-cone contrarily to previous datasets where the bias was estimated by interpolating between snapshots. For previous datasets these two methods agree at the 1% level.

For linear scales, on a qualitative level the results are similar to the ones using another halo definition. Quantitatively, it seems that we slightly under-estimate the Doppler effect. The remarks on the full dipole shown in Fig. B2 are also similar. More interestingly, for the quasi-linear and nonlinear regime in Fig. B3 we can notice three things. First the results are qualitatively similar the haloes with b = 0.2. Second there is a better agreement with b = 0.1 with the spherical prediction for the non-linear dipole for the potential only term. This is due to the fact that haloes are now more clustered and sit in deeper potential wells, enhancing the amplitude of the dipole. Still we see that it does not match completely the theoretical prediction. Last, we see that similarly to b = 0.2, the point at 6 h -1 Mpc for Doppler only is very negative for the last correlation (most massive halo population with the lightest). This may be due to a coupling between Finger-of-God and wide-angle effects.

APPENDIX C: MASS DEPENDENCE OF THE DIPOLE

In Section 5.1 and 5.2, we presented the computation of the dipole normalised by the bias difference. To do so we used all the cross-correlations available with our datasets shown in Table 2. We then performed a sum on the dipoles, weighted by the inverse of their variance (see Section 3.3). In this Section we show the different cross-correlations for each perturbation effect, and for every combination of populations at large scales. We show the results for the computation of the cross-correlation on the full light-cone using jackknife re-sampling. Left panels: gravitational potential only, dotted lines gives the spherical prediction computed using Eq. ( 41). Middle panels: Doppler only. For massive enough halo the negative potential contribution dominates over the positive Doppler contribution.The linear prediction is given by dashed lines. Right panels: residual term. In the bottom plot of the middle column, the point at 6 h -1 Mpc is at ξ 1 = -0.03.

MNRAS 000, 1-21 ( 2018) During this thesis the guiding thread was to understand: what do we really observe from LSS and how does it give us cosmological information? To investigate this question we have performed large N-body simulations (RAYGALGROUPSIMS) to beat statistical errors and numerical systematics. We have detected ten millions of halos on the unperturbed fullsky light-cone up to z = 0.5. By launching millions of light-rays following the weak-field geodesics equation of GR we have replaced these halos on the perturbed light-cone taking into account relativistic effects (WL, Doppler effect, transverse Doppler effect, gravitational redshift, ISW/RS). This ray-tracing procedure produced two kinds of data: catalogs of halos with relativistic redshift-space distortions but also maps of relativistic effects (by launching light-rays in the direction of HEALPIX pixel).

To produce the catalogs we have implemented an algorithm to find null geodesics between observer and sources, accounting for all the perturbations at first order in the weakfield approximation. We have also computed the WL distortion matrix and the ISW/RS effect with a minimal number of assumptions. It allowed us to recover known results (as cosmic shear) but also explore new probes, for example the dipole of the halo crosscorrelation function. For the first time, we characterized the dipole from linear to non-linear scales for every unique perturbation, allowing to confirm the agreement with linear theory at large scale. At smaller non-linear scales, we have shown an important deviation from linear theory: the effect from gravitational redshift as well as the coupling between gravitational redshift distortions and Doppler redshift distortion dominate. The dipole can therefore be a new probe of the potential and velocity fields. Theoretical work still needs to be done to go beyond standard RSD at quasilinear and non-linear scales in order to understand and finally extract cosmological information from the asymmetry of galaxies at small scales. However this work is very promising in the view of billion galaxies surveys to come in the next decade. There are of course many other applications to these catalogs. For the moment, our sources are either DM particles or halos, hence for the future a natural extension for the catalogs would be to populate halos with galaxies, accounting for the luminosity function (and therefore magnification threshold and magnification bias) as well as other observational effects.

With the maps, we have estimated the RS effect at low redshift. We have also explored the question of the stopping criterion for photons related to the choice of constant hypersurfaces in a inhomogeneous universe. In particular, we observe objects at a given inhomogeneous redshift, different from its homogeneous hypersurface. To account for this effect we implemented two methods for velocity field estimations which is a non-trivial numerical problem. The velocities are used to stop photons at the inhomogeneous redshift of interest using standard RSD. This allow us to evaluate quantities in a more realistic way (closer to observations) and to estimate the error we make by considering a homogeneous-redshift hypersurface. In particular, it gives a unified treatment of RSD and WL, leading to the effect of RSD on WL observables such as Doppler lensing.

There are many possible applications of this work by cross-correlating all observables (related to all the relativistic effects) for different sources (voids, galaxies, groups, clusters, filaments, sheets, Lyman-α forest, CMB, intergalactic medium, etc.) at various space-time location (early universe, reionization, late universe, etc.). These are all possible new probes of the dark sector.

To extend this work, we could explore smaller scales (below the Mpc) and larger scales (beyond the Gpc). At small scales, we need to account for baryonic physics using hydrodynamical simulations while at large scale we need to account for gauge issues and possibly other relativistic effects (vector, tensor or higher order perturbations). Our tools could easily adapt to these problems since photons are insensitive to the nature of matter, meaning we would not need to change anything with hydrodynamical simulations. For large scales, we would need to perform the ray-tracing in a GR simulation in the proper gauge (modification of geodesics equation).

To conclude, there is still a lot to be done to understand the nature of the dark sector. Tensions between CMB and WL measurements show that we need more robust probes to test the standard ΛCDM model as in this thesis but also, which could be interesting for me in the future, theories of modified gravity, exotic fluids, backreaction and many more. . . du CMB fait intervenir uniquement la théorie linéaire et est donc « simple » à interprêter.

Puisque qu'il y a des fluctuations de densité, la métrique va également être perturbée et réciproquement, les perturbations métrique vont contribuer à l'effondrement gravitationnel des grandes structures. Nous perturbons donc faiblement la métrique (nous sommes donc en champs faible) et faisons un changement infinitésimal de coordonnées. Nous voyons que des perturbations scalaires, vecteurs et tenseurs sont générées et qu'il y a dégénerescence entre perturbations venant du changement de coordonnées et celles venant de perturbations métriques. Nous devons donc faire un choix de jauge qui permet d'écrire la métrique d'une façon qui sera pratique selon le système qui nous intéresse. De plus nous utilisons le formalisme 3+1, dans lequel, au premier ordre, les différents types de perturbations sont découplées. Nous présentons notamment la jauge Newtonienne que nous utilisons au long du cette thèse: ici nous prenons uniquement en compte les perturbations scalaires, avec une métrique diagonale. Dans cette jauge les potentiels peuvent être reliés aux potentiels de Bardeen, qui sont des quantités invariantes de jauge et égales si il n'y a pas de pression anisotrope.

A partir de là nous nous intéressons à la dynamique des grandes structures. Nous écrivons les équations de l'hydrodynamique dans un espace-temps en expansion. Dans le régime linéaire nous explicitons les équations habituelles concernant l'évolution du champs de densité. Le régime non linéaire est plus difficile à caractériser et nous montrons une méthode pour « corriger » la théorie linéaire afin de prendre en compte ces non linéarités. A partir de là nous nous intéressons aux propriétés statistiques du champs de densité : pour cela nous utilisons la fonction de corrélation à deux points qui, pour une échelle donnée, nous donne le degré d'inhomogénéité de l'univers (par rapport à une distribution Poissonienne). Alternativement nous montrons également le spectre de puissance qui est la transformée de Fourier de la fonction de corrélation. Le spectre de puissance est une quantité centrale en cosmologie, qui caractérise complètement un champs gaussien (pour un champs non-gaussien nous aurions besoin d'aller à un ordre supérieur).

Après la dynamique des grandes structures nous nous intéressons à la cinématique des photons. Les photons se propagent sur des géodésiques nulles. Nous dérivons les équations des géodésiques et en explicitons les perturbations. Les photons sont déviés par les masses le long de son trajet, et voit leur énergie se modifier dû à maints effets. Cela veut dire que la position observée d'un objet sera différente de sa position « comobile » ou « vraie » position, à cause justement de ces effets lors de la propagation de la lumière. Il y a à la fois une perturbation au niveau de l'angle observé d'une source (effet de lentillage gravitationnel faible) et sur la distance radiale d'un objet (perturbation en redshift). Ce sont les effets qui nous intéressent dans cette thèse. En plus de modifier la position apparente des objets, leurs propriétés (forme, luminosité) sont également modifiées. Pour cela nous explicitons le formalisme du lentillage gravitationnel faible et de déformation des faisceaux lumineux dû aux effets de déviations différentielles (ou effets de marée). Ces effets font qu'une source peut avoir l'air plus petite (respectivement plus grosse) et donc moins lumineuse (respectivement plus lumineuse) qu'elle ne l'est effectivement. Cet effet est appelé « convergence gravitationelle ». De plus, la forme des objets devient elliptique, nous parlons alors de « cisaillement gravitationnel ». Nous présentons ensuite les outils statistiques nécessaires à l'extraction d'informations venant de ces mesures de convergence et cisaillement. Pour finir, nous présentons le Doppler lensing: soit l'effet Doppler appliquée à la convergence. Si la convergence est calculée via la fluctuation de la taille des objets, il faut également prendre en compte que les différentes sources au même redshift observé ne sont pas à la même distance comobile : cela ajoute un terme de convergence effective, non négligeable à bas redshift (et souvent ignoré).

Après la propagation des messagers nous voyons plus en détail ces effets de distorsion dans l'espace des redshifts. Habituellement, cela est fait en prenant en compte uniquement l'effet Doppler, cependant au premier ordre nous pouvons ajouter l'effet du redshift gravitationnel, l'effet Sachs-Wolfe intégré ainsi que l'effet Doppler transverse. Ces perturbations vont se retrouver dans la statistique du nombre de galaxies observées dans un volume infinitésimal. Cela est également porteur d'informations pour la cosmologie. En général, nous pouvons extraire le taux de formation des structures via le quadrupole de la fonction de corrélation à deux points. En prenant en compte les effets relativistes nous voyons qu'il y a une asymmétrie qui apparaît dans la fonction de corrélation croisée des galaxies, et le dipole généré nous permet en théorie de sonder le potentiel gravitationnel dans le régime non linéaire et le champs de vitesse dans le régime linéaire, il s'agit donc d'une sonde nouvelle et intéressante que nous avons étudiée pendant cette thèse, cela a nécessité l'utilisation de méthodes numériques.

A.3 Méthodes

Pour résoudre le régime non linéaire de la formation des structures nous utilisons des simulations N-corps de matière noire uniquement (la physique baryonique étant négligeable pour les effets qui nous intéressent aux échelles cosmologiques et sa prise en compte nécessiterait des ressources au délà des supercalculateurs actuels). Dans notre cas nous utilisons RAMSES, un code N-corps Newtonien utilisant une méthode PM-AMR (avec maillage adaptatif). Nous partons d'une distribution initiale de particules données par une cosmologie de référence (ici WMAP7). Afin d'obtenir la distribution initiale nous déplaçons les particules grâce au spectre de puissance linéaire au redshift auquel débute la simulation. A partir de la distribution des particules nous pouvons interpoler leur densité au centre des cellules du maillage de la simulation. A partir de la densité nous pouvons estimer le potentiel via l'équation de Poisson. Par la suite nous pouvons avoir le gradient du potentiel et donc la vitesse via l'équation du mouvement. A partir de la vitesse nous pouvons déplacer les particules au pas de temps suivant et enfin nous pouvons réitérer ce processus jusqu'au redshift final. D'une telle simulation nous calculons le spectre de puissance à chaque snapshot (ou boite de simulation à temps donné). De plus nous caractérisons les halos de matière noire grâce à l'agorithme FoF sur les snapshots et sur le cone de lumière (construit via la concaténation de couches en redshifts à des temps différents).

A partir du cone de lumière nous pouvons faire du ray-tracing, ou suivi de rayons lumineux dans la simulation. Pour cela nous utilisons le code MAGRATHEA, développé par [START_REF] Reverdy | Propagation de la lumière dans un Univers structuré et nouvelles approches numériques en cosmologie[END_REF]. Cette bibliothèque a été développée pour le calcul de hautes performances et est basée sur une conception d'arbres avec un accès aux données très rapide. Dans le présente thèse nous avons utilisé cette bibliothèque afin d'ajouter des modules de lentillage gravitationnel faible ainsi que les distorsions dans l'espace des redshifts. En particulier, nous avons développé une méthode pour connecter l'observateur (au centre de la simulation) et les sources via les géodésiques nulles. Cela nous permet de simuler des observables sur le cone de lumière de façon précise en prenant en compte les effets relativistes. Nous générons des catalogues de particules ou halos, prenant en compte les effets de perturbations sur la position observée avec grande précision. L'effet Sachs-Wolfe intégré est calculé en utilisant une nouvelle méthode qui permet une grande généralité et nous donne accès au régime non-linéaire (effet Rees Sciama). Nous prenons également en compte les effets de lentillage gravitationnel au niveau de la forme des sources et de leur position. De plus nous générons A.4. Résultats 159 des cartes HEALPIX (cartes angulaires) de différentes quantités sur le ciel. Enfin, nous avons également implémenté le calcul du champs de vitesse dans la simulation afin d'arrêter les photons sur différentes hypersurfaces. En effet, dans un univers inhomogène, les hypersurfaces redshift, facteur d'échelle, distance et paramètre affine constant sont différentes et l'étude de cette perturbation est intéressante et nécessite le champs de vitesse.

Grâce à ces outils nous pouvons générer de nouvelles observables, cependant nous devons toujours en extraire des quantités intéressantes qui seront confrontées aux prédictions théoriques, et cela se fait via une analyse statistique. Ici nous explicitons les outils utilisés (en particulier la fonction de corrélation à deux points) et leur implémentation.

A.4 Résultats

Dans cette section nous montrons les résultats produits durant cette thèse, en particulier le ray-tracing sur la grande simulation de la suite RAYGALGROUPSIMS que nous avons réalisé, avec une taille de boite de 2625 h -1 Mpc et 4096 3 particules. Nous avons ensuite produit des catalogues de 10 millions de halos avec les effets relativistes (sur tout le ciel). Dans un premier temps nous comparons différents spectre de puissances venant de snapshots à des redshfits qui nous intéressent car ils sont ceux qui sont dans les limites de notre cone de lumière « fullsky ». Nous trouvons un très bon accord avec un émulateur et avec HALOFIT que nous avons re-paramétrisé avec notre simulation.

Ensuite nous montrons l'importance de la grille adaptative : avoir ce raffinement dans les zones très dense nous permet d'avoir une meilleure estimation du potentiel et de sa dérivée, ce qui est important pour la propagation des photons. En particulier nous montrons que sans la grille AMR le spectre de puissance de la convergence n'est juste qu'à bas (ou large séparation angulaire). Cela est dû au fait que à trop basse séparation les photons se propagent dans les mêmes cellules grossières et donc les effets de déviation différentielle sont faibles, la variance dans l'estimation de la convergence et donc la puissance du spectre s'en trouve atténuée.

Par la suite nous montrons que nous avons un bon accord entre le monopole de la fonction de corrélation à deux points de la matière et un émulateur, cela est intéressant car cela montre qu'il n'y a à priori pas de problèmes au niveau de la construction du cone de lumière ou des outils d'analyse.

Nous passons ensuite à la question des hypersurfaces. Pour une valeur de distance comobile donnée, nous nous intéressons à la différence relative du paramètre affine par rapport à sa valeur dans le cas homogène. Pour z = 0.37, nous trouvons des différences de l'ordre de 10 -5 , tandis que pour la différence relative du temps conforme nous trouvons des différences de l'ordre de 10 -4 . Cette question des hypersurfaces peut être intéressante par exemple pour le CMB.

Par la suite nous montrons la différence relative entre le spectre de puissance de la convergence évaluée à redshift homogène constant ou à redshift observé constant. Nous constatons une différence de 2% à = 1000. Le spectre angulaire est souvent préféré au spectre de puissance 3D car ce dernier n'est pas observable. Le fait que le spectre de puissance soit observable est également une question d'hypersurface sur laquelle est évaluée la quantité scalaire que nous voulons étudier. Dans ce cas, pour que le spectre de puissance angulaire soit observable il faut évaluer les différentes quantités sur l'hypersurface redshift observé.

Concernant les catalogues produits, nous montrons le bon accord avec la théorie de perturbations non linéaire concernant la quadrupole de la fonction de corrélation dans l'espace des redshifts en prenant en compte uniquement l'effet Doppler. Cela nous permet de voir que le champs de vitesse est à priori bien calculé dans la simulation.

Nous montrons ensuite le spectre de puissance angulaire de l'effet Sachs-Wolfe intégré avec différentes méthodes, pour lesquelles nous avions discutés des forces et des faiblesses. Nous trouvons un bon accord dans le régime linéaire entre les deux mais notre nouvelle méthode est plus précise à petite échelle et permet d'explorer le régime non linéaire.

Enfin nous nous intéressons au Doppler lensing, pour lequel nous montrons le spectre de puissance angulaire du champs de vitesse radial pour plusieurs estimations du champs de vitesse (en utilisant un CIC ou DTFE), comparé à différentes prédictions théoriques (théorie linéaire, fit de simulation et théorie des perturbations avec correction à deux boucles). Nous trouvons que à bas redshift, l'accord avec la théorie linéaire est très mauvaise tandis que l'accord avec la théorie des perturbations est meilleure jusqu'à la limite de validité de cette méthode à ce redshift.

Enfin, nous terminons cette partie par l'article produit pendant cette thèse, qui s'intéresse en particulier au dipole de la fonction de corrélation croisée à deux points des halos, en prenant en compte les effets relativistes. L'idée est de sonder directement le potentiel des structures de l'unviers indépendamment des lentilles gravitationnelles. Pour cela nous nous intéressons à l'effet notamment du redshift gravitationnel sur la distribution des halos et l'impact de ces effets sur la fonction de corrélation croisée des halos. Cet effet relativiste (entre autres) génère des multipoles impairs à la fonction de corrélation et est donc moins sensible aux effets de vitesse particulières que les multipoles pairs. A grande échelle nous avons un accord avec la théorie linéaire tandis qu'à petite échelle (où il y a une domination claire du potentiel gravitationnel) la théorie linéaire ne tient plus. De plus, nous remarquons que les termes croisés doppler-potentiel sont du même ordre de grandeur que l'effet du potentiel uniquement. Ceci montre l'importance de prendre en compte cet effet pour l'interprétation des données et l'estimation du potentiel via le dipole de la fonction de corrélation croisée des halos.

A.5 Conclusion

Pendant cette thèse nous avons voulu comprendre ce que nous osbervons réellement des grandes structures et comment cela nous donne des informations cosmologiques. Pour cela nous avons produit une grande simulation numérique afin d'avoir suffisamment de statistiques pour étudier les effets fins sur les perturbations de densité. Nous avons reconstruit le cone de lumière perturbé grâce à des méthodes de ray-tracing sophistiquées, en intégrant la trajectoire des photons sur des géodésiques nulles et en connectant sources et observateurs via ces géodésiques. Nous avons pu générer des catalogues de matière noire et halos en prenant en compte tous les effets relativistes au premier ordre pour les perturbations de la position apparente. Nous avons également produit des cartes sur tout le ciel afin de s'intéresser notamment aux questions portant sur le choix des hypersurfaces dans un univers inhomogène. En particulier nous avons exploré le dipole de la fonction de corrélation croisée des halos comme sonde pour le potentiel et donc pour le secteur sombre.

Pour étendre ce travail, nous pourrions explorer les plus petites échelles (en dessous de 1 Mpc) et les grandes échelles (au-delà du Gpc). Aux petites échelles nous devons prendre en compte la physique baryonique tandis qu'aux grandes échelles nous devons prendre en compte les effets de jauge et les autres perturbations relativistes (vecteur, tenseur). Nos outils peuvent facilement s'adapter à ces problèmes car les photons ne sont pas sensibles à la nature de la matière, ce qui veut dire que nous n'aurions rien besoin de changer si nous avions des baryons. Pour les grandes échelles nous devrions faire ce ray-tracing dans des simulations résolvant la dynamique relativiste ainsi que dans la jauge appropriée (avec A.5. Conclusion

modification des équations géodésiques).

Pour conclure, il y a encore beaucoup de chemin à faire pour comprendre la nature du secteur sombre et nous avons besoin de nouvelles sondes robustes pour tester le modèle de concordance ainsi que des théories alternatives. Durant cette thèse nous avons voulu tester de nouvelles sondes en prenant en compte pour la première fois le véritable cone de lumière. Nous espérons que ce travail sur les effets relativistes (souvent négligés ou seulement pris en compte théoriquement) au niveau numérique et leur comparaison à la théorie linéaire permettra une meilleure compréhension des effets physiques en jeu. Nous espérons que ce travail pourra être étendu à d'autres échelles mais aussi en allant aux ordres supérieurs en perturbations ou encore en prenant en compte les effets observationnels.

3. 1

 1 Periodic boundary conditions of the simulation box. The universe is paved using replications of the simulation box. . . . . . . . . . . . . . . . . . . . . . . 3.2 Example of a simulation snapshot. www.deus-consortium.org . . . . . . . . . x 3.3 Sketch of a light-cone. We see the past light-cone of an observer at the center of the simulation box and the last scattering surface plus CMB on the sphere, delimiting the observable universe (with photons). . . . . . . . . . . . . . . . . 3.4 In black dashed line we have a linear power spectrum at z = 0 while in red solid line we have the power spectrum computed on a simulation snapshot at z = 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.5 Sketch of the multiple-lens algorithm, from Hilbert et al. (2009). . . . . . . . . 3.6 Propagation of a photon inside the AMR structure. In red we have the photon trajectory and in blue the locations at which the geodesic equations are solved using an adaptive step. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7 From Reverdy (2014), we show the indexing used in MAGRATHEA. . . . . . . 3.8 Illustration of the geodesic-finder algorithm. Each tentative photon is designated by ζ n with n being the number of iterations. The first photon ζ 0 is launched towards the source with an angle β.

  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Absolute relative difference on the power spectrum for different snapshots covering the redshift range used for the light-cone analysis (between z = 0.05 and z = 0.465). The black horizontal bar show the 1% difference. In green full lines we have the relative difference between the power spectrum and (our re-calibrated) HALOFIT. In blue dashed lines we have the relative difference with the COSMICEMU emulator. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Three light-cones (one fullsky, two narrows) from the RAYGALGROUPSIMS simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 For a single photon we estimate the gradient of the potential along the xaxis with and without AMR. In blue solid lines we have the force computed without AMR while in red dashed lines we use the AMR. In the left panel we follow the photon during its full propagation while in the right panel we zoom in a tighter redshift bin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 Convergence power spectrum for different homogeneous redshift hypersurfaces. In black solid lines we have the theoretical prediction from a modified version of NICAEA, in blue we have the convergence angular power spectrum at the coarse level (no AMR) and nside = 2048, in green we add the AMR with nside = 2048 and in red we have AMR and nside = 4096. . . . . . . . . . . . .

  37 we have computed the relative difference of various values w.r.t their homogeneous value. Top panel: relative difference on the photon affine parameter, middle panel: relative difference on conformal time, bottom panel: absolute value of the deflection angle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi 4.7 The color gradient refers to the 2PCF values in function of π and σ, respectively the direction along and transverse to the l.o.s. Top panel: halo 2PCF on the unperturbed light-cone. Middle panel: Halo 2PCF accounting for the Doppler effect on the light cone. Bottom panel: DM particle 2PCF accounting for the Doppler effect on the light cone. The halo data contains only halos with a number of DM particles between 100 and 200 (Milky-Way size halos) and the DM particle data contains roughly 2 × 10 8 objects. . . . . . . . . . . .

  FIGURE 2.1: Temperature anisotropies of the CMB seen by the PLANCK mission. Picture taken from the European Space Agency (ESA) website.

  Fig.(2.3).

FIGURE 2 . 3 :

 23 FIGURE 2.3: From Fidler et al. (2016), sketch of a particle trajectory (black solid line) in three different coordinate systems/gauges

FIGURE 2

 2 FIGURE 2.5: 2-point correlation function from Eisenstein et al. (2005) on the Luminous Red Galaxies (LRG) sample of the SDSS survey data.

  FIGURE 2.7: Sketch of the lensing formalism. In solid line we have the trajectory of a photon coming from a given source and deflected on the lens plane by one or multiple objects. In dashed line we have the unperturbed geodesic.

  FIGURE 2.8: Cosmic shear computed in Kilbinger et al. (2013) on the CFHTLenS data survey.

  FIGURE 3.1: Periodic boundary conditions of the simulation box. The universe is paved using replications of the simulation box.

FIGURE 3

 3 FIGURE 3.2: Example of a simulation snapshot. www.deus-consortium.org

FIGURE 3 . 3 :

 33 FIGURE 3.3: Sketch of a light-cone. We see the past light-cone of an observer at the center of the simulation box and the last scattering surface plus CMB on the sphere, delimiting the observable universe (with photons).

  FIGURE 3.4: In black dashed line we have a linear power spectrum at z = 0 while in red solid line we have the power spectrum computed on a simulation snapshot at z = 0.

FIGURE 3

 3 FIGURE 3.5: Sketch of the multiple-lens algorithm, from Hilbert et al. (2009).

FIGURE 3

 3 FIGURE 3.7: From Reverdy (2014), we show the indexing used in MA-GRATHEA.

  FIGURE 3.8: Illustration of the geodesic-finder algorithm. Each tentative photon is designated by ζ n with n being the number of iterations. The first photon ζ 0 is launched towards the source with an angle β. The first ray will generally miss the source, we then iterate using Newton's method in order to get a new initial angle. In this example we iterate twice to find a ray close enough to the source at the same radius, the initial angle of ζ 2 is given by θ and is interpreted as the seen angle. From[START_REF] Breton | Imprints of relativistic effects on the asymmetry of the halo crosscorrelation function: from linear to non-linear scales[END_REF]

  FIGURE 4.3: For a single photon we estimate the gradient of the potential along the x-axis with and without AMR. In blue solid lines we have the force computed without AMR while in red dashed lines we use the AMR. In the left panel we follow the photon during its full propagation while in the right panel we zoom in a tighter redshift bin.

FIGURE 4 . 4 :

 44 FIGURE 4.4: Convergence power spectrum for different homogeneous redshift hypersurfaces. In black solid lines we have the theoretical prediction from a modified version of NICAEA, in blue we have the convergence angular power spectrum at the coarse level (no AMR) and nside = 2048, in green we add the AMR with nside = 2048 and in red we have AMR and nside = 4096.

  FIGURE 4.5: From Breton et al. (2018), we show the matter monopole autocorrelation at z = 0.34 computed on the unperturbed FLRW light cone compared with COSMICEMU(Heitmann et al., 2016). Subplot shows the relative difference.

FIGURE 4 . 6 :

 46 FIGURE 4.6: For a fixed comoving distance hypersurface at z ≈ 0.37 we have computed the relative difference of various values w.r.t their homogeneous value. Top panel: relative difference on the photon affine parameter, middle panel: relative difference on conformal time, bottom panel: absolute value of the deflection angle.

FIGURE 4 . 7 :

 47 FIGURE 4.7: The color gradient refers to the 2PCF values in function of π and σ, respectively the direction along and transverse to the l.o.s. Top panel: halo 2PCF on the unperturbed light-cone. Middle panel: Halo 2PCF accounting for the Doppler effect on the light cone. Bottom panel: DM particle 2PCF accounting for the Doppler effect on the light cone. The halo data contains only halos with a number of DM particles between 100 and 200 (Milky-Way size halos) and the DM particle data contains roughly 2 × 10 8 objects.

  Fig. 4.8 we show the quadrupole for Milky-Way size halos, on the fullsky lightcone for a redshift range z = [0.05, 0.465].

FIGURE 4

 4 FIGURE 4.8: From Breton et al. (2018), absolute value of the quadrupole autocorrelation in redshift space (Doppler term only). Red full lines give the prediction from RegPT[START_REF] Taruya | Baryon acoustic oscillations in 2D: Modeling redshift-space power spectrum from perturbation theory[END_REF]Taruya et al., 2012). Black circles give the computation on the full light-cone. Purple triangles gives the computation using a weighted average on multiple light-cone shells.The computation is done using halos with a linear bias b = 1.08.

FIGURE 4

 4 FIGURE 4.10: For a single photon we estimate the derivative of the potential w.r.t the affine parameter with two methods. In blue solid lines we have dφ/dλ computed with Method 1 while in red dashed lines we use the Method 2. In the left panel we follow the photon during its full propagation while in the right panel we zoom in a tighter redshift bin.

FIGURE 4

 4 FIGURE 4.12: ISW/RS angular power spectrum at different redshifts. In black solid lines we have the linear prediction for the ISW effect. In red dotteddashed lines we have the angular power spectrum D = ( + 1)C /(2π) using Method 1 and in green dashed liens we have the angular power spectrum using Method 2.

FIGURE 4 .

 4 FIGURE 4.13: Relative error between Method 1 and Method 2 for the ISW/RS angular power spectrum at different redshifts. In blue solid lines we have the relative error and the black line show the 1% error.

  FIGURE 4.14: Relative difference (P κ (z) -P κ ( z)) /P κ (z) of the gravitational convergence power spectrum at constant homogeneous redshift and constant inhomogeneous redshift at z = 0.09 for a simulation box length of 656.25 hMpc -1 .

FIGURE 4 .

 4 FIGURE 4.15: Fullsky maps of the radial velocity field at z = 0.09 on the simulation of box length 656.25 h -1 Mpc. Top shows the velocity field using the CIC interpolation while bottom shows the DTFE implementation.

Figure 1 .

 1 Figure1. Illustration of the geodesic-finder algorithm. Each tentative photon is designated by ζ n with n being the number of iterations. The first photon ζ 0 is launched towards the source with an angle β. The first ray will generally miss the source, we then iterate using Newton's method in order to get a new initial angle.In this example we iterate twice to find a ray close enough to the source at the same radius, the initial angle of ζ 2 is given by θ and is interpreted as the seen angle.

Figure 2 .

 2 Figure 2. Redshift distribution for each halo dataset in Table2. The distributions from least to most massive haloes population are shown in black, purple, blue, green, orange and red. The distributions are normalised so that the integral is unity.

Figure 3 .

 3 Figure3. Matter monopole auto-correlation computed on the unperturbed FLRW light-cone compared with CosmicEmu emulator(Heitmann et al. 2016). Subplot shows the relative difference.

Figure 4 .Figure 5 .

 45 Figure4. Monopole auto-correlation in redshift space (Doppler term only). Red full lines give the prediction from RegPT+TNS(Taruya et al. 2010(Taruya et al. , 2012(Taruya et al. , 2013)). Black circles give the computation on the full light-cone.

Figure 6 .Figure 7 .

 67 Figure 6. Representation of snapshots and light-cone. Left panel : snapshot at redshift z I . Middle panel : snapshot at redshift z II . Right panel : full-sky light-cone (made of ∼ 300 small shells of size ∼ 4 h -1 Mpc not represented here). Here z II > z I and d I (respectively d II ) is the FLRW comoving distance at redshift z I (respectively z II ). To estimate light-cone effects, we compare large light-cone shells (of size 2∆r ∼ 300 h -1 Mpc) to the equivalent volume in a snapshot at the corresponding homogeneous redshift.

  The upper right panel shows the dipole for the Doppler term only. The signal

Figure 9 .

 9 Figure9. The dipole of the cross-correlation function normalised by the bias induced by the Shapiro effect. The prediction for this effect is shown in Section 2.2. This contribution is very small and will be neglected afterwards.

Figure 10 .Figure 11 .

 1011 Figure 10. Dipole of the cross-correlation function normalised by the bias, at large scales, for different perturbations of the observed halo number count. This leads to: upper left panel only the contribution from gravitational potential was taken into account as a source of RSD, in black dashed line we have the prediction when accounting for leading terms in (H/k) 2 . Upper right panel Doppler only, middle left panel transverse Doppler only, middle right panel ISW/RS only, bottom left panel weak lensing only, and finally bottom right panel the residual where we subtract all the previous effects to the full dipole taking into account all the effects at once. In black we have the averaged prediction using linear theory at first order in H/k.

Figure 12 .

 12 Figure 12. Dipole of the cross-correlation function between data H 1600 and data H 100 , at small scales, for different perturbations of the halo number count. This leads to: upper left panel only the contribution from gravitational potential was taken into account as a source of RSD, upper right panel Doppler only, middle left panel transverse Doppler only, middle right panel ISW/RS only, bottom left panel weak lensing only, and finally bottom right panel the residual for which we subtract all the previous effects to the full dipole taking into account all the effects at once.

Figure 13 .

 13 Figure13. Full dipole of the cross-correlation function between data H 1600 and data H 100 . The deviation from linear theory is governed by the potential contribution and the "residual" (mostly related to the coupling between potential and velocity terms). The dipole is a sensitive probe of the potential well beyond the virial radius of haloes.

Figure 14 .Figure A1 .

 14A1 Figure14. Dipole of the cross-correlation function between different datasets and data H 100 (no auto-correlation). Left panels: gravitational potential only, dotted lines gives the spherical prediction computed using Eq. (41). Middle panels: Doppler only. For massive enough halo the negative potential contribution dominates over the positive Doppler contribution.The linear prediction is given by dashed lines. Right panels: residual term.

Figure B1 .Figure B2 .Figure B3 .

 B1B2B3 Figure B1. Dipole of the cross-correlation function normalised by the bias, at large scales, for different perturbations of the observed halo number count for another halo definition (b = 0.1). This leads to: upper left panel only the contribution from gravitational potential was taken into account as a source of RSD, in black dashed line we have the prediction when accounting for leading terms in (H/k) 2 . Upper right panel Doppler only, middle left panel transverse Doppler only, middle right panel ISW/RS only, bottom left panel weak lensing only, and finally bottom right panel the residual where we subtract all the previous effects to the full dipole taking into account all the effects at once. In black solid lines we show the averaged prediction using linear theory at first order in H/k.

Figure C1 .Figure C2 .

 C1C2 Figure C1. Potential only term of the dipole of the cross-correlation function on the full light-cone at large scales. The linear predictions at first order in H/k are shown in dash-dotted lines while the prediction with the dominant (H/k) 2 terms is shown in dashed lines.

Figure C4 .Figure C5 .

 C4C5 Figure C4. Residual term of the dipole of the cross-correlation function on the full light-cone at large scales.

  2.1 Temperature anisotropies of the CMB seen by the PLANCK mission. Picture taken from the European Space Agency (ESA) website. . . . . . . . . . . . . . 2.2 Angular power spectrum of the CMB temperature anisotropies (Planck Collaboration et al., 2016). In a red straight line we have the best fit for a ΛCDM cosmology and in blue circles the measurements. . . . . . . . . . . . . . . . . . 2.3 From Fidler et al. (2016), sketch of a particle trajectory (black solid line) in three different coordinate systems/gauges . . . . . . . . . . . . . . . . . . . .

TABLE 4

 4 We ran different simulations with different sizes but with the same cosmology and mass resolution. Small simulations are used to test our new tools in order to prepare larger simulations. The main characteristics of the simulations used in this thesis are summed up in Table4.2.

		.1: Parameters of a ΛCDM_W7 cosmology.
	h	Ω m	Ω b	Ω r	n s	σ 8
	0.72 0.25733 0.04356 8.076e-05 0.963 0.801

TABLE 4 .

 4 2: Summary of the different simulations used: we display the box length, number of DM particles, mass per DM particle, spatial resolution at the coarse and finest levels and finally the initial redshift.

TABLE 4 .

 4 3: Different light cones produced during the simulation: we display the aperture, maximum redshift, if the light-cone was built using replicas, if the direction of the light-cone is tilted (overlap) and how many coarse cells at the same location.

	Type	aperture (deg 2 ) z max Replicas Tilted Overlap
	Fullsky	Full sky	0.5	No	No	2
	Narrow	2500	2	Yes	Yes	2
	Narrow	400	10	Yes	Yes	2

FIGURE 4.2: Three light-cones (one fullsky, two narrows) from the RAYGAL-GROUPSIMS simulation.

Table 2 .

 2 Summary of the different datasets used: name, number of haloes, range for the number of particles per halo, mean mass, bias at the volume averaged redshift z = 0.341, and estimated mean halo concentration (taken fromZhao et al. 2009).

	name	nb of haloes	nb of part	mass (h -1 M )	bias	c 200m zhao
	data H 100 data H 200 data H 400 data H 800 data H 1600 data H 3200	5.4 × 10 6 3.4 × 10 6 1.9 × 10 6 1.0 × 10 6 4.0 × 10 5 2.0 × 10 5	100-200 200-400 400-800 800-1600 1600-3200 3200-6400	2.8 × 10 12 5.6 × 10 12 1.1 × 10 13 2.2 × 10 13 4.5 × 10 13 9.0 × 10 13	1.08 1.22 1.42 1.69 2.07 2.59	8.2 7.7 7.1 6.6 6.1 5.7

  Table 2 computed on snapshots. Bottom panel: Derivative of bias w.r.t comoving distance, comparison of our computation (circles, dashed lines) with the prediction from the Sheth & Tormen (1999) model Eq. (36) (full lines). The associated halo populations are, from top to bottom: data H 3200 , data H 1600 , data H 800 , data H 400 , data H 200 , data H 100

Table B1 .

 B1 Summary of the different datasets used: name, number of haloes, range for the number of particles per halo, mean mass, bias at the volume averaged redshift z = 0.341.

	name	nb of haloes nb of part mass (h -1 M )	bias
	data2 H 050 data2 H 100 data2 H 200 data2 H 400 data2 H 800 data2 H 1600	6.9 × 10 6 3.7 × 10 6 2.0 × 10 6 1.0 × 10 6 4.3 × 10 5 1.7 × 10 5	50-100 100-200 200-400 400-800 800-1600 1600-3200	1.4 × 10 12 2.8 × 10 12 5.6 × 10 12 1.1 × 10 13 2.2 × 10 13 4.5 × 10 13	1.18 1.38 1.54 1.76 2.13 2.60

The light-cone can be built as a post-processing after the simulation is finished. In that case we use the snapshots the construct the light-cone. For this approach there are two methods: first, the light-cone is constructed from a concatenation of snapshots at

This code would obviously not compile since we did not include any headers, nor defined the main function. This is only to illustrate the general idea of compilation time variable or execution time variable.

© 2018 The Authors

We stick to the terminology, RSD, as used widely in the community although we admit that this term is ambiguous. It should be taken as a synonymous of "Observed-Space Distortions" including all distortions induced by the presence of an observer.

MNRAS 000, 1-21 (2018)

https://gitlab.obspm.fr/roy/pFoF MNRAS 000, 1-21 (2018)

This paper has been typeset from a T E X/L A T E X file prepared by the author.MNRAS 000, 1-21 (2018)

Remerciements

ACKNOWLEDGEMENTS

MAB and YR acknowledge financial support from the DIM ACAV of the Region Ile-de-France, the Action fédératrice Cosmologie et structuration de l'univers as well as the JSPS Grant L16519. AT acknowledges financial support from MEXT/JSPS KAKENHI Grant Numbers JP15H05889 and JP16H03977. SS acknowledge financial support from Grantin-Aid for JSPS Research Fellow Number 17J10553. This work was granted access to HPC resources of TGCC/CINES through allocations made by GENCI (Grand Equipement National de Calcul Intensif) under the allocations 2016-042287, 2017-A0010402287 and 2018-A0030402287. We thank Fabrice Roy for important technical support and providing pFoF, and Vincent Reverdy for providing Magrathea. We also thank C. Murray for comments on the catalogues, R. Teyssier for Ramses, D. Alonso for Cute and B. Li for sharing his TSC routine. MAB thanks Pier-Stefano Corasaniti, Stefano Anselmi and Paul de Fromont for fruitful discussions. YR thanks Ichihiko Hashimoto and Julian Adamek. To complete this work, discussions during the workshop, YITP-T-17-03, held at Yukawa Institute for Theoretical Physics (YITP) at Kyoto University were useful. Numerical calculations for the present work have been carried out partly at the Yukawa Institute Computer Facility.

Après avoir vu la cosmologie homogène nous nous intéressons aux conditions initiales et au Fond Diffus Cosmologique (FDC, ou CMB). Le CMB est le plus vieil artéfact visible avec des photons, il vient de environ 380.000 ans après le Big Bang, à une époque où l'univers s'est suffisamment étendu et où sa température est devenue suffisamment basse pour permettre aux atomes de se former. A ce moment l'univers devient « transparent » car il y a découplage entre baryons et photons, la lumière peut désormais se propager sans provoquer de diffusion Compton. Le CMB est visible dans toutes les directions avec une température de environ 2.7 K et des fluctuations de température de l'ordre de la centaine de µK. L'étude de ces anisotropies est centrale pour la cosmologie moderne et donne aujourd'hui les meilleures contraintes sur les modèles cosmologiques. Dans notre cas, le CMB est intéressant car les fluctuations de température sont reliées aux fluctuations du champs de densité à cette époque, ce qui nous donne les conditions initiales sur ce que vont devenir les grandes structures que nous étudions tout au long de ce manuscrit. De plus, la physique A.2. Théorie

This work was supported by grants from Région Ile-de-France. vii

In blue and red we have the result from our simulations using respectively the DTFE and CIC implementations of the velocity field. In dotted, dashdotted and dashed lines we have respectively the predictions for linear theory, [START_REF] Jennings | An improved model for the non-linear velocity power spectrum[END_REF] fit, and 2-loop RegPT (Taruya et al., 2012).

4.3. Beyond standard RSD: asymmetries in the halo cross-correlation function as a new cosmological probe from linear to non-linear scales. 111

Beyond standard RSD: asymmetries in the halo cross-correlation function as a new cosmological probe from linear to non-linear scales.

At the largest cosmological scales we assume statistical isotropy and homogeneity of the matter density field. However our knowledge comes mostly from observing the universe via messengers like photons which can be disturbed during their propagation, resulting in a distortion in our perception of the universe. For redshift-space distortions in particular we usually only account for the peculiar velocity, however with the increasing quality of data we will be able to measure more subtle effects. This was investigated theoretically at large linear scales and it was shown that the observed asymmetry of the galaxy distribution is an interesting new probe of the dark sector. We have explored these distortions from linear to non-linear scales using numerical simulations. In this paper we present our cross-correlation measurement from linear to non-linear scales.

MNRAS 000, 1-21 (2018)

Preprint 30 November 2018 Compiled using MNRAS L A T E X style file v3.0

Imprints of relativistic effects on the asymmetry of the halo cross-correlation function: from linear to non-linear scales

Michel-Andrès Breton, 1 Yann Rasera, 1,2 Atsushi Taruya, 2,3 Osmin Lacombe,

ABSTRACT

The apparent distribution of large-scale structures in the universe is sensitive to the velocity/potential of the sources as well as the potential along the line-of-sight through the mapping from real space to redshift space (redshift-space distortions, RSD). Since odd multipoles of the halo cross-correlation function vanish when considering standard Doppler RSD, the dipole is a sensitive probe of relativistic and wide-angle effects.

We build a catalogue of ten million haloes (Milky-Way size to galaxy-cluster size) from the full-sky light-cone of a new "RayGalGroupSims" N-body simulation which covers a volume of (2.625 h -1 Gpc) 3 with 4096 3 particles. Using ray-tracing techniques, we find the null geodesics connecting all the sources to the observer. We then selfconsistently derive all the relativistic contributions (in the weak-field approximation) to RSD: Doppler, transverse Doppler, gravitational, lensing and integrated Sachs-Wolfe. It allows us, for the first time, to disentangle all contributions to the dipole from linear to non-linear scales. At large scale, we recover the linear predictions dominated by a contribution from the divergence of neighbouring line-of-sights. While the linear theory remains a reasonable approximation of the velocity contribution to the dipole at non-linear scales it fails to reproduce the potential contribution below 30 -60 h -1 Mpc (depending on the halo mass). At scales smaller than ∼ 10 h -1 Mpc, the dipole is dominated by the asymmetry caused by the gravitational redshift. The transition between the two regimes is mass dependent as well. We also identify a new non-trivial contribution from the non-linear coupling between potential and velocity terms.

Key words: cosmology: large-scale structure of Universe -theory -methods: numerical -galaxies: distances and redshifts -gravitational lensing: weak

APPENDIX A: BIAS MEASUREMENT AND EVOLUTION

In this section we present the methodology used to compute the bias for each halo population summarised in Table 2. In our case we will consider a scale-independent bias which can be directly fitted with a constant using Eq. ( 53).

Even if we perform our analysis on the light-cone, computing the bias from the full light-cone monopole would give very poor results (see Fig. 4) for haloes with increasing mass. We therefore compute the bias using snapshots with the same comoving volume as our full light-cone, and interpolating between snapshots to find the bias of a given population at a given redshift. From a numerical point of view, it would be more accurate to use the halo-matter cross-correlation instead of square root of the halo-halo auto-correlation since we would have more particles than haloes and therefore less noise. However this would mean saving all the particles for each snapshot which is unrealistic for our simulation. Instead, we compute ξ mm using CosmicEmu (Heitmann et al. 2016) which is in good agreement which the matter autocorrelation monopole we have on the light-cone (see Fig. 3). We also checked that the emulator power spectrum is in agreement with the power spectrum we compute in each snapshot at one percent level between roughly k = 0.02 and 2 hMpc -1 . Finally, we cross-correlate each halo population with the least massive one in order to increase the statistics instead of computing the halo auto-correlation. For the data H 100 bias we indeed use

For other populations we then take

where h 1 denotes the halo population from which we want to know the bias, h 2 denotes the data H 100 population with b 100 its bias. This was done on 12 snapshots which covers well our full-sky light-cone. The associated redshift are : z = 0.123, 0.152, 0.180, 0.208, 0.236, 0.250, 0.265, 0.296, 0.329, 0.364, 0.399 and 0.428. The results are shown in Fig. A1.

For bias derivative shown in Fig. A1, we use the prediction from Sheth & Tormen (1999), which gives us as a result Eq. ( 36). In our case, for each mass bin (increasing in mass) we set σ(M, 0) ≡ σ 0 = 1.60, 1.44, 1.27, 1.17, 0.95 and 0.9.

For the most massive bins the Sheth & Tormen (1999) computation of the bias can be very different from our numerical results, therefore for the dipole predictions we keep the bias from our computation on snapshots but we take the bias derivative from Eq. (36) as it is smoother.

APPENDIX B: DIFFERENT HALO DEFINITION

In this appendix we perform the same analysis as in core of the paper but with a different halo definition. In the paper we detected haloes using the friend-of-friend algorithm with b = 0.2. To check the sensitivity of our results about the halo definition we here consider a very different linking length, namely b = 0.1. While b = 0.2 corresponds to Appendix A

Résumé en français

A.1 Introduction

Il reste encore de grandes questions fondamentales non résolues en physique et plus particulièrement dans le domaine de la cosmologie. Que sont exactement cette matière noire et énergie noire qui forment la plus grande partie de notre univers d'après le modèle de concordance en cosmologie ? De plus en plus de moyens sont mis en oeuvre pour répondre à ces questions, en particulier dans le cas de missions spatiales et d'observations au sol. Il y a des expériences de laboratoire qui ont pour but de détecter des candidats pour la matière noire dans le cadre de la physique des particules: comme les Particules massives interagissant faiblement (WIMPs). Cependant, la grande majorité de l'information que nous avons sur le secteur sombre vient d'observations et non pas d'expériences. La différence avec d'autres domaines de la physique vient du fait que nous ne pouvons pas répéter plusieurs fois la même expérience mais nous devons nous contenter d'un seul univers et d'un seul ciel duquel nous recevons des messagers.

Pour extraire l'information de cette unique réalisation de notre univers, nous devons modéliser précisément les propriétés de l'univers tel qu'il est, ou tel que nous pensons qu'il est. Cependant nous n'observons pas l'univers en lui-même mais via des messagers, ce qui réduit considérablement le volume effectif sur lequel nous pouvons le connaître. De plus, selon leurs propriétés, les messagers vont déformer notre perception de l'univers, ce qui veut dire que l'univers que nous voyons n'est pas le « vrai » univers. En fait, ce qui semble à première vue être un inconvénient majeur devient une force puisque ces déformations dépendent de la nature de l'univers et nous donnent des informations sur lui.

Dans cette thèse nous nous sommes intéressés à tous ces effets depuis l'univers « vrai », à la propagation des messagers (dans notre cas la lumière) et jusqu'à l'univers tel que nous l'observons en prenant soigneusement en compte tous les effets dominants à chaque étape. Si une dérivation analytique est proposée dans le régime linéaire de la formation des structures, les non linéarités requièrent l'utilisation de méthodes numériques avancées. De plus, nous nous intéressons à des effets fins qui nécessitent la production de simulations ayant un grand volume et une bonne résolution afin d'obtenir une bonne précision statistique. Nous devons donc mettre au point des outils de Calcul Haute Performances afin d'extraire l'information venant de ces effets fins. Dans cette thèse cela s'est traduit par la production de simulations très résolues ainsi que des méthodes de suivi de rayon lumineux sophistiquées afin d'étudier le passage de l'espace réel à l'espace des redshifts.

Ce manuscrit commence par la description théorique des effets physiques qui nous intéressent, en partant de la cosmologie homogène et des conditions initiales nous décrivons la dynamique de la matière dans l'univers (le « vrai » univers), la propagation des messagers et ce que nous observons au final (en prenant en compte le lentillage gravitationnel et les distorsions dans l'espace des redshifts). Dans chaque section nous explicitons les équations fondamentales qui seront utilisées et nous écrivons quelques cas simplifiés (dans le cas de la théorie linéaire par exemple) afin de mieux comprendre la physique derrière les équations. Ensuite, nous décrivons les méthodes numériques. De la même façon nous commençons par la génération des conditions initiales, nous parlons ensuite l'algorithme qui résoud les équations dynamiques ainsi que les méthodes de ray-tracing qui sont au coeur de cette thèse. Nous achevons cette partie par une description des outils statistiques utilisés pour analyser les données produites. Dans la troisième partie nous présentons les résultats obtenus pendant cette thèse. Nous commençons par la présentation de la nouvelle simulation produite spécifiquement afin d'étudier les problèmes de transformation de l'espace réel à l'espace des redshifts, et des catalogues de halos produits grâce aux méthodes de ray-tracing développées durant ce travail. Nous montrons ensuite des résultats standards d'analyse de données (lentillage gravitationnel faible, distorsion dans l'espace des redshifts, effet Sachs-Wolfe intégré) où nous obtenons des résultats précis. Par la suite nous montrons les effets des distorsions de l'espace des redshifts sur la convergence gravitationnelle ainsi que sur les différentes hypersurfaces dans un univers inhomogène. Nous montrons des résultats préliminaire sur le Doppler lensing (ou Doppler magnification). Enfin, nous présentons nos résultats principaux concernant l'asymmétrie de la fonction de corrélation croisée des halos, où tous les effets relativistes jouent un rôle.

Tandis que notre travail fait largement appel aux méthodes numériques et Calcul Haute Performance, nous comparons systématiquement nos résultats à des prédictions théoriques afin de tester de nouvelles sondes du secteur sombre.

A.2 Théorie

Nous commencons par la decription de la cosmologie homogène. L'espace-temps est décrit par la métrique de Friedmann-Lemaître-Robertson-Walker, avec une partie spatiale dépendante du temps. Une constante cosmologique est ajoutée à l'équation d'Einstein afin de prendre en compte l'expansion accélérée de l'univers. Cette métrique sera la métrique de « fond » sur laquelle les perturbations vont évoluer, sa caractérisation est donc centrale. A partir de la propagation de la lumière sur un tel espace-temps nous avons une relation entre facteur d'échelle et redshift due au flot de Hubble (ou expansion de l'univers). Le redshift tient une place centrale dans cette thèse car il nous donne la distance radiale des sources. Plus généralement, la question des distances est centrale en cosmologie et il existe plusieurs types de distances: la distance comobile liée à la position d'un objet et qui prend implicitement en compte l'expansion de l'univers, la distance angulaire qui dépend de la taille angulaire des sources et enfin la distance de luminosité qui peut être estimée via la magnitude.

Appendix B

Tripolar spherical harmonics B.1 Generalities

Sometimes we are interested in triangles in the sky and equations of the form Eq. (2.211). In that case we use the tripolar spherical harmonic formalism. Some useful relations:

We can define S 1 2 3 (x 1 , x 2 , x 3 ) as

Some simple cases (Szapudi, 2004)

B.2 Application on a simple case

First we shall start writing some useful relations

L 1 (µ)L 2 (ν) e ik•r = 4π -2 3 j 2 (kr)µ -1 3 j 2 (kr)µ + j 2 (kr)µ 3 (B.17) Remembering that x 3 = 3 5 L 1 (x) + 2 5 L 3 (x), we can finally write .18)