Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: module/power_spectrum
Choose a base branch
from

Conversation

itrharrison
Copy link
Contributor

@itrharrison itrharrison commented Aug 3, 2022

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

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

@itrharrison itrharrison added enhancement Improvement of existing feature module: power spectrum tests labels Aug 3, 2022
@itrharrison itrharrison self-assigned this Aug 3, 2022
@itrharrison
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing feature module: power spectrum tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant