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

improve RECFAST routine #60

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

improve RECFAST routine #60

wants to merge 2 commits into from

Conversation

xzackli
Copy link
Owner

@xzackli xzackli commented Feb 12, 2022

This PR will improve the RECFAST routine and make it compatible with reverse-mode AD like Zygote. In RECFAST, certain analytic approximations are applied during different epochs. I don't really want to make changes to the actual calculations, because RECFAST is really an emulator of the real recombination calculation.

We eliminate the loop. Instead, there are two choices for this PR.

  1. Maybe I should try to break up the calculation into distinct redshift epochs and then stack the results together.
  2. Maybe I find the derivative of the analytic approximations using AD and feed them into the ODE solver. Since it will be a simple linear behavior with redshift, it should behave nicely. This moves the complexity to the ODE's LHS expression.

@xzackli xzackli marked this pull request as draft February 12, 2022 09:27
@xzackli
Copy link
Owner Author

xzackli commented Feb 18, 2022

image

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.

1 participant