-
Notifications
You must be signed in to change notification settings - Fork 32
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
A_mod suppression of non-linear power #142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this! I have three pretty minor requests for changes and then I'd love to merge it.
structure/amod/module.yaml
Outdated
purpose: Modify the non-linear matter power spectrum using the A_mod phenomenological parameterization | ||
url: "" | ||
interface: amod.py | ||
attribution: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this contribution! You should definitely give yourself credit by adding your name to the attribution list!
structure/amod/module.yaml
Outdated
" | ||
|
||
# List of parameters that can go in the params.ini file in the section for this module | ||
params: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block should be replaced with:
params: {}
structure/amod/amod.py
Outdated
A_mod = block["amod_parameter", "a_mod"] | ||
|
||
# for now assume pk_lin and pk_nonlin are defined on the same grids | ||
assert (block["matter_power_lin", "z"] == block["matter_power_nl", "z"]).all() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you replace these with this, just to give some more info to the user:
z_same = np.allclose(block["matter_power_lin", "z"], block["matter_power_nl", "z"])
k_same = np.allclose(block["matter_power_lin", "k_h"], block["matter_power_nl", "k_h"])
if not k_same and z_same:
raise ValueError("The redshift and k sampling of the linear and non-linear matter power must be the same to use the amod module")
Cool! I just added the suggested changes. |
Thanks so much! |
This is a very simple module to sample the phenomenological parameter A_mod from Amon & Efstathiou 2022.