Skip to content

Releases: 21cmfast/21cmFAST

v4.1.1

01 Apr 19:30
099c12d

Choose a tag to compare

🚀 Features

✅ QoL Improvements

  • ux: better error message for unknown array is requested from a lightcone (#650) @steven-murray

🪲 Fixes

🐎 Performance

👷 Continuous Integration

📚 Documentation

v4.1.0

16 Feb 14:13
1147c4b

Choose a tag to compare

Main change in this release: introducing a new feature for quickly evaluating the global signal: run_global_evolution.

🚀 Features

🪲 Fixes

🐎 Performance

👷 Continuous Integration

🔨 Refactoring

v4.0.0

31 Jan 10:37
e73d808

Choose a tag to compare

This is finally the release of 21cmFAST v4!

See Updating from v3 to v4 for some guidance on the main differences in this major version.

See the Beta Release Notes for the full change-list for v4beta.
The following change-list only covers v4beta -> v4.

🚀 Features

📚 Documentation

🪲 Fixes

🏛️ Build

🔬 Testing

🔨 Refactoring

🐎 Performance

  • fix array shape bug, make Mcrit array optional (#549) @daviesje

👷 Continuous Integration

v4 Beta

16 Apr 09:47
5f5c094

Choose a tag to compare

21cmFAST Version 4 Initial Release

This is the first release of 21cmFAST version 4. The key improvements in comparison to previous versions are:

  • A stochastic halo sampler, which allows the user to create lightcones and catalogues of galaxy properties consistent with the IGM calculations
  • A complete overhaul of the input parameter structures, with TOML run templates and strict consistency checks
  • More organised output structures and caches
  • Modularisation of the key IGM calculations in the C backend.

Each of these changes is described in more detail below, as well as in the docs docs/updates_from_v3. This release is marked as a beta since we expect to make minor API changes over the next few weeks, however the core functionality should remain unchanged.

Stochastic Halo Sampling

The main addition the 21cmFAST in version 4 is the stochastic halo sampler. This samples conditional halo mass functions instead of integrating over them, producing a discrete source field which is then used in the spin temperature and ionization field calculations. This not only includes the effects of stochasticity in the IGM observables, but also creates several new outputs which can be further used in forecasting galaxy survey, line intensity mapping, and cosmic background statistics. The sampler is activated with the flag HALO_STOCHASTICITY and serves as a faster replacement to the previous excursion-set halo finder, with greatly increased functionality.
Halos are sampled in a backward time-loop in each run before the main IGM calculations start. Halo catlogues can be found in the HaloField (Initial Lagrangian) and PerturbHaloField (Final Eulerian) classes. Each catalogue contains the coordinates and masses of each halo, as well as the correlated RNG used to determine their galaxy properties. Converting from the RNG to the properties can be done with py21cmfast.wrapper.cfuncs.convert_halo_properties. Galaxy properties are not directly stored in these objects for efficiency and so we can correctly account for feedback in the forward time-loop.

The conditional mass functions used to perform integrals have been extended with the Sheth-Tormen CHMF (Sheth+2002) which has been applied to 21cmFAST in both halo and grid based source models, when the user sets HMF=='ST'. All other mass functions rescale the Extended Press-Schechter (EPS) conditional mass function.

Input Parameters

The most significant changes for a user will be how input parameters are passed into simulation in 21cmFASTv4. In version 4 the user will
mostly deal with a single structure, InputParameters, while many of the underlying parameters are unchanged, there are now simpler ways to construct parameter sets, and consistency between your inputs is more explicily enforced.
Key differences include:

  • We allow for the creation of TOML templates to easily save parameter sets, and provide several native templates for common modes. Call :func:py21cmfast.run_templates.list_templates for a full list
  • We no longer fix parameter sets behind the scenes to make them consistent, it is now up to the user to ensure their parameters pass our consistency checks.
  • While the parameters are still separated by type in the backend (mostly for caching purposes), all parameters are passed as one object to each of our functions.

Outputs and Caching

Significant improvements were made to the caching mechanism for 21cmFAST outputs. We provide the class OutputCache for searching, reading and writing low-level outputs to file, and RunCache for specifying all the outputs needed to complete a run with given inputs. We also provide CacheConfig for a user to specify exactly which output strucutres are cached. high-level functions such as run_coeval and run_lightcone accept the cache keyword argument to specify an OutputCache to write data to, and the write keyword argument to specify a CacheConfig, or simple boolean if one wants to turn on or off caching entirely. For examples on using the cache, see tutorials/caching.

Both the input and output structures have been transformed into attrs classes and can be used with all the methods available in that module.

Renaming of fields/functions

Many changes were made to the names of functions and output fields for clarity. For a full list see docs/updates_from_v3, or the API reference.

What's Changed

Read more