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

Move Photon Conservation Model to Python #364

Open daviesje opened 3 months ago

daviesje commented 3 months ago

The current implementation of the redshift-dependent photon conservation approximation spans the Python Wrapper and C backend in a very awkward way, relying on many globally defined arrays which have to be passed back and forth. This makes changes to the model very difficult.

Since the model has to run a calibration simulation from the wrapper, and otherwise consists of relatively light array operations, I see no reason not to migrate the entire model to the wrapper. In this way we can simply pass a structure containing all the photon conservation info into ionize_box.