The fullsky relativistic correlation function and power spectrum of galaxy number counts:
I. Theoretical aspects
Abstract
We derive an exact expression for the correlation function in redshift shells including all the relativistic contributions. This expression, which does not rely on the distantobserver or flatsky approximation, is valid at all scales and includes both local relativistic corrections and integrated contributions, like gravitational lensing. We present two methods to calculate this correlation function, one which makes use of the angular power spectrum and a second method which evades the costly calculations of the angular power spectra. The correlation function is then used to define the power spectrum as its Fourier transform. In this work theoretical aspects of this procedure are presented, together with quantitative examples. In particular, we show that gravitational lensing modifies the multipoles of the correlation function and of the power spectrum by a few percent at redshift and by up to 30% and more at . We also point out that largescale relativistic effects and wideangle corrections generate contributions of the same order of magnitude and have consequently to be treated in conjunction. These corrections are particularly important at small redshift, , where they can reach 10%. This means in particular that a flatsky treatment of relativistic effects, using for example the power spectrum, is not consistent.
Prepared for submission to JCAP
The fullsky relativistic correlation function and power spectrum of galaxy number counts:
I. Theoretical aspects

Département de Physique Théorique and Center for Astroparticle Physics, Université de Genève, 24 Quai Ansermet, CH–1211 Genève 4, Switzerland
Contents
 1 Introduction
 2 The correlation function
 3 From the correlation function to the power spectrum
 4 Discussion and Conclusions
 A Relations between the angles
 B The full angular–redshift correlation function
 C Approximation for the nonlinear fullsky lensing
 D Direction dependent power spectra
 E The flat sky approximation
1 Introduction
Upcoming redshift surveys of the distribution of galaxies [1, 2, 3, 4, 5, 6] are going to probe the largescale structure of the universe at high redshift and for wide patches of the sky with unprecedented precision. To exploit the information delivered by these surveys in an optimal way, it is crucial to have reliable theoretical predictions of the signal. Redshift surveys generally associate two quantities to each galaxy they detect: the direction from which photons are received, , and the redshift . It has therefore been argued in the past [7, 8, 9, 10, 11, 12], that galaxy correlation functions are truly functions of two redshifts and an angle. The angularredshift power spectrum is then given by . This quantity has been introduced in [12, 13], where it has also been shown that due to relativistic projection effects, the linear power spectrum is not simply given by density fluctuations and redshiftspace distortions, but it acquires several additional terms from lensing, ordinary and integrated Sachs Wolfe terms, gravitational redshift, Doppler terms, and Shapiro time delay. These projection effects had been previously identified in [14, 15].
Subsequently, linear Boltzmann codes like camb [16] and class [17] have been generalized to calculate this galaxy count angular power spectrum [18, 19]. To determine the observationally, one correlates the number of galaxies in a redshift bin around and in a small solid angle around direction with those in a redshift bin around and in a small solid angle around direction . Due to statistical isotropy, the resulting correlation function only depends on the angle between and , and is related to the angular power spectrum in the well known way,
(1.1) 
where denotes the Legendre polynomial of degree .
Before the introduction of the ’s, cosmologists have mainly concentrated on determining the correlation function and the power spectrum in Fourier space. In comoving gauge, on subhorizon scales the latter is given by [20]
Here is the mean redshift or the survey, is the matter density power spectrum today, is the growth factor normalized to , is the galaxy bias and
(1.3) 
is the growth rate, where the prime denotes the derivative with respect to the redshift . The direction cosine is the cosine of the angle between and the observation direction (in the literature this direction cosine is often denoted as but here we reserve for the corresponding angle in real space and in order to avoid confusion we denote it by in Fourier space).
Equation (1) has an interesting property: projecting out the monopole, quadrupole and hexadecapole in , one can directly measure the bias and the growth rate . This has been exploited in previous observations and has led to the best determinations of so far (see [21, 22, 23, 24, 25, 26] and refs. therein). It is clear that the form (1) of the power spectrum can only be valid if the bins are not too far apart in the sky. Eq. (1) indeed implicitly assumes that the galaxies are observed in one single direction so that a ’flatsky approximation’ with a well defined angle is a reasonably good approximation.
An observable alternative to the power spectrum, which is routinely used in galaxy surveys is the correlation function , where denotes the separation between the galaxies, is the orientation of the pair with respect to the direction of observation and is the mean redshift of the survey. The correlation function is observed in terms of and . To express it in terms of and , the redshifts and have to be converted into comoving distances and a direction cosine has to be defined.
Neglecting spatial curvature we can use the cosine law to express in terms of the comoving distances to and ,
(1.4) 
where
(1.5) 
Here is the matter density parameter and is the dark energy density in units of the critical density today; is normalized to . Hence the correlation function , as well as the power spectrum, are not directly observable: they both require the use of a fiducial cosmology to calculate and . If the redshift is small, , we can write , and the dependence on is taken into account by measuring cosmological distances in units of Mpc/, where Mpc denotes a megaparsec ( light years) and km/s/Mpc. However, in present and upcoming catalogues which go out to and more, this is no longer sufficient and depends in a nontrivial way on the dark matter and dark energy density, on the dark energy equation of state and on curvature (which is set to zero in this work for simplicity). Fortunately this dependence can be accounted for by introducing correction parameters, which allow for deviations from the fiducial cosmology, see e.g. [27]. In the flatsky approximation, the standard correlation function takes the simple form [28]
(1.6) 
with
(1.7) 
Note that the terms containing the growth factor come from the Jacobian transforming real space positions into redshifts ^{1}^{1}1We point out that the original derivation of redshiftspace distortion from [20] contains a contribution proportional to . This term does contribute to the monopole and quadrupole and it consequently modifies (1.6). It is however neglected in most redshiftspace distortion analysis and therefore we do not consider it as ’standard’ and we do not include it in (1.6). We include it however in the relativistic corrections, along with the other Doppler corrections, which are of the same order of magnitude (see Eq. (2.5)). Note that, as discussed in more detail in Section 2.2.2, this specific contribution has been studied in detail in [9, 10, 29, 11] and its impact on the correlation function was found to be important at small redshift and large separation..
In Appendix D we derive the general relation between the and the corresponding prefactors of the Legendre polynomials in the power spectrum.
Expressions (1) and (1.6) are currently used to analyse redshift surveys ^{2}^{2}2Note that these expressions are valid in the linear regime only. Theoretical models accounting for nonlinearities have been developed and are used to extend the constraints to nonlinear scales, see e.g. [30].. These expressions are sufficiently accurate to place meaningful constraints on cosmological parameters with current data. They may however not be sufficient to analyse future surveys since they suffer from two important limitations: first they are based on the flatsky (sometimes also called distantobserver) approximation. And second they take into account only density fluctuations and redshiftspace distortions. They neglect lensing which is relevant especially when the redshifts and are significantly different. They also neglect all the relativistic projection effects which are relevant on large scales (close to horizon scale). These expressions are therefore only an approximate description of what we are observing, which is also reflected by the fact that they are gaugedependent.
Due to these limitations, one would be tempted to use the angular power spectrum instead of Eqs. (1) and (1.6) to analyse future redshift surveys. The gaugeinvariant ’s account indeed for all observable effects. They are directly observable and do not rely on the flatsky approximation. And they can be determined numerically within a few seconds with subpercent accuracy. Unfortunately they are not fully satisfactory for several reasons:

If we want to profit optimally from spectroscopic redshift information from a survey like the one that will be generated by Euclid [1], DESI [5] or the SKA [6], we need several thousand redshift slices leading to several million spectra. For an MCMC parameter estimation this is simply prohibitive. Even if one spectrum is calculated within a few seconds, calculating the millions of spectra times would take months even if highly parallelized.

In each spectroscopic redshift bin we then only have a few 1000 galaxies, less than one per square degree, and the observed spectra would have very large shot noise , allowing only computation up to very low .

One of the big advantages of and is that the growth rate can be simply determined by isolating the monopole, quadrupole and hexadecapole components in an expansion of and in Legendre polynomials in and respectively. With the ’s on the other hand there is no simple way to isolate redshiftspace distortions since each multipole is a nontrivial combination of density and velocity.
Hence even though the ’s are very convenient theoretically, they are not fully satisfactory from an observational point of view. In this paper we therefore derive general expressions for the correlation function and the power spectrum, that can be used as theoretical models for future surveys. Our work builds on the result of several papers, which have studied the impact of some of the relativistic effects on the correlation function and on the power spectrum. In [31, 32], expressions for the flatsky power spectrum including all nonintegrated relativistic effects have been derived. In [33, 34, 35] the lensing contribution to the flatsky power spectrum and the flatsky correlation function has been studied in detail. Refs. [9, 10, 29] have derived fullsky expressions for density and redshiftspace (RSD) contributions to the correlation function, which have then be further developed in [11, 36, 37, 38]. These expressions have been rederived using an alternative method in [39]. Ref. [40] has studied in detail the relation between the fullsky and flatsky density and RSD for both the correlation function and the power spectrum. In [41] the fullsky calculation of [9, 10, 29] has been extended to include gravitational redshift and Doppler terms, which are especially relevant in the case of multiple populations of galaxies. Ref. [37] further expands the formalism introduced in [9] by computing theoretical expressions for the wideangle corrections including also the integrated terms and Ref. [42] numerically evaluates all the nonintegrated relativistic terms in the fullsky. In [43] the integrated terms in the correlation function are plotted for the first time for two values of the angle . The theoretical expressions in these works rely on an expansion of the correlation function in Tripolar Spherical Harmonics which on the one hand is a powerful tool to obtain simple expressions in the fullsky but on the other hand hides some properties of the correlation function enforced by isotropy.^{3}^{3}3Whether in flatsky or fullsky the correlation function depends on three variables: two distances and one angle ( or in this work), one distance and two angles ( in [9], in [42]) or three distances (). When is expanded in Tripolar Spherical Harmonics one obtains a function and the three physical variables are in general not directly inferred.
Here we generalise and complete these results. We first derive a fullsky expression for the correlation function including all local and integrated contributions, in which isotropy of the perturbations is explicit. In particular, we provide a detailed study of the gravitational lensing contribution to the correlation function which does not rely on the flatsky or Limber approximation. We discuss how these fullsky contributions modify the simple multipole expansion of Eq. (1.6). This represents the first analysis of the fullsky lensing contributions to the multipoles of the correlation function, which is most relevant when extracting the growth factor. In this aspect as in several other ways, this analysis goes beyond the pioneering work of [43].
In the second part of this work we use the correlation function to calculate the power spectrum, which we define as the Fourier transform of the fullsky correlation function. In this way the power spectrum does not rely explicitly on the flatsky approximation. However, it has an unambiguous interpretation only in this limit. Comparing the fullsky and flatsky derivations, we find that relativistic effects and wideangle corrections ^{4}^{4}4Here we call wideangle corrections the difference between the flatsky and fullsky expressions. are of the same order of magnitude and they have therefore to be treated in conjunction. This leads us to the conclusion that relativistic effects cannot be consistently studied in the flatsky and that the correlation function is therefore more adapted than the power spectrum to investigate these effects.
This paper is the first part of this study where we present the theoretical derivation and some numerical results. An exhaustive numerical study, including also the effects of the new terms on cosmological parameter estimation, is deferred to a future publication [44]. Of course, there are many studies estimating cosmological parameters using the , see for example [19, 45, 46, 47, 48]. However as argued above, these can mainly be used for large, photometric redshift bins while within such bins, in order to profit optically from spectroscopic redshift information, a correlation function or power spectrum analysis is required.
The remainder of the present work is structured as follows: in the next section we describe how we obtain the redshiftspace correlation function from the angular correlation function. As already discussed above, the procedure of course depends on the cosmological model. We shall describe two possibilities: to go either over the spectra or to obtain directly from the density fluctuations, velocity fluctuations and the Bardeen potentials in Fourier space. In Section 3 we study the power spectrum. In Section 4 we discuss the implications of our findings for future surveys and we conclude. Several technical derivations are relegated to 5 appendices.
2 The correlation function
The galaxy number counts including relativistic corrections have been derived in [12, 13] with the following result
(2.1) 
where
(2.2)  
(2.3)  
(2.4)  
(2.5)  
(2.6)  
(2.7)  
(2.8)  
(2.9)  
(2.10)  
(2.11) 
Here is the matter density fluctuation in comoving gauge, is the radial component of the velocity in longitudinal gauge, is the velocity potential such that , ; hence has the dimension of a length (we later define via its Fourier transform, , so that is dimensionless). and are the Bardeen potentials and denotes the Lapacian on the sphere of directions . The galaxy bias is denoted by , is the magnification bias and is the evolution bias. These biases generally depend on redshift. The magnification bias comes from the fact that in general we do not observe all galaxies but only those which are brighter than the flux limit of our instrument. Due to lensing and to some relativistic effects, some fainter galaxies may make it into our surveys. This is taken into account by which is proportional to the logarithmic derivative of the galaxy luminosity function at the flux limit of our survey, see [13, 18] for more details.
The terms and are the density and redshiftspace distortion terms usually taken into account. In the following we call the sum of these two terms the ’standard terms’. represents the lensing term, also often called magnification. This term has already been measured with quasars at large redshift, see e.g. [49], but it is usually neglected in galaxy surveys, since it is subdominant at low redshift. is the Doppler contribution. Note that here we have used Euler’s equation to derive this term. In all generality this term contains a contribution from gravitational redshift, proportional to , which can be rewritten in terms of the velocity using Euler equation, see e.g. [41]. is a velocity term which comes from transforming the longitudinal gauge density into the comoving density. and are relativistic effects, given by the gravitational potentials at the source. As such they are sometimes called ’SachsWolfe’ terms. denotes the socalled Shapiro timedelay contribution and is the integrated SachsWolfe term.
In the following we will sometimes group together the relativistic nonintegrated terms (d1, d2, g1, g2, g3). The lensing term is treated separately since its calculation is different. The relativistic integrated terms (g4 and g5) are neglected in our numerical results since their contribution is largely subdominant with respect to the lensing term.
2.1 Using ’s
We start by deriving the correlation function of (2.1), using the angular power spectrum . Using Eqs. (1.1) and (1.4) we can write
(2.12) 
where is given by (, )
(2.13) 
This is a simple consequence of (1.4) setting and approximating . This function is the same full correlation function as the one given in Eq. (1.1), but now expressed in terms of the variables and instead of and . We shall use the same symbol to denote it.
Usually, the correlation function is not considered as a function of and the opening angle between the two directions which are correlated, but as a function of and the angle with a fictitious but fixed lineofsight between the two directions of observation. If is small enough, redshiftspace distortions are proportional to the of the angle with this fictitious direction. To mimic this situation we introduce
(2.14)  
(2.15) 
Writing and using Eq. (2.14) we obtain
(2.16) 
Note that and are not exactly the same but in what follows we neglect this difference which is of order . With this, the correlation function, can be written as a function of , and (or, equivalently, and )
(2.17)  
(2.18) 
Note that, again, we have reexpressed in different variables.
Expression (2.17) is valid as long as is small so that is a good approximation. Expression (2.18) however, is valid for all possible values of and , where , such that . For a given cosmology, fixing and is therefore equivalent to fixing and while then fixes . Given a cosmological background model, there is a onetoone correspondence between the modelindependent angular correlation function (1.1) and the modeldependent correlation function (2.18).
The angle , given by defined by Eq. (2.15), is the angle between the line connecting and and the line connecting the intersection of the circle around with radius and the Thales circle over (see Fig. 1, left panel). This angle is not very intuitive and it is not what observers use. In practice the angles used are either , the angle between and the line dividing into two equal halves (see Fig. 1, right panel) or , the angle between the line bisecting the angle and (see Fig. 1, middle panel). Using elementary geometry we can express the angles and in terms of , and (see Appendix A for a derivation):
(2.19)  
(2.20) 
In the small angle approximation, , both functions behave as
If , i.e. , we can express in terms of as
(2.21) 
Here are given in terms of and by solving the equations
(2.22) 
If we want to express the correlation function in terms of , and , we have to solve the system (2.21,2.22). A short calculation gives
(2.23)  
(2.24) 
Inserting from (2.23) and from (2.24) in (2.17), we can express the correlation function as a function of and . In terms of we find
(2.25) 
In the small angle limit, all three angles, , and coincide. In Section 2.2.2 we will see that the angle which gives the result closest to the flatsky limit is the angle . For this reason and due to its simplicity in what follows we express both, the correlation function and the power spectrum in terms of the projection along and transverse to the lineofsight using the angle with . As explained above, for small angles this is equivalent to choosing or , but for large angles, the expressions in terms of are simpler.
In Fig. 2 we show the correlation function at as a function of and . In all figures, we use the cosmological parameters: , , , at , , , and unless otherwise stated. In the left panel of Fig. 2 we include only the density, in the middle panel we also consider redshiftspace distortions (RSD) and in the right panel we include also the lensing term. While the pure density term is spherically symmetric with a well visible baryon acoustic oscillation (BAO) feature at Mpc, the RSD removes power for small and adds power at large . Also the maximal amplitude has more than doubled due to RSD ^{5}^{5}5Note that we have chosen . For larger values of , the importance of redshiftspace distortion with respect to the density contribution is reduced.. Finally the lensing term adds a very significant amount of power for large and small . This is the case when a foreground density fluctuations lenses a structure at higher redshift along its line of sight. The additional relativistic contributions are very small and become visible only on very large scales, as we shall see in the rest of this paper and as has already been anticipated in several papers, e.g. Refs. [12, 13].
In Fig. 3 we show fractional differences for (left) and (right)
(2.26) 
where
(2.27) 
In this way we show separately the contribution of each correction with respect to the standard term, including its correlation with density and redshiftspace distortion. The middle panel shows for and the lower panel for all the nonintegrated relativistic effects, namely the terms d1, d2, g1, g2 and g3 (see Eqs. (2.1) to (2.11) for a definition of the various relativistic terms). Finally, as reference, we plot in the top panel the fractional difference due to redshiftspace distortion, namely .
Not surprisingly, for the lensing term is very small apart from a small effect on the acoustic peaks. For however, at large scales Mpc, lensing becomes the dominant term. As also noted in [34], it increases linearly with distance. Comparing our fullsky calculation of the lensing (orange) with the flatsky expression (blue) derived in [34] and in Appendix E (see Eq. (E.16)) we see that for the two expressions agree very well, which is not surprising because in this case and flatsky is a good approximation. The only source of difference in this case comes from the fact that the flatsky result uses Limber approximation whereas the fullsky result is exact. This difference is very small, showing that Limber approximation for is very good. For on the other hand we see a nonnegligible difference between the flatsky and fullsky result. We will discuss this in more detail in Section 2.2.1.
From the bottom panel, we see that the nonintegrated relativistic terms generate a correction of the order of the percent at large separation Mpc. Naively we would expect the Doppler term (d1: blue) to dominate over the other relativistic effects because it is proportional to the peculiar velocity and contains therefore one more factor than the terms proportional to the potentials (see e.g. Eqs. (2.29) to (2.38) below). However, as shown in [41] (see also Appendix B), the correlation of this term with the standard term exactly vanishes in the flatsky because it is totally antisymmetric. The contribution that we see in Fig. 3 is therefore due to the correlation , which is a factor smaller, hence and to the fullsky contributions to , which are of the order . Consequently, with one population of galaxies the Doppler contribution to the correlation function is of the same order of magnitude as the gravitational potential contributions (d2, g1 and g2). Only in the case where one crosscorrelates two populations of galaxies, the Doppler contribution strongly dominates over the other relativistic contributions, because in this case does not vanish in the flatsky.
For , the SachsWolfe like term (g1) dominates over the other corrections at all scales. For this term still dominates at small separation, but at large separation the fullsky corrections to the Doppler term become important and dominates over g1. Interestingly the second SachsWolfe like term (g2) and the second Doppler term (d2) are nearly equal for both values of . It is easy to derive from the continuity and the Poisson equations that in a matter dominated Universe , hence if , see Eqs. (2.33) and (2.35). At lower redshifts, when domination sets in, we expect this equality to be less precise. The relativistic terms not shown in Fig. 3 are the Shapiro time delay (g4) and the integrated SachsWolfe term (g5). These integrated terms are always subdominant with respect to the lensing term.
Let us also note that the difference between the flatsky standard term and the fullsky standard term is of the same order of magnitude as the relativistic terms depicted in the bottom panel of Fig. 3. It is therefore not consistent to use the flatsky approximation for the standard terms when investigating relativistic effects.
Finally we should point out that in this work we present the theoretical contributions of relativistic effects on the correlation function and the power spectrum (see Figs. 3, 8, 11, 16 and 17). To estimate the observational impact of these terms one should build a realistic estimator and proceed with signaltonoise analysis, forecasts and constraints for a specific survey. Such studies have been performed for the angular power spectrum in [19, 45, 50, 47, 48, 51] and for the antisymmetric part of the correlation function in [52]. In a future work [44], we will develop this for the multipoles of the correlation function and the power spectrum. This will allow us to compare the observational impact of the relativistic effects on the angular power spectrum with their impact on the multipoles of the correlation function and power spectrum, which are the standard observables currently used in largescale structure surveys to measure the growth rate .
2.2 Direct determination of the correlation function
In the calculation of the correlation function presented in the previous section, we still need all the for an accurate calculation. Hence the reason (1) given in the introduction for the use of the correlation function and the power spectrum is not satisfied: the calculation is not simplified. To compute the correlation function for thousands of spectroscopic redshifts in an MCMC would still take months even if very highly parallelised. In this section we show how to improve this. The method explained in this section reduces the calculation of several thousand ’s into just several terms. This results in a very significant speed up so that the computation becomes feasible.
We expand on a method introduced in [39] which avoids the computation of but requires integrations in space and over the lineofsight, as we shall see. In this method, no flatsky approximation is performed, and the correlation function is therefore exact, within linear perturbation theory. We start from expression (1.1) for the correlation function and use that the are of the form (see [18]),
(2.28) 
Here denotes the primordial power spectrum, determined by the amplitude and the primordial spectral index :
and , are the FourierBessel transforms of the terms defined in (2.2) to (2.11). More precisely
(2.29)  
(2.30)  
(2.31)  
(2.32)  
(2.33)  
(2.34)  
(2.35)  
(2.36)  
(2.37)  
(2.38) 
Here are the spherical Bessel functions and the functions are the transfer functions for the variable which we specify in Appendix B. Overdots indicate derivatives with respect to conformal time. For the evolution bias , the magnification bias and the galaxy bias we follow the conventions of [18]. From these expressions one also infers the scaling of the different terms with respect to the density term. On subHubble scales, , the scaling of these terms with powers of is a simple consequence of Newtonian physics. The continuity equation implies and the Poisson equation yields , we see that the density, RSD and lensing terms dominate, while the Doppler term d1 is suppressed by one factor of , and all other terms are suppressed by . For this reason all relativistic terms apart from lensing are strongly suppressed on subhorizon scales and we call them ’largescale contributions’. Most of them are relevant only on very large scales close to . Exceptions to this rule are and which contain a prefactor which becomes large at very low redshift where is small. On super horizon scales all the transfer functions are typically of the same order but they become gauge dependent.
Using these expressions, the correlation function can be written as
(2.39) 
where we define
(2.40) 
In most of the terms we have a sum of the form
(2.41) 
where (see e.g. [53] (10.1.45)). Inserting (2.41) into (2.39) we can easily calculate the correlation function for these terms avoiding the numerically costly sum over the ’s. The redshiftspace distortion and the Doppler term give rise to contributions that are slightly different because they contain first and second derivatives of the spherical Bessel functions with respect to and . These terms can however be treated in a very similar way using recurrence relations for the spherical Bessel function. For this we define
(2.42) 
where we have set and . Using
we can determine explicit expressions for the for . They are all given in Appendix B.
The only coefficients that do not fall into this category are the ones in which contain additional factors and (see Eq. (2.31)). These terms can however be computed using the identity
They are given by
(2.43) 
(2.44) 
where LL denotes the correlation of lensing with itself and L the crosscorrelation of lensing with one of the other terms. With this we can build all the functions and hence, with Eq. (2.39), the correlation function. The complete list of is given in Appendix B. Here we just report the dominant contributions, i.e. the contributions which are not suppressed with additional powers of with respect to the density term:
Note that here and in the following we suppress the argument in the functions for simplicity. The correlation function is then given by Eq. (2.39). For example, the correlation function including only the standard terms is given by