py-SP(k) Model#194
Open
jemme07 wants to merge 12 commits intocmbant:masterfrom
Open
Conversation
…ize test structure
…sion calculations
…erage unignore and add SPk_demo.ipynb to the repo add an end-to-end SP(k) demo comparing CAMB vs pyspk with relative-error diagnostics make SP(k) unit references more stable with dense transfer sampling (k_per_logint=100) tighten relation-match tolerances to 1e-6 / 1e-9 add a high-k boundary continuity regression test (k <= 12) to prevent cutoff artifacts
- Introduced warnings for redshift values outside the calibrated range, notifying users when SP(k) calculations are skipped. - Added clamping warnings for input k values exceeding the calibrated maximum, ensuring users are informed when values are adjusted. - Implemented logical flags to prevent repeated warnings during execution.
Author
|
Hi @cmbant , This PR is ready for review. Could you please assign some reviewers? Thanks! |
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.
Overview
This PR implements the SP(k) baryon-suppression model (Salcido et al. 2023) in CAMB.
Model references:
What is implemented
1. SP(k) non-linear wrapper
fortran/SPkNonLinear.f90wraps a base non-linear model (e.g. HMCode/halofit) and applies SP(k) suppression multiplicatively.zrange, SP(k) correction is skippedkabove calibrated limit, suppression evaluation is clamped at calibratedk_maxFeedbackLevel > 0) are emitted for both out-of-range behaviors.2. Python API path and integration coverage
camb/tests/camb_test.pyincludes coverage thatset_classes(non_linear_model="SPkNonLinear")selects and runs correctly.3. Dedicated SP(k) validation tests
camb/tests/spk_test.pyadds dedicated SP(k) tests.pyspkacross supported relation modes.4. SP(k) demo notebook
Supporting updates
pyproject.toml: addspyspk>=2.0.0to dev extras for validation workflows.Validation run
python -m unittest camb.tests.spk_testReviewer notes
pyspkimplementation.