Skip to content
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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

MinhMPA
Copy link

@MinhMPA MinhMPA commented Oct 6, 2023

PR to address issue #196 .

Copy link
Collaborator

@steven-murray steven-murray left a 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:

  1. 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.
  2. 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).
Copy link
Collaborator

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)

Copy link
Author

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?

Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants