gh-289: Adding new tracer class PositionsTracer_Weyl_GGL and PositionsTracer_Weyl_GC - #534
Draft
NastassiaG wants to merge 41 commits into
Draft
gh-289: Adding new tracer class PositionsTracer_Weyl_GGL and PositionsTracer_Weyl_GC #534NastassiaG wants to merge 41 commits into
NastassiaG wants to merge 41 commits into
Conversation
Created a new file photo_Weyl.py, with a class PositionsTracer_Weyl. Appropriate changes compared to the original PositionsTracer still need to be implemented.
For both classes, this keeps only the per-bin implementation of the bias; per-bin Jhat introduced for the GGL class; multiplied positions window function in GGL class with Jhat and \Omega_m^{-1}(z).
Added pre-factors of growth function and sigma_8
sigma8_ini implemented such that it works with a CAMB background
Changed name of parameter b1_photo to bhat; small adjustments in comments
Fixed mistake when dividing through Omega_m(z) in GGL positions window function.
Classes PositionsTracer_Weyl_GGL and PositionsTracer_Weyl_GC are now implemented as child classes of PositionsTracer.
Added an isinstance fallback in the rule resolver so subclasses of PositionsTracer (e.g. PositionsTracer_Weyl_GGL and PositionsTracer_Weyl_GC) correctly match existing (PositionsTracer, PositionsTracer) rules.
New class Weyl_Perturbations allows us to apply a boost to the initial matter power spectrum; It's init function takes an instance of a Perturbations class as argument, while the new class itself also follows the Perturbations protocol
Changes taking into account that sigma8_0 can now be called consistently for each perturbations class
Some changes for compatibility with CLASS perturbations
Updated class_cosmology for compatibility with photo.py
Removed np.array input to Omega_m0 (not necessary with modified class_cosmology.py)
Adding k to Weyl_perturbations.py, and adjustments in photo_Weyl.py to use self.perturbations.k instead of np.array([0.01])
Omega_m at z now directly calculated as self.background.Omega_m(y)
Adjusting growth_rate to properly include RSD effect.
include_rsd parameter added; adjusted window functions of Positions_Tracer_Weyl to include one growth_factor only; created new class ShearTracer_Weyl which multiplies original window function with growth_factor
GR growth factor now included in RSD window functions (instead of growth_rate in photo_Weyl.py); ShearTracer_Weyl removed again
Renamed Weyl_cosmology.py into Weyl_perturbations.py; Implemented general boost; added some sanity checks
Check tracer_types with isinstance for compatibility with child classes of PositionTracer
Add sigma8_0() to HMemuLinearPerturbations; change name of self.sigma8_0 array to self.sigma8 to avoid method being overwritten by array
Use current file version from main
Collaborator
Author
|
@cloe-org/cloe-maintainers I believe this branch is in good shape. It has two new files and one changed file. I've grouped them all into one draft PR, since they're all related to the new Weyl PositionsTracer classes, but let me know if you prefer to split them into various PRs. Also, let us know if unit tests are required for this - if yes, maybe @zsirap could look into it ? |
Included sigma8_zini calculation in Weyl_cosmology.py and adjusted scale at which the growth factor is evaluated
Remove default value 1 for bhat_bin and Jhat_bin parameters
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.
🚀 Pull Request Checklist
✅ Summary
This PR adds new Weyl-specific
PositionsTracerclasses, enabling a model-independent measurement of the Weyl potential.🔄 Changes
cloelib/observables/photo_Weyl.py(new): adds two new Weyl tracer classes.cloelib/cosmology/Weyl_cosmology.py(new): adds a wrapper class that applies a non-linear boost to a power spectrum at fixedz_ini.cloelib/summary_statistics/angular_two_point.py(small modifications): checks based ontype(...)are not compatible with subclasses ofPositionsTracer, so anisinstance(...)fallback was added for compatibility with the new Weyl tracer classes.🛠 How to Test
A dedicated playground branch (called as well
289-PositionsTracerWeyl) has been used to test these changes extensively, including:PositionsTracer_Weyl_GGLandPositionsTracer_Weyl_GC, with various settings.📝 Documentation
🏗 Related Issues
Resolves #289
📌 Additional Notes
A follow-up PR will include Weyl-specific EuclidLikelihood classes in
cloelikeand, if appropriate, merge the playground branch intomain.✅ PR Checklist for Developers
pre-commit run --all-files✅ PR Checklist for Reviewers
playgroundwill be updated in a corresponding follow-up PRREADME.mdfile