-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fix the growth function g in growth_rate() and growth_rate_fn() #197
base: main
Are you sure you want to change the base?
Fix the growth function g in growth_rate() and growth_rate_fn() #197
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.
Thank you @MinhMPA!
I think this is good, but I think it needs to more things:
- Since this is technically API-breaking (some folks may have been relying on the
growth_rate
being defined this way) I'd prefer to actually add a warning to the function temporarily to tell users that it has changed. - There is one breaking test, which I think comes from the fact that the
GenMF.growth_rate
function also needs to be updated to have this definition.
@@ -163,6 +163,7 @@ def growth_factor_fn(self, zmin=0.0, inverse=False): | |||
def growth_rate(self, z): | |||
""" | |||
Growth rate, dln(d)/dln(a) from Hamilton 2000 eq. 4 | |||
Note that the growth function g in Hamilton 2000 is defined as g=D*(1+z). |
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.
While we're at it, can we update the docs to point to the arxiv or DOI of the paper? (https://arxiv.org/pdf/astro-ph/0006089.pdf)
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 for the feedback! You meant implement:
- A similar fix to the growth rate method in
GenMF
? And - A python built-in
UserWarning
for each method?
I can do so, but maybe we should just merge this with the fix to the issue I mentioned in #198?
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.
I think that's a good idea -- it might be best to figure out what's going on in #198 and add the fix to this PR. I think the fix for GenMF
should not be difficult, and neither should the warning (perhaps you can add it to the base class). I'm still a little hesitant on the growth rate differences between CAMB and the numerical integral. I'd like to understand it better, but I have no time in the next couple of weeks.
PR to address issue #196 .