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

Global Interpolation Tables #362

Open
daviesje opened this issue Mar 27, 2024 · 0 comments
Open

Global Interpolation Tables #362

daviesje opened this issue Mar 27, 2024 · 0 comments
Labels
context: C backend Changes occur predominantly in the C code context: v4-prep This issue regards changes to the v4-prep branch

Comments

@daviesje
Copy link
Contributor

daviesje commented Mar 27, 2024

Currently there are two interpolation tables in redshift which are built during the spin temperature computation, one for the global expected ionising emissivity, and one for the global expected star formation rate density. The emissivity is used for the calculation of the x-ray mean free path in nu_tau_one, and the SFR table is used to fix the mean SFR of the grids. Both of these tables require hundreds (or thousands with minihalos) of integrals to build.

The SFR table is only evaluated once per filter radius (less than 100 times usually), and could easily be replaced by the integral. The emissivity table is evaluated more times, since we integrate over it to get tau, however I think that this could be achieved more accurately and more efficiently by passing the actual global neutral fraction of the simulation, rather than calculating the expected value at each point.

The second option is to define these tables outside of the spin temperature, and explicitly store them somewhere so we don't have to recalculate them every snapshot, since they should be exactly the same. We could also apply this to other tables which only need one initialisation, such as the RMS fluctuation sigma(M) or the random number generator.

@daviesje daviesje added context: C backend Changes occur predominantly in the C code context: v4-prep This issue regards changes to the v4-prep branch labels Mar 27, 2024
@daviesje daviesje moved this to Backlog in 21cmFAST v4 Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context: C backend Changes occur predominantly in the C code context: v4-prep This issue regards changes to the v4-prep branch
Projects
Status: Backlog
Development

No branches or pull requests

1 participant