Skip to content

Commit

Permalink
Merge pull request #3477 from aconley/planck2015
Browse files Browse the repository at this point in the history
Add Planck 2015 cosmology
  • Loading branch information
astrofrog committed Feb 24, 2015
2 parents 688e70d + 33e3e51 commit 8f149fe
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 20 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -18,6 +18,8 @@ New Features

- ``astropy.cosmology``

- Add Planck 2015 cosmology [#3476]

- ``astropy.io.ascii``

- Automatically use ``guess=False`` when reading if the file ``format`` is
Expand Down
19 changes: 15 additions & 4 deletions astropy/cosmology/core.py
Expand Up @@ -26,7 +26,7 @@

__all__ = ["FLRW", "LambdaCDM", "FlatLambdaCDM", "wCDM", "FlatwCDM",
"Flatw0waCDM", "w0waCDM", "wpwaCDM", "w0wzCDM", "WMAP5", "WMAP7",
"WMAP9", "Planck13", "default_cosmology"]
"WMAP9", "Planck13", "Planck15", "default_cosmology"]

__doctest_requires__ = {'*': ['scipy.integrate']}

Expand Down Expand Up @@ -76,7 +76,8 @@ class FLRW(Cosmology):
Om0 : float
Omega matter: density of non-relativistic matter in units of the
critical density at z=0.
critical density at z=0. Note that this does not include
massive neutrinos.
Ode0 : float
Omega dark energy: density of dark energy in units of the critical
Expand Down Expand Up @@ -448,7 +449,7 @@ def w(self, z):
The dark energy equation of state
Notes
------
-----
The dark energy equation of state is defined as
:math:`w(z) = P(z)/\\rho(z)`, where :math:`P(z)` is the
pressure at redshift z and :math:`\\rho(z)` is the density
Expand All @@ -472,6 +473,11 @@ def Om(self, z):
Om : ndarray, or float if input scalar
The density of non-relativistic matter relative to the critical
density at each redshift.
Notes
-----
This does not include neutrinos, even if non-relativistic
at the redshift of interest; see `Onu`.
"""

if isiterable(z):
Expand Down Expand Up @@ -522,6 +528,10 @@ def Odm(self, z):
------
ValueError
If Ob0 is None.
Notes
-----
This does not include neutrinos, even if non-relativistic
at the redshift of interest.
"""

if self._Odm0 is None:
Expand Down Expand Up @@ -603,7 +613,8 @@ def Ogamma(self, z):
return self._Ogamma0 * (1. + z) ** 4 * self.inv_efunc(z) ** 2

def Onu(self, z):
""" Return the density parameter for massless neutrinos at redshift ``z``.
""" Return the density parameter for massless neutrinos at
redshift ``z``.
Parameters
----------
Expand Down
27 changes: 25 additions & 2 deletions astropy/cosmology/parameters.py
Expand Up @@ -24,6 +24,9 @@
The list of cosmologies available are given by the tuple
`available`. Current cosmologies available:
Planck 15 parameters from Planck Collaboration 2015, arXiv: 1502.01589
(Paper XIII), Table 4 (TT, TE, EE + lowP + lensing + ext)
Planck13 parameters from Planck Collaboration 2013, arXiv:1303.5076
(Paper XVI), Table 5 (Planck + WP + highL + BAO)
Expand All @@ -48,9 +51,29 @@

# Note: if you add a new cosmology, please also update the table
# in the 'Built-in Cosmologies' section of astropy/docs/cosmology/index.rst
# in addition to the list above.
# in addition to the list above. You also need to add them to
# __all__ in core.py

# Planck 2015 paper XII Table 4 final column (best fit)
Planck15 = dict(
Oc0=0.2589,
Ob0=0.04860,
Om0=0.3075,
H0=67.74,
n=0.9667,
sigma8=0.8159,
tau=0.066,
z_reion=8.8,
t0=13.799,
Tcmb0=2.7255,
Neff=3.046,
flat=True,
m_nu=[0., 0., 0.06],
reference=("Planck Collaboration 2015, Paper XII, arXiv:1502.01589"
" Table 4 (TT, TE, EE + lowP + lensing + ext)")
)

# Ade et al. Planck 2013 paper XVI Table 5 penultimate column (best fit)
# Planck 2013 paper XVI Table 5 penultimate column (best fit)
Planck13 = dict(
Oc0=0.25886,
Ob0=0.048252,
Expand Down
30 changes: 16 additions & 14 deletions docs/cosmology/index.rst
Expand Up @@ -241,14 +241,15 @@ the WMAP and Planck satellite data. For example,
A full list of the pre-defined cosmologies is given by
``cosmology.parameters.available``, and summarized below:

======== ============================= ==== ===== =======
Name Source H0 Om Flat
======== ============================= ==== ===== =======
WMAP5 Komatsu et al. 2009 70.2 0.277 Yes
WMAP7 Komatsu et al. 2011 70.4 0.272 Yes
WMAP9 Hinshaw et al. 2013 69.3 0.287 Yes
Planck13 Planck Collab 2013, Paper XVI 67.8 0.307 Yes
======== ============================= ==== ===== =======
======== ============================== ==== ===== =======
Name Source H0 Om Flat
======== ============================== ==== ===== =======
WMAP5 Komatsu et al. 2009 70.2 0.277 Yes
WMAP7 Komatsu et al. 2011 70.4 0.272 Yes
WMAP9 Hinshaw et al. 2013 69.3 0.287 Yes
Planck13 Planck Collab 2013, Paper XVI 67.8 0.307 Yes
Planck15 Planck Collab 2015, Paper XIII 67.7 0.307 Yes
======== ============================== ==== ===== =======

Currently, all are instances of `~astropy.cosmology.FlatLambdaCDM`.
More details about exactly where each set of parameters come from
Expand Down Expand Up @@ -308,8 +309,9 @@ This is not the simple
:math:`\Omega_{\nu 0} h^2 = \sum_i m_{\nu\, i} / 93.04\,\mathrm{eV}`
approximation. Also note that the values of :math:`\Omega_{\nu}(z)`
include both the kinetic energy and the rest-mass energy components,
and that the Planck13 cosmology includes a single species of neutrinos
with non-zero mass (which is not included in :math:`\Omega_{m0}`).
and that the Planck13 and Planck15 cosmologies includes a single
species of neutrinos with non-zero mass (which is not included in
:math:`\Omega_{m0}`).

The contribution of photons and neutrinos to the total mass-energy density
can be found as a function of redshift::
Expand Down Expand Up @@ -437,10 +439,10 @@ please let us know by `opening an issue at the github repository
The built in cosmologies use the parameters as listed in the
respective papers. These provide only a limited range of precision,
and so you should not expect derived quantities to match beyond
that precision. For example, the Planck 2013 results only provide the
Hubble constant to 4 digits. Therefore, the Planck13 built-in
cosmology should only be expected to match the age of the Universe
quoted by the Planck team to 4 digits, although they provide 5 in the paper.
that precision. For example, the Planck 2013 and 2015 results only provide the
Hubble constant to 4 digits. Therefore, they shouldn't be expected
to match the age quoted by the Planck team to better than that, despite
the fact that 5 digits are quoted in the papers.

Reference/API
=============
Expand Down

0 comments on commit 8f149fe

Please sign in to comment.