Skip to content

Preserve CCL neutrino masses and species in CAMB predictions - #97

Open
cailmdaley wants to merge 2 commits into
developfrom
fix/ccl-to-camb-mnu
Open

cailmdaley wants to merge 2 commits into
developfrom
fix/ccl-to-camb-mnu

Conversation

@cailmdaley

Copy link
Copy Markdown
Collaborator

CAMB silently used its default 0.06-eV neutrino instead of the CCL mass, including during σ₈→Aₛ normalization.
The bridge now transfers the summed mass and resolved species, densities and temperatures, matching CCL's CAMB interface rather than approximating its hierarchy.
It also preserves Neff, T_CMB and Omega_k, applies w/wa before normalization, and removes the redundant neutrino subtraction from cold dark matter.

CAMB/CCL − 1 at ℓ=1000 (Planck defaults at fixed σ₈; Gaussian n(z), mean 0.7, width 0.2; CAMB 2.0.4 / CCL 3.3.6):

Σmν Before After
0.06 eV −4.49% −4.40%
0.30 eV −8.63% −4.71%

The two backends' mass responses agree within 1.3% at ℓ=100, 500 and 1000; their different nonlinear models remain unchanged.
All 50 tests in test_camb_neutrinos.py, test_cosmology.py and test_cosmo.py pass in the Slurm/container environment.
Tests cover zero mass, scalar/array inputs, normal/inverted/equal splits, background parameters and σ₈ normalization.
Default sp_validation iNKA predictions also change slightly because the bridge now preserves CCL's normal-hierarchy species (about +0.09% in this C₁₀₀₀).

Closes #96

— Sol on behalf of Cail

🤖 Generated with Claude Code

cailmdaley and others added 2 commits October 4, 2026 20:00
CAMB previously defaulted to one 0.06-eV neutrino regardless of the CCL cosmology, so sigma8-to-As normalization and lensing spectra used the wrong background. Transfer the mass sum and resolved species, temperature and density as CCL does in its CAMB interface, and remove the redundant neutrino subtraction from CDM.

Also preserve Neff, CMB temperature and curvature, and apply dark energy before normalization. Test massless, scalar and per-species inputs and the CCL/CAMB lensing mass response.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0133mw5vATUB7QfqbhYac7Fz

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_ccl_to_camb drops the neutrino mass

1 participant