Skip to content

Commit

Permalink
Merge pull request #339 from LSSTDESC/halo_model
Browse files Browse the repository at this point in the history
Halo model for power spectrum calculation
  • Loading branch information
elisachisari authored Aug 21, 2018
2 parents 3b5055c + b401f07 commit 73f6413
Show file tree
Hide file tree
Showing 299 changed files with 19,925 additions and 3,917 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,21 @@ install-record.txt
.deps
.dirstamp
class/build
class/
autom4te.cache/

# Ignore test outputs
tests/ccl_test_distances
tests/ccl_test_power
tests/ccl_test_utils
tests/check_ccl
tests/ccl_sample_pkemu
tests/ccl_sample_pkemu.cpp
tests/ccl_sample_run
tests/ccl_sample_run.cpp
tests/ccl_test_halomod
tests/specs_example_tomo_clu.out
tests/specs_example_tomo_lens.out

# Ignores compiled examples
examples/CMakeFiles
Expand Down Expand Up @@ -61,6 +70,9 @@ pyccl.egg*
# Ignore VCS files
.idea/*

# Ignore emacs backup files
*~

# Ignore rope project
.ropeproject

Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# v 0.4 API changes:

Summary: added halo model matter power spectrum calculation and halo mass-concentration relations. Change to sigma(R) function so that it now has time depdence: it is now sigma(R,a). Added a sigmaV(R,a) function, where sigmaV(R,a) is the variance in the displacement field smoothed on scale R at scale-factor a.

## C library
In ccl_halomod.c:

Added this source file. Contains functions to compute halo-model matter power spectra and also mass-concentration relations.

In ccl_power.c

Added sigmaV, changed sigma(R) -> sigma(R,a)

In ccl_massfunc.c

Added Sheth & Tormen (1999) mass function.

## Python library

sigmaR(R) defaults to sigmaR(R,a=1) unless a is specified. sigmaV(R) is also added. New functions ccl.halomodel_matter_power and ccl.halo_concentration.

# v 0.3 API changes:

Summary: the user interface for setting up cosmologies with neutrinos has been altered. Users should from now on pass Neff, the effective number of relativistic neutrino species in the early universe, and mnu, either a sum or neutrino masses or a set of 3 neutrinos masses.
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project(ccl VERSION 0.2.1)
# Defines list of CCL src files
set(CCL_SRC src/ccl_background.c src/ccl_core.c src/ccl_error.c src/ccl_lsst_specs.c src/ccl_placeholder.c
src/ccl_power.c src/ccl_utils.c src/ccl_cls.c src/ccl_massfunc.c src/ccl_neutrinos.c
src/ccl_emu17.c src/ccl_correlation.c src/fftlog.c)
src/ccl_emu17.c src/ccl_correlation.c src/ccl_halomod.c src/fftlog.c)

# Defines list of CCL tests src files
# ! Add new tests to this list
Expand All @@ -19,7 +19,7 @@ project(ccl VERSION 0.2.1)
tests/ccl_test_massfunc.c tests/ccl_test_correlation.c tests/ccl_test_correlation_3d.c
tests/ccl_test_bcm.c tests/ccl_test_emu.c tests/ccl_test_emu_nu.c
tests/ccl_test_distances_mnu.c tests/ccl_test_distances_hiz_mnu.c
tests/ccl_test_power_nu.c tests/ccl_test_nonlimber.c tests/ccl_test_angpow.c)
tests/ccl_test_nonlimber.c tests/ccl_test_angpow.c tests/ccl_test_halomod.c tests/ccl_test_power_nu.c )


# Defines list of extra distribution files and directories to be installed on the system
Expand Down
Binary file modified doc/0000-ccl_note/0000-ccl_note.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions doc/0000-ccl_note/authors.csv
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Lorenz,Christiane,Christiane S. Lorenz,Contributor,"Department of Physics, Unive
Marshall,Phil,Phil Marshall,Contributor,"SLAC National Accelerator Laboratory, Menlo Park, CA 94025, USA",Helped with document preparation.,[email protected]
McClintock, Thomas,Thomas McClintock, Contributor,"Univeristy of Arizona, Tucson, AZ 85721, USA",Wrote Python documentation.,[email protected]
McLaughlin, Sean,Sean McLaughlin, Contributor,"Stanford University, Stanford, CA, 94305, USA",Wrote doxygen documentation and fixed bugs/added functionality to distances., [email protected]
Mead,Alexander,Alexander Mead, Contributor,"Department of Physics and Astronomy, University of British Columbia, 6224 Agricultural Road, Vancouver, BC V6T 1Z1, Canada",Wrote halo model code, [email protected]
Neveu,J\'er\'emy,J\'er\'emy Neveu,Contributor,"Laboratoire de l'Acc\'el\'erateur Lin\'eaire, Universit\'e Paris-Sud, CNRS/IN2P3, Universit\'e Paris-Saclay, Orsay, France",Contributed to Angpow and built the interface with CCL.,[email protected]
Plaszczynski,St\'ephane,St\'ephane Plaszczynski,Contributor,"Laboratoire de l'Acc\'el\'erateur Lin\'eaire, Universit\'e Paris-Sud, CNRS/IN2P3, Universit\'e Paris-Saclay, Orsay, France",Contributed to Angpow and contributed to the interface with CCL.,[email protected]
Sanchez,Javier,Javier Sanchez,Contributor,"Department of Physics and Astronomy, University of California, Irvine, CA 92697, USA",Modified setup.py to allow pip installation and uninstall.,[email protected]
Expand Down
2 changes: 2 additions & 0 deletions doc/0000-ccl_note/authors.tex
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
\affiliation{Univeristy of Arizona, Tucson, AZ 85721, USA}
\author{Sean McLaughlin}
\affiliation{Stanford University, Stanford, CA, 94305, USA}
\author{Alexander Mead}
\affiliation{Department of Physics and Astronomy, University of British Columbia, 6224 Agricultural Road, Vancouver, BC V6T 1Z1, Canada}
\author{J\'er\'emy Neveu}
\affiliation{Laboratoire de l'Acc\'el\'erateur Lin\'eaire, Universit\'e Paris-Sud, CNRS/IN2P3, Universit\'e Paris-Saclay, Orsay, France}
\author{St\'ephane Plaszczynski}
Expand Down
1 change: 1 addition & 0 deletions doc/0000-ccl_note/contributions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Phil Marshall: Helped with document preparation. \\
Thomas McClintock: Wrote Python documentation. \\
Sean McLaughlin: Wrote doxygen documentation and fixed bugs/added functionality to distances. \\
Alexander Mead: Wrote halo model code \\
J\'er\'emy Neveu: Contributed to Angpow and built the interface with CCL. \\
St\'ephane Plaszczynski: Contributed to Angpow and contributed to the interface with CCL. \\
Javier Sanchez: Modified setup.py to allow pip installation and uninstall. \\
Expand Down
155 changes: 155 additions & 0 deletions doc/0000-ccl_note/main.bib
Original file line number Diff line number Diff line change
Expand Up @@ -750,3 +750,158 @@ @article{Mangano2005
keywords = "Early universe, Neutrinos, Non-equilibrium kinetics"
}

@article{Bullock2001,
author = {Bullock, J. S. and Kolatt, T. S. and Sigad, Y. and Somerville, R. S. and Kravtsov, A. V. and Klypin, A. A. and Primack, J. R. and Dekel, A.},
doi = {10.1046/j.1365-8711.2001.04068.x},
issn = {0035-8711},
journal = {\mnras},
keywords = {cosmology: theory,dark matter,galaxies: formation,galaxies: structure},
month = mar,
number = {3},
pages = {559--575},
title = {{Profiles of dark haloes: evolution, scatter and environment}},
url = {http://adsabs.harvard.edu/abs/2001MNRAS.321..559B},
volume = {321},
year = {2001}
}

@article{Cooray2002,
author = {Cooray, A. and Sheth, R.},
doi = {10.1016/S0370-1573(02)00276-4},
issn = {03701573},
journal = {Physics Reports},
month = dec,
number = {1},
pages = {1--129},
title = {{Halo models of large scale structure}},
url = {http://adsabs.harvard.edu/abs/2002PhR...372....1C},
volume = {372},
year = {2002}
}

@ARTICLE{Giocoli2010,
author = {{Giocoli}, C. and {Bartelmann}, M. and {Sheth}, R.~K. and {Cacciato}, M.
},
title = "{Halo model description of the non-linear dark matter power spectrum at k {\gt}{\gt} 1Mpc$^{-1}$}",
journal = {\mnras},
archivePrefix = "arXiv",
eprint = {1003.4740},
keywords = {gravitational lensing: weak, methods: analytical, galaxies: haloes, cosmology: theory, dark matter},
year = 2010,
month = oct,
volume = 408,
pages = {300-313},
doi = {10.1111/j.1365-2966.2010.17108.x},
adsurl = {http://adsabs.harvard.edu/abs/2010MNRAS.408..300G},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Mo1996,
author = {{Mo}, H.~J. and {White}, S.~D.~M.},
title = "{An analytic model for the spatial clustering of dark matter haloes}",
journal = {\mnras},
eprint = {astro-ph/9512127},
keywords = {METHODS: ANALYTICAL, GALAXIES: CLUSTERS: GENERAL, GALAXIES: FORMATION, COSMOLOGY: THEORY, DARK MATTER},
year = 1996,
month = sep,
volume = 282,
pages = {347-361},
adsurl = {http://adsabs.harvard.edu/abs/1996MNRAS.282..347M},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@article{Navarro1997,
author = {Navarro, Julio F. and Frenk, Carlos S. and White, Simon D. M.},
doi = {10.1086/304888},
issn = {0004-637X},
journal = {\apj},
keywords = {COSMOLOGY: DARK MATTER,COSMOLOGY: THEORY,GALAXIES: HALOS,METHODS: NUMERICAL},
month = dec,
number = {2},
pages = {493--508},
title = {{A Universal Density Profile from Hierarchical Clustering}},
url = {http://adsabs.harvard.edu/abs/1997ApJ...490..493N},
volume = {490},
year = {1997}
}

@ARTICLE{Peacock2000,
author = {{Peacock}, J.~A. and {Smith}, R.~E.},
title = "{Halo occupation numbers and galaxy bias}",
journal = {\mnras},
eprint = {astro-ph/0005010},
keywords = {GALAXIES: CLUSTERS: GENERAL, COSMOLOGY: THEORY, LARGE-SCALE STRUCTURE OF UNIVERSE},
year = 2000,
month = nov,
volume = 318,
pages = {1144-1156},
doi = {10.1046/j.1365-8711.2000.03779.x},
adsurl = {http://adsabs.harvard.edu/abs/2000MNRAS.318.1144P},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Seljak2000,
author = {{Seljak}, U.},
title = "{Analytic model for galaxy and dark matter clustering}",
journal = {\mnras},
eprint = {arXiv:astro-ph/0001493},
keywords = {GALAXIES: CLUSTERS: GENERAL, COSMOLOGY: THEORY, DARK MATTER},
year = 2000,
month = oct,
volume = 318,
pages = {203-213},
doi = {10.1046/j.1365-8711.2000.03715.x},
adsurl = {http://adsabs.harvard.edu/abs/2000MNRAS.318..203S},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@article{Sheth2001,
author = {Sheth, Ravi K. and Mo, H. J. and Tormen, Giuseppe},
doi = {10.1046/j.1365-8711.2001.04006.x},
issn = {0035-8711},
journal = {\mnras},
keywords = {COSMOLOGY: THEORY,DARK MATTER,GALAXIES: CLUSTERS: GENERAL},
month = may,
number = {1},
pages = {1--12},
title = {{Ellipsoidal collapse and an improved model for the number and spatial distribution of dark matter haloes}},
url = {http://adsabs.harvard.edu/abs/2001MNRAS.323....1S},
volume = {323},
year = {2001}
}

@ARTICLE{Smith2007,
author = {{Smith}, R.~E. and {Scoccimarro}, R. and {Sheth}, R.~K.},
title = "{Scale dependence of halo and galaxy bias: Effects in real space}",
journal = {\prd},
eprint = {astro-ph/0609547},
keywords = {Cosmology},
year = 2007,
month = mar,
volume = 75,
number = 6,
eid = {063512},
pages = {063512},
doi = {10.1103/PhysRevD.75.063512},
adsurl = {http://adsabs.harvard.edu/abs/2007PhRvD..75f3512S},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

@ARTICLE{Smith2011,
author = {{Smith}, R.~E. and {Markovic}, K.},
title = "{Testing the warm dark matter paradigm with large-scale structures}",
journal = {\prd},
archivePrefix = "arXiv",
eprint = {1103.2134},
primaryClass = "astro-ph.CO",
keywords = {Cosmology},
year = 2011,
month = sep,
volume = 84,
number = 6,
eid = {063507},
pages = {063507},
doi = {10.1103/PhysRevD.84.063507},
adsurl = {http://adsabs.harvard.edu/abs/2011PhRvD..84f3507S},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
Binary file modified doc/0000-ccl_note/main.pdf
Binary file not shown.
58 changes: 58 additions & 0 deletions doc/0000-ccl_note/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -886,11 +886,69 @@ \subsection{Halo mass \& halo bias functions}
\begin{equation}
b(\nu) = 1 - A\frac{\nu^a}{\nu^a + {\delta_c}^a} + B\nu^b+C\nu^c,
f(\nu) = \alpha[1+(\beta\nu)^{-2\phi}]\nu^{2\eta}e(-\gamma\nu^2/2).
\label{eq:halo_bias_and_mass_function}
\end{equation}
The currently implemented model in \ccl allows for an arbitrary overdensity $\Delta$ to be chosen, using the fitting functions provided in \citet{Tinker2010}. Other halo model definitions are not included in the halo bias calculation, though this remains an area of active work to improve upon.

The halo mass function and related quantities

% Written by Alexander Mead
\subsection{Halo model}
\label{sec:halo_model}

The routines described in this subsection are implemented in {\tt ccl$\_$halomod.c}.

In this section we review a basic halo-model computation \citep{Seljak2000,Peacock2000,Cooray2002} of the cross-correlation between any two cosmological fields and only requires knowledge of the halo profiles of the field in question. For example, in the case of the matter-density auto spectrum we need only know the halo density profiles. For the galaxy spectrum we require knowledge of the number of, and distribution of, galaxies as a function of halo mass. In this simple form the halo model is approximate and makes the assumption that haloes are \emph{linearly} biased with respect to the \emph{linear} matter field and also assumes that haloes are spherical with properties that are determined solely by the halo mass. It is possible to go beyond these simplified assumptions, and we direct the interested reader to \cite{Cooray2002,Smith2007,Giocoli2010,Smith2011}.

The eventual aim for CCL is to have a halo model that can calculate the auto- and cross-spectra for any cosmological field combinations with parameters that can be taken either from numerical simulations or observational data. Currently we have only implemented the case of the matter-density auto spectrum, but we keep the notation as general as possible in the following:

Consider two 3D cosmological fields $\rho_i$ and $\rho_j$, the cross power spectrum at a given redshift can be written as a sum of a two- and a one-halo term given by
\begin{equation}
P_{2\mathrm{H},ij}(k)=P_{\mathrm{lin}}(k)
\prod_{n=i,j}\left[\int_0^\infty b(M)\frac{\mathrm{d}n}{\mathrm{d}M}W_n(M,k)\;\mathrm{d}M\right]\ ,
\label{eq:two_halo}
\end{equation}
\begin{equation}
P_{1\mathrm{H},ij}(k)=\int_0^\infty \frac{\mathrm{d}n}{\mathrm{d}M}W_i(M,k)W_j(M,k)\;\mathrm{d}M\ ,
\label{eq:one_halo}
\end{equation}
where $M$ is the halo mass, $\mathrm{d}n/\mathrm{d}M$ is the halo mass function defined as the first of equations~(\ref{eq:halo_bias_and_mass_function}) and $b(M)$ is the linear halo bias with respect to the linear matter density field, defined as the large-scale limit of the second of equations~(\ref{eq:halo_bias_and_mass_function}).

Equations~(\ref{eq:two_halo}) and (\ref{eq:one_halo}) contain the (spherical) Fourier transform of the halo profile, or halo `window function':
\begin{equation}
W_i(M,k)=\int_0^\infty4\pi r^2\frac{\sin(kr)}{kr}\rho_{\mathrm{H},i}(M,r)\;\mathrm{d}r\ ,
\label{eq:window_function}
\end{equation}
where $\rho_{\mathrm{H},i}(M,r)$ is the radial profile for the field $i$ in a host halo of mass $M$. For example, if one is interested in matter fields then this would be the halo density profile, if one were interested in galaxies then this would be the number density and distribution of galaxies around a halo of mass $M$.

Note that the halo mass function and bias \emph{must} satisfy the following properties for the total power spectrum to have the correct large-scale limit\footnote{Note that achieving these correct limits for some fields is difficult numerically because of the large amount of mass contained in low mass haloes according to most popular mass functions. Special care must be taken with the two-halo integral in the case of matter power spectra.}:
\begin{equation}
\frac{1}{\bar\rho_\mathrm{m}}\int_0^\infty M\frac{\mathrm{d}n}{\mathrm{d}M}\;\mathrm{d}M=1\ ,
\label{eq:mf_normalisation}
\end{equation}
\begin{equation}
\frac{1}{\bar\rho_\mathrm{m}}\int_0^\infty Mb(M)\frac{\mathrm{d}n}{\mathrm{d}M}\;\mathrm{d}M=1\ .
\label{eq:bias_normalisation}
\end{equation}
If one uses a mass function and bias pair that are related via the peak-background split formalism \citep{Mo1996,Sheth2001}, these conditions are automatically satisfied. In words these equations enforce that all matter is associated to a halo and that matter is on average unbiased with respect to itself. In the convention used in CCL the units of $P(k)$ will be exactly the units of $\rho_i\rho_j / \mathrm{Mpc}^3$. The units of the $W_i$ are those of $\rho_i$ multiplied by volume.

For the matter power spectrum we use the halo profiles of \citeauthor*{Navarro1997} (NFW; \citeyear{Navarro1997}):
\begin{equation}
\rho_\mathrm{H}(M,r)\propto\frac{1}{r/r_\mathrm{s}(1+r/r_\mathrm{s})^2}\ ,
\label{eq:NFW_profile}
\end{equation}
which is written in terms of a scale radius $r_\mathrm{s}$. The constant of proportionality fixed by the condition that the halo has total mass $M$ when the boundary is set at the virial radius $r_\mathrm{v}$, which is set such that the halo has a fixed density $\Delta_\mathrm{v}$ with respect to the mean
\begin{equation}
M=4\pi r_\mathrm{v}^3\Delta_\mathrm{v}\bar\rho\ .
\label{eq:virial_radius}
\end{equation}
Finally, the scale radius is usually expressed in terms of the mass-dependent halo concentration parameter $c(M)=r_\mathrm{v}/r_\mathrm{s}$. We use the simple mass-concentration relation from \cite{Bullock2001}
\begin{equation}
c(M)=9\left(\frac{M}{M_*}\right)^{-0.13}\ ,
\end{equation}
where $\delta_\mathrm{c}/\sigma(M_*)=1$.
Note that, in order to be consistent, one should use a value of $\Delta_\mathrm{v}$ and $c(M)$ that is consistent with the halo definition used for the halo mass function and bias.

\subsection{Photo-$z$ implementation}
\label{sec:photoz}
The functionality described in this section is implemented in {\tt ccl\_lsst\_specs.c}.
Expand Down
Loading

0 comments on commit 73f6413

Please sign in to comment.