21cmfast / 21cmFAST

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

Remove Recursion #415

Open steven-murray opened 1 month ago

steven-murray commented 1 month ago

This PR removes recursion from all the component calculations. It changes a whole bunch of stuff to achieve this well, including:

  1. Modified InputStruct objects that get subclassed to UserParams etc. These are now attrs-based classes, which makes them a little more transparent.
  2. New InputParameter class that handles collections of the InputStruct objects and their validation.
  3. Some new sub-packages to break up the wrapper a bit.