astropy/astropy — pull request #1364 by aconley (2013-08-20 17:48:11+00:00)
Title: Neutrinos

Add neutrino mass calculations back into the cosmology class. This fixes issue #1302 about the age of the Planck 2013 cosmology (which is now within 790 kyr of the value specified by the Planck team -- better than the 4 digit accuracy they tabulate for their cosmological parameters). An arbitrary list of neutrino masses is supported, and the cost when the neutrino masses are zero should be negligible.

The exact computation is rather expensive, so this uses a numerical approximation as advocated by the WMAP7 cosmology paper (Komatsu et al. 2011), which is good to a few tenths of a percent. Unit tests have been added for comparison with the exact (though still numerical) computation carried out with Mathematica.

The in-class documentation has been updated, but not the main set (cosmology.rst).

One possible improvement would be to keep track of which (massive) neutrinos have the same mass, in the case that the user sets all species to have the same (non-zero) mass. But that may be a bit of an edge case.