Exclude only scipy 1.18.0, require pyccl>=3.3.5, fix the camb-backend C_ℓ at ℓ_min - #93
Merged
Merged
Conversation
camb 2.0 makes its BBN Y_He predictor return a scalar, so set_cosmology works under scipy 1.18.0 (whose RectBivariateSpline returned shape (1,) for scalar input). With that floor the scipy cap has no reason to exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsAQRxNg6yDsUX4y2SWxTJ
get_theo_c_ell set pars.min_l = ell.min(), but CAMB's min_l is the scalar-C_ell floor and only takes 1 or 2. With camb 1.6.6 this underestimated C_ell at ell.min() by ~7.5%; with camb 2.0 any ell.min() > 10 raises 'You need to normalize realistically to use lensing' (the lensing sanity check reads C_phi at L=10). Add a test that C_ell at a given ell does not depend on the requested ell range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsAQRxNg6yDsUX4y2SWxTJ
…amb 2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The breakage needed scipy 1.18.0 together with camb < 2.0; scipy 1.18.1 restores the 0-d spline result, so excluding the one scipy release is enough. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
LGTM |
cailmdaley
added a commit
to CosmoStat/sp_validation
that referenced
this pull request
Sep 30, 2026
* Lift the scipy cap; require camb>=2.0 camb 2.0 makes its BBN Y_He predictor return a scalar, so set_cosmology works under scipy 1.18.0 (whose RectBivariateSpline returned shape (1,) for scalar input) and the scipy cap has no reason to exist. camb 2.0 moves the glass-mock CAMB fingerprint beyond the test's 1e-6 tolerance (As +1.4e-4, P(k) up to 2.9e-4 relative), so regenerate that reference under camb 2.0.4. The test now pins camb.config.AccuracyTarget to CAMB's default: pyccl's CAMB path sets that process-global to 0, which made the reference test depend on whether a pyccl test ran first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsAQRxNg6yDsUX4y2SWxTJ * Require pyccl>=3.3.5 (boltzmann_camb on camb 2) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * uv.lock: camb 2.0.4, scipy 1.18.1, pyccl 3.3.6, cs_util/shear_psf_leakage develop heads cs_util develop@e14cd686 (CosmoStat/cs_util#93) and shear_psf_leakage develop@649edf4a (CosmoStat/shear_psf_leakage#45) lift their scipy caps and admit camb 2; shear_psf_leakage no longer pulls gsl or stats. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsAQRxNg6yDsUX4y2SWxTJ * test_glass_mock: widen the tolerance instead of pinning AccuracyTarget Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Relock on the merged pyproject: camb 2.0.4, shear_psf_leakage develop tip Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W4pb4vZJimNoYkWqQCqEwR --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #94.
What
pyproject.toml:scipy>=1.13.0,!=1.18.0(the<1.18cap is gone) andpyccl>=3.3.5;camb>=1.5.9is unchanged. pyccl ≤3.3.4 fails itsboltzmann_cambpath under camb 2 (camb-2 breaks CCL LSSTDESC/CCL#1303), andget_cosmouses that path. pyccl declares no camb dependency, so nothing else stops that pairing.cosmo.get_theo_c_ell(backend="camb")no longer setspars.min_l = ell.min(). CAMB'smin_lis the scalar-C_ell floor and only accepts 1 or 2. On camb 1.6.6 that line underestimated C_ell atell.min()by about 7.5%. On camb 2.0 anyell.min() > 10fails with "You need to normalize realistically to use lensing", because the lensing sanity check reads C_φφ at L=10. New test: C_ell at a given ell doesn't depend on the requested ell range.Why
scipy 1.18.0 made
RectBivariateSpline(scalar, scalar, grid=False)return shape (1,), and camb <2.0's BBN Y_He predictor then brokeset_cosmology. That also broke pyccl'sboltzmann_camb, which calls that predictor. scipy 1.18.1 returns a 0-d array again, and camb 2.0 copes with either, so the only pairing that ever broke is scipy 1.18.0 with camb <2.0. Excluding that one scipy release is enough. camb 1.x and 2.x both work, and applications choose through their locks. This unblocks sp_validation's lock: its shear_psf_leakage dependency could not coexist with the<1.18cap.Test (sp_validation image; scipy 1.18.1, camb 2.0.4, pyccl 3.3.6): 74 passed. Before the change (scipy 1.17.1, camb 1.6.6, pyccl 3.3.4): 73 passed. The new test fails on camb 2.0.4 without the
min_lfix. Everything also passes on camb 1.6.6 with the fix. CCL-path drift from camb 1.6.6 to 2.0.4: P(k) ≤2e-5, ξ± ≤1.3e-6, σ8 unchanged. camb-backend C_ell ≤7e-4.A trap for camb-backend users: pyccl 3.3.6 sets the process-global
camb.config.AccuracyTargetto 0 whenever it runs CAMB (camb 2.x's default is 1). Direct CAMB calls made after that (the camb backend,_ccl_to_camb) change with it: σ8 at fixed As moves by 7.6e-5.Merge before the sp_validation lock refresh (to follow).
— Claude (Opus) on behalf of Cail
🤖 Generated with Claude Code
https://claude.ai/code/session_01LsAQRxNg6yDsUX4y2SWxTJ