skypy icon indicating copy to clipboard operation
skypy copied to clipboard

Test power spectra against "truth", both massless and massive nu

Open itrharrison opened this issue 2 years ago • 1 comments

Description

This PR addresses #567 to improve power spectrum tests. I have made the following changes to the module:

  • Added tau and YHe as parameters to fully specify base cosmology consistently between CLASS and CAMB. Note that currently only tau is accesible.
  • Added ability to explicitly specify neutrino masses. Currently in CAMB it is assumed that all the mass is in one neutrino, whilst CLASS can also deal with e.g. degenerate masses. This can easily be changed to be the same for both.
  • Clarified the Hubble units in the CAMB wrapper.

And implemented new / changed the tests such that both CLASS and CAMB are tested against a 'truth' cosmology which is calculated from CAMB, with separate tests for massive and massless neutrinos. We could do a lot of playing with accuracy settings here, both in terms of the rtol in the test and the accuracy settings within each Boltzmann code. Currently these are specified so that the tests pass with the default accuracy settings for each Boltzmann code. Thoughts welcome.

Merging will close #567.

Checklist

  • [X] Follow the Contributor Guidelines
  • [ ] Write unit tests (not enough yet as per coveralls)
  • [ ] Write documentation strings
  • [X] Assign someone from your working team to review this pull request
  • [X] Assign someone from the infrastructure team to review this pull request
  • [ ] Generally tidy up the code and tests

itrharrison avatar Aug 03 '22 13:08 itrharrison

Here are the two rtol plots for CAMB and CLASS for both the massless and massive (m_nu=[0.0, 0.0, 0.06]) cases.

camb-numodels class-numodels

itrharrison avatar Aug 03 '22 13:08 itrharrison