21cmfast / 21cmFAST

Official repository for 21cmFAST: a code for generating fast simulations of the cosmological 21cm signal
MIT License
56 stars 37 forks source link

Remove/Improve Recursive Generation #363

Open daviesje opened 3 months ago

daviesje commented 3 months ago

The current behaviour when we use boxes that require another redshift is to recursively generate all required snapshots until we get to the desired redshift.

There are some transparency issues with this since it can be hard to keep track of what redshifts are required and which you have already generated. But more importantly the addition of the stochastic halo fields (which need to be generated in the reverse order) as well as the XraySourceBox (which requires input fields from multiple redshifts) complicates this picture, making it very difficult to perform with recursion.

Two possibilities to simplify the picture are:

steven-murray commented 2 weeks ago

I prefer first option. Let's remove recursion and rely on the right boxes being passed in. We need to decide on how the progenitor and descendent redshifts are treated in terms of their effect on the box at hand (caching etc.) an how this interacts with a possible Z_HEAT_MAX