Skip to content

Commit

Permalink
Merge pull request #351 from LSSTDESC/physicaldensity
Browse files Browse the repository at this point in the history
Physical density function
  • Loading branch information
sjoudaki committed Apr 11, 2018
2 parents 543e13d + 7db3995 commit 841a085
Show file tree
Hide file tree
Showing 346 changed files with 11,857 additions and 9,030 deletions.
Binary file modified doc/0000-ccl_note/0000-ccl_note.pdf
Binary file not shown.
7 changes: 4 additions & 3 deletions doc/0000-ccl_note/authors.csv
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,26 @@
# =============================================================================,,,,,,
Lastname,Firstname,Authorname,AuthorType,Affiliation,Contribution,Email
Almoubayyed,Husni,Husni Almoubayyed,Contributor,"McWilliams Center for Cosmology, Department of Physics, Carnegie Mellon University, Pittsburgh, PA 15213, USA","wrote an mcmc jupyter notebook example, reviewed code/contributed to issues.",halmouba@andrew.cmu.edu
Alonso,David,David Alonso,Contributor,"Department of Physics, University of Oxford, Denys Wilkinson building, Keble Road, Oxford OX1 3RH, United Kingdom","Co-led project; developed structure for angular power spectra; implemented autotools; integrated into LSS pipeline; contributed to: background, power spectrum, mass function, documentation and benchmarks; reviewed code",david.alonso@physics.ox.ac.uk
Alonso,David,David Alonso,Contributor,"Department of Physics, University of Oxford, Denys Wilkinson Building, Keble Road, Oxford OX1 3RH, United Kingdom","Co-led project; developed structure for angular power spectra; implemented autotools; integrated into LSS pipeline; contributed to: background, power spectrum, mass function, documentation and benchmarks; reviewed code",david.alonso@physics.ox.ac.uk
Blazek,Jonathan,Jonathan Blazek,Contributor,"Center for Cosmology and Astroparticle Physics, Ohio State, Columbus, OH 43210, USA",Planning capabilities and structure; documentation and testing.,blazek.35@osu.edu
Blazek,Jonathan,Jonathan Blazek,Contributor,"Laboratory of Astrophysics, \'Ecole Polytechnique F\'ed\'erale de Lausanne (EPFL), Observatoire de Sauverny, 1290 Versoix, Switzerland",Planning capabilities and structure; documentation and testing.,blazek.35@osu.edu
Bull,Philip,Philip Bull,Contributor,"California Institute of Technology, Pasadena, CA 91125, USA","Implemented the Python wrapper and wrote documentation for it; general bug fixes, maintenance, and code review; enhanced the installer and error handling system.",philbull@gmail.com
Bull,Philip,Philip Bull,Contributor,"Jet Propulsion Laboratory, California Institute of Technology, 4800 Oak Grove Drive, Pasadena, California, USA","Implemented the Python wrapper and wrote documentation for it; general bug fixes, maintenance, and code review; enhanced the installer and error handling system.",philbull@gmail.com
Campagne,Jean-\'Eric,Jean-\'Eric Campagne,Contributor,"Laboratoire de l'Acc\'el\'erateur Lin\'eaire, Universit\'e Paris-Sud, CNRS/IN2P3, Universit\'e Paris-Saclay, Orsay, France",Angpow builder and contributed to the interface with CCL.,campagne@lal.in2p3.fr
Chisari,Elisa,N. Elisa Chisari,Contributor,"Department of Physics, University of Oxford, Denys Wilkinson building, Keble Road, Oxford OX1 3RH, United Kingdom","Co-led project, coordinated hack projects \& communication, contributed to: correlation function \& power spectrum implementation, documentation, and comparisons with benchmarks.",elisa.chisari@physics.ox.ac.uk
Chisari,Elisa,N. Elisa Chisari,Contributor,"Department of Physics, University of Oxford, Denys Wilkinson Building, Keble Road, Oxford OX1 3RH, United Kingdom","Co-led project, coordinated hack projects \& communication, contributed to: correlation function \& power spectrum implementation, documentation, and comparisons with benchmarks.",elisa.chisari@physics.ox.ac.uk
Drlica-Wagner,Alex,Alex Drlica-Wagner,Contact,"Fermi National Accelerator Laboratory, P. O. Box 500, Batavia, IL 60510, USA",Helped with document preparation.,kadrlica@fnal.gov
Du,Zilong,"Zilong Du",Contributor,"Department of Physics and Astronomy, University of California, Riverside, CA 92521, USA","Implemented the 3d correlation function.",zdu011@ucr.edu
Eifler,Tim,Tim Eifler,Contributor,"Jet Propulsion Laboratory, California Institute of Technology, Pasadena, CA 91109, USA",Reviewed/tested code.,tim.eifler@jpl.nasa.gov
Eifler,Tim,Tim Eifler,Contributor,"Department of Physics, California Institute of Technology, Pasadena, CA 91125, USA",Reviewed/tested code.,tim.eifler@jpl.nasa.gov
Ellison,John,"John Ellison",Contributor,"Department of Physics and Astronomy, University of California, Riverside, CA 92521, USA","Implemented the 3d correlation function; wrote text describing 3d correlation function for this note.",john.ellison@ucr.edu
Hlozek,Ren\'ee,Ren\'ee Hlozek,Contributor,"Dunlap Institute for Astronomy and Astrophysics \& Department for Astronomy and Astrophysics, University of Toronto, ON M5S 3H4","Contributed initial code for error handling structures, reviewed other code edits.", hlozek@dunlap.utoronto.ca
Ishak, Mustapha,Mustapha Ishak,Contributor,"Department of Physics, The University of Texas at Dallas, Richardson, TX 75083, USA",Contributed to planning of code capabilities and structure; reviewed code; identified and fixed bugs.,mishak@utdallas.edu
Joudaki,Shahab,Shahab Joudaki,Contributor,"Department of Physics, University of Oxford, Denys Wilkinson Building, Keble Road, Oxford OX1 3RH, United Kingdom","Created physical density function and documentation.",shahab.joudaki@physics.ox.ac.uk
Kirby, Matthew,Matthew Kirby, Contributor,"Univeristy of Arizona, Tucson, AZ 85721, USA",Performed comparison of physical constants.,matthewkirby@email.arizona.edu
Kirkby,David,David Kirkby,Contributor,"Department of Physics and Astronomy, University of California, Irvine, CA 92697, USA","Writing, testing and reviewing code. Asking questions.",dkirkby@uci.edu
Krause,Elisabeth,Elisabeth Krause,Contributor,"Kavli Institute for Particle Astrophysics and Cosmology, Stanford, CA 94305-4085, USA",Initiated and co-led project; developed CLASS interface and error handling; contributed to other code; reviewed pull requests.,lise@slac.stanford.edu
Leonard,Danielle,C. Danielle Leonard,Contributor,"McWilliams Center for Cosmology, Department of Physics, Carnegie Mellon University, Pittsburgh, PA 15213, USA","Wrote and tested code for LSST specifications, user-defined photo-z interface, and support of neutrinos; reviewed other code; wrote text for this note.",danielll@andrew.cmu.edu
Lorenz,Christiane,Christiane S. Lorenz,Contributor,"Department of Physics, University of Oxford, Denys Wilkinson building, Keble Road, Oxford OX1 3RH, United Kingdom","Contributed to accurate high-redshift cosmological background quantities and benchmarked background splines.",christiane.lorenz@physics.ox.ac.uk
Lorenz,Christiane,Christiane S. Lorenz,Contributor,"Department of Physics, University of Oxford, Denys Wilkinson Building, Keble Road, Oxford OX1 3RH, United Kingdom","Contributed to accurate high-redshift cosmological background quantities and benchmarked background splines.",christiane.lorenz@physics.ox.ac.uk
Marshall,Phil,Phil Marshall,Contributor,"SLAC National Accelerator Laboratory, Menlo Park, CA 94025, USA",Helped with document preparation.,pjm@slac.stanford.edu
McClintock, Thomas,Thomas McClintock, Contributor,"Univeristy of Arizona, Tucson, AZ 85721, USA",Wrote Python documentation.,tmcclintock@email.arizona.edu
McLaughlin, Sean,Sean McLaughlin, Contributor,"Stanford University, Stanford, CA, 94305, USA",Wrote doxygen documentation and fixed bugs/added functionality to distances., swmclau2@stanford.edu
Expand Down
8 changes: 5 additions & 3 deletions doc/0000-ccl_note/authors.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
\author{Husni Almoubayyed}
\affiliation{McWilliams Center for Cosmology, Department of Physics, Carnegie Mellon University, Pittsburgh, PA 15213, USA}
\author{David Alonso}
\affiliation{Department of Physics, University of Oxford, Denys Wilkinson building, Keble Road, Oxford OX1 3RH, United Kingdom}
\affiliation{Department of Physics, University of Oxford, Denys Wilkinson Building, Keble Road, Oxford OX1 3RH, United Kingdom}
\author{Jonathan Blazek}
\affiliation{Center for Cosmology and Astroparticle Physics, Ohio State, Columbus, OH 43210, USA}
\affiliation{Laboratory of Astrophysics, \'Ecole Polytechnique F\'ed\'erale de Lausanne (EPFL), Observatoire de Sauverny, 1290 Versoix, Switzerland}
Expand All @@ -14,7 +14,7 @@
\author{Jean-\'Eric Campagne}
\affiliation{Laboratoire de l'Acc\'el\'erateur Lin\'eaire, Universit\'e Paris-Sud, CNRS/IN2P3, Universit\'e Paris-Saclay, Orsay, France}
\author{N. Elisa Chisari}
\affiliation{Department of Physics, University of Oxford, Denys Wilkinson building, Keble Road, Oxford OX1 3RH, United Kingdom}
\affiliation{Department of Physics, University of Oxford, Denys Wilkinson Building, Keble Road, Oxford OX1 3RH, United Kingdom}
\author{Alex Drlica-Wagner}
\affiliation{Fermi National Accelerator Laboratory, P. O. Box 500, Batavia, IL 60510, USA}
\author{Zilong Du}
Expand All @@ -28,6 +28,8 @@
\affiliation{Dunlap Institute for Astronomy and Astrophysics \& Department for Astronomy and Astrophysics, University of Toronto, ON M5S 3H4}
\author{Mustapha Ishak}
\affiliation{Department of Physics, The University of Texas at Dallas, Richardson, TX 75083, USA}
\author{Shahab Joudaki}
\affiliation{Department of Physics, University of Oxford, Denys Wilkinson Building, Keble Road, Oxford OX1 3RH, United Kingdom}
\author{Matthew Kirby}
\affiliation{Univeristy of Arizona, Tucson, AZ 85721, USA}
\author{David Kirkby}
Expand All @@ -37,7 +39,7 @@
\author{C. Danielle Leonard}
\affiliation{McWilliams Center for Cosmology, Department of Physics, Carnegie Mellon University, Pittsburgh, PA 15213, USA}
\author{Christiane S. Lorenz}
\affiliation{Department of Physics, University of Oxford, Denys Wilkinson building, Keble Road, Oxford OX1 3RH, United Kingdom}
\affiliation{Department of Physics, University of Oxford, Denys Wilkinson Building, Keble Road, Oxford OX1 3RH, United Kingdom}
\author{Phil Marshall}
\affiliation{SLAC National Accelerator Laboratory, Menlo Park, CA 94025, USA}
\author{Thomas McClintock}
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 @@ -11,6 +11,7 @@
John Ellison: Implemented the 3d correlation function; wrote text describing 3d correlation function for this note. \\
Ren\'ee Hlozek: Contributed initial code for error handling structures, reviewed other code edits. \\
Mustapha Ishak: Contributed to planning of code capabilities and structure; reviewed code; identified and fixed bugs. \\
Shahab Joudaki: Created physical density function and documentation. \\
Matthew Kirby: Performed comparison of physical constants. \\
David Kirkby: Writing, testing and reviewing code. Asking questions. \\
Elisabeth Krause: Initiated and co-led project; developed CLASS interface and error handling; contributed to other code; reviewed pull requests. \\
Expand Down
Binary file modified doc/0000-ccl_note/main.pdf
Binary file not shown.
24 changes: 21 additions & 3 deletions doc/0000-ccl_note/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ \subsection{Density parameter functions}
The density parameter functions $\Omega_X(a)$ can be calculated for six components:
\begin{itemize}
\item matter density parameter $\Omega_M(a) = \Omega_{M,0} H_0^2 / (a^3 H^2(a) )$,
\item dark energy density parameter $\Omega_\Lambda(a) = \Omega_{\Lambda,0} H_0^2 / H^2(a)$,
\item dark energy density parameter $\Omega_\Lambda(a) = \Omega_{\Lambda,0} a^{-3(1+w_0+w_a)} \exp[3 w_a (a-1)] H_0^2 / H^2(a)$,
\item radiation density parameter $\Omega_g(a) = \Omega_{g,0} H_0^2 / (a^4 H^2(a) )$,
\item curvature density parameter $\Omega_K(a) = \Omega_{K,0} H_0^2 / (a^2 H^2(a) )$,
\item massless neutrino density parameter $\Omega_{\nu, {\rm rel}}(a) = \Omega_{\nu, {\rm rel},0} H_0^2 / (a^4 H^2(a) )$,
Expand All @@ -318,6 +318,24 @@ \subsection{Density parameter functions}
where $h_{\rm P}$ is Planck's constant and $h$ is $H_0/100$ with $H_0$ in units of km / s / Mpc. $x_{\rm max}$ is set to 1000. The final bracketed term which includes the phase-space integral can be simplified in the limit where $\mu$ is very large or very small: for small $\mu$, it is set to $\frac{7}{8}$, and for large $\mu$, it becomes $\frac{5\zeta(3)}{18\pi^4}\mu\sim 0.2776\mu$.


\subsection{Functions of the physical density}
\label{subsec:physicaldensity}

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

The physical density $\rho_X(a)$ can be calculated for seven components:
\begin{itemize}
\item critical density $\rho_{\rm crit}(a) = {{3 H^2(a)} \over { 8 \pi G}} = \rho_{\rm crit,0} H^2(a) / H_0^2$,
\item matter density $\rho_M(a) = \rho_{\rm crit}(a) \Omega_M(a) = \rho_{\rm crit,0} \Omega_{M,0} / a^{3}$,
\item dark energy density parameter $\rho_\Lambda(a) = \rho_{\rm crit,0} \Omega_{\Lambda,0} a^{-3(1+w_0+w_a)} \exp[3 w_a (a-1)]$,
\item radiation density parameter $\rho_g(a) = \rho_{\rm crit,0} \Omega_{g,0} / a^{4}$,
\item curvature density parameter $\rho_K(a) = \rho_{\rm crit,0} \Omega_{K,0} / a^{2}$,
\item massless neutrino density parameter $\rho_{\nu, {\rm rel}}(a) = \rho_{\rm crit,0} \Omega_{\nu, {\rm rel},0} / a^{4}$,
\item massive neutrino density parameter $\Omega_{\nu, {\rm m}}(a) = \rho_{\rm crit,0} \Omega_{\nu, {\rm m}}(a) H^2(a) / H_0^2$,
\end{itemize}
where $\Omega_{\nu, {\rm m}}(a)$ is given by equation~\ref{Omnu} and the Hubble parameter by equation~\ref{eq:Ha}. \ccl moreover allows for comoving physical densities $\rho_{X, {\rm comoving}}(a) = \rho_X(a) a^3$.


\subsection{Growth function}
\label{sec:growth}

Expand Down Expand Up @@ -973,7 +991,7 @@ \section{Tests and validation}
redshifts $z = 0,1,2,3,4,5$. We then compared with the $\xi(r)$ from CCL with a sampling of $P(k)$
equal to {\tt N$\_$K$\_$3DCOR} bins per decade. The default value of {\tt N$\_$K$\_$3DCOR}~=~100,000 results in a relative agreement
at the level of $\Delta \xi(r) / \xi(r) < 2.5 \times 10^{-3}$ for $0.1 < r < 250$~Mpc and redshift zero. The agreement is better for higher redshifts.
We also compared the absolute value of $r^2 \xi(r)$ and find a maximum difference of \Delta (r^2 \xi(r)) < 3.0 \times 10^{-2}$ for the range
We also compared the absolute value of $r^2 \xi(r)$ and find a maximum difference of $\Delta (r^2 \xi(r)) < 3.0 \times 10^{-2}$ for the range
$r = 0.1 - 250$~Mpc. This corresponds to approximately 0.08\% of the BAO peak value of $r^2 \xi(r)$. At the BAO peak, the difference is
only $9.0 \times 10^{-3}$, or 0.024\% of the peak height. The results are shown in Fig.~\ref{fig:benchmark_xi}
%
Expand All @@ -993,7 +1011,7 @@ \section{Tests and validation}
\begin{figure*}[htbp]
\centering
\includegraphics[width=0.47\textwidth]{analytic_xi}
\caption{The relative error in the 3d spatial correlation function computed using the CCL algorithm compared to an analytic function $\xi(r) = (r/r_0)^a$ whose inverse transform $P(k)$ is known analytically. In this validation test, the known $P(k)$ was transformed with the CCL algorithm and compared to the known analytic result for $\xi(r).}
\caption{The relative error in the 3d spatial correlation function computed using the CCL algorithm compared to an analytic function $\xi(r) = (r/r_0)^a$ whose inverse transform $P(k)$ is known analytically. In this validation test, the known $P(k)$ was transformed with the CCL algorithm and compared to the known analytic result for $\xi(r)$.}
\label{fig:analytic_xi}
\end{figure*}

Expand Down
Empty file removed doc/0000-ccl_note/mainNotes.bib
Empty file.
80 changes: 80 additions & 0 deletions doc/html/_8#ccl__test__emu__nu_8c.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CCL: .#ccl_test_emu_nu.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">CCL
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_59425e443f801f1f2fd8bbe4959a3ccf.html">tests</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">.#ccl_test_emu_nu.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>

0 comments on commit 841a085

Please sign in to comment.