Releases: 21cmfast/21cmFAST
v4.1.1
🚀 Features
- Ability to inject initial conditions (only density field) (#613) @jordanflitter
✅ QoL Improvements
- ux: better error message for unknown array is requested from a lightcone (#650) @steven-murray
🪲 Fixes
- fix: segfault when using photoncons (#617) @steven-murray
- fix: bug in which cstruct attrs weren't being set for CosmoTables (#628) @steven-murray
- Fix HaloBox
countfield never populated after CIC gridding migration (#651) @copilot-swe-agent[bot]
🐎 Performance
- Reducing more memory with MINIMIZE_MEMORY (#632) @jordanflitter
👷 Continuous Integration
- ci: add high-effort label (#633) @steven-murray
- ci: add gpu labels (#629) @steven-murray
- ci: only create sdists (#612) @steven-murray
- [pre-commit.ci] pre-commit autoupdate (#627) @pre-commit-ci[bot]
- Bump dawidd6/action-download-artifact from 15 to 16 (#625) @dependabot[bot]
- Bump actions/upload-artifact from 6 to 7 (#626) @dependabot[bot]
- Bump dawidd6/action-download-artifact from 14 to 15 (#620) @dependabot[bot]
- Bump actions/github-script from 6 to 8 (#619) @dependabot[bot]
📚 Documentation
- Fixed halo_sfr unit typo in tutorial (#648) @jordanflitter
v4.1.0
Main change in this release: introducing a new feature for quickly evaluating the global signal: run_global_evolution.
🚀 Features
- Quick global evolution of all fields in the simulation (#588) @jordanflitter
🪲 Fixes
- Fix minimize memory (#603) @steven-murray
- Fixed a bug with const-zeta and updated requirements (#602) @jordanflitter
🐎 Performance
- perf: don't allocation unnormalised_nion if unnecessary (#605) @steven-murray
- Quick global evolution of all fields in the simulation (#588) @jordanflitter
👷 Continuous Integration
- ci: don't use pypi password (#610) @steven-murray
- [pre-commit.ci] pre-commit autoupdate (#596) @pre-commit-ci[bot]
- Bump dawidd6/action-download-artifact from 6 to 14 (#594) @dependabot[bot]
- Bump release-drafter/release-drafter from 6.1.0 to 6.2.0 (#595) @dependabot[bot]
🔨 Refactoring
- Refactoring cosmology.c (#597) @jordanflitter
v4.0.0
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
- Basic memory predictions (#545) @steven-murray
- Add HIRES_TO_LOWRES_FACTOR, LOWRES_CELL_SIZE_MPC and cascading templates (#535) @steven-murray
- feat: significantly enhance the CLI interface (#532) @steven-murray
- A spectacular progress bar was added (#489) @jordanflitter
- Floating-Point Halo Position (#530) @daviesje
- Improved RSD branch (#540) @jordanflitter
- Get transfer functions from CLASS (for real this time) (#578) @jordanflitter
- Added A_s as an optional cosmological parameter (#570) @jordanflitter
- ESF-L Implementation (#561) @daviesje
- add redshift to halo sampler seeds (#560) @daviesje
- add approximate mean adjustment (#571) @daviesje
- Source flag redesign (#572) @daviesje
- Onthefly haloperturb (#563) @daviesje
- New USE_X_RAY_HEATING flag (#582) @jordanflitter
📚 Documentation
- Add logo files and ReadMe update (#589) @nikos-triantafyllou
- update readme, make reference printing function (#513) @daviesje
- Update README.rst (#517) @andreimesinger
- bug fixes to last cell of lightcones.ipynb (#521) @raxquax123
- docs: update readme badges and main image (#575) @steven-murray
🪲 Fixes
- Fix bugs introduced by the floating-point halopos (#544) @daviesje
- Fixed hash table and included a new test (#566) @jordanflitter
- fix array shape bug, make Mcrit array optional (#549) @daviesje
- fix: small bug in reading old HDF5 files with potentially differing type (#542) @steven-murray
- fixed some bugs when PERTURB_ON_HIGH_RES=True (#494) @jordanflitter
- dNrec_box exists only if INHOMO_RECO=True (#479) @jordanflitter
- Existence of output initial velocities depend on PERTURB_ON_HIGH_RES (#492) @jordanflitter
- Throw errmsg if desired quantities don't match inputs (#482) @jordanflitter
- Fix checkpointing (#508) @daviesje
- Fix double regen pop (#507) @daviesje
- make r_bubble_max error clearer and add notes to the small template (#524) @daviesje
- fix: zmin for run ics in CLI (#546) @DanielaBreitman
- Raise error for invalid keyword in evolve_input_structs (#555) @jordanflitter
- fix: small bug in caching (#548) @DanielaBreitman
- Fixed bug and automatic warning when halos are purged (#554) @jordanflitter
- Error outside pragma loop (#557) @jordanflitter
🏛️ Build
🔬 Testing
🔨 Refactoring
- reorginization of brightness temp and RSD calculations (#498) @jordanflitter
- global_quantities was removed (#553) @jordanflitter
- Constant cleanup (#569) @daviesje
- Perturb cleanup (#556) @daviesje
🐎 Performance
👷 Continuous Integration
- ci: update bencher to cope with forks (#584) @steven-murray
- ci: fix deploy to install fftw and co (#506) @steven-murray
- Bump actions/upload-artifact from 5 to 6 (#583) @dependabot[bot]
- Bump actions/checkout from 5 to 6 (#580) @dependabot[bot]
- change benchmark branch to main (#523) @daviesje
- run benchmarks on main (#515) @daviesje
v4 Beta
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_templatesfor 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
- Stochasticity by @daviesje in #349
- fix bug in run_coeval using the wrong halobox by @daviesje in #377
- Fixing some issues in the HaloBox struct and Mass Function Integrals. by @daviesje in #379
- Halobox memory improvements by @daviesje in #380
- Large halo number fix by @daviesje in #387
- Allow halo catalogue cuts to output averages correctly by @daviesje in #389
- Inverse table improvements by @daviesje in #388
- fix urgent parameter error by @daviesje in #391
- Lightcone distance unit fix by @daviesje in #392
- fix return value order in make_lightcone_slices by @daviesje in #394
- change defaults in the branch to the halo sampler model by @daviesje in #397
- Fix parameter defaults by @daviesje in #402
- Lx scatter and Nikolic+2024 scaling relations by @daviesje in #406
- Test improvements by @daviesje in #413
- fix delta k in RSD velocity gradients for non-cubic boxes by @daviesje in #410
- remove unneeded param structures before validation by @daviesje in #409
- fix out-of-bounds access in TF_CLASS by @daviesje in #421
- C restructure by @daviesje in #417
- Fixing bugs in HaloBox.c by @daviesje in #422
- A few small bug fixes by @daviesje in #423
- Reading compatibility by @daviesje in #425
- fix UVLF from input parameters bugs by @daviesje in #429
- add a minimum z to lightcone_sliceplot by @daviesje in #430
- change default behaviour of from_file and read methods by @daviesje in #431
- small changes for the upcoming database by @daviesje in #433
- Filter func tests by @daviesje in #424
- Remove Recursion by @steven-murray in #415
- Fixing Tests by @daviesje in #438
- run lc tests with correct params, stop purging ics for halos by @daviesje in #439
- Fix some bugs from most recent PR by @daviesje in #440
- Ionbox refactor by @daviesje in #427
- Fixing mac build and clang compilation on v4-prep by @daviesje in #441
- Run templates by @daviesje in #444
- fix trapezoidal bug, make error messages more clear by @daviesje in #442
- Fixed Template Filepath Reading by @samgagnon in #447
- Scaling relation uniformity by @daviesje in #446
- Fix recombinations error flag by @daviesje in #451
- remove global_params by @daviesje in #452
- Fix gamma12 in sub-sampler HaloBox by @daviesje in #455
- Debug dimensions by @daviesje in #456
- Output Struct Overhaul by @steven-murray in #445
- Switch to using ruff by @steven-murray in #459
- ci: nicer ci by @steven-murray in #461
- Minor fixes to plotting scripts, adding turnover masses to global variables by @daviesje in #464
- Fixing Some Issues with New Mturn Paramterisation by @daviesje in #466
- Add pc and caching checks by @daviesje in #465
- test: add tests for the RunCache by @steven-murray in #469
- Backend interface overhaul by @daviesje in #468
- reorganise cosmology functions, setup future speed tests by @daviesje in #471
- Rare halo Truncation and some extra parameter checks by @daviesje in #474
- fixed segfault bug without halos but with minihalos and no lya heating by @jordanflitter in
- #475
- J_21_LW exists only if USE_MINI_HALOS=True by @jordanflitter in #481
- Fcoll is 4D and Fcoll_MINI exists only if USE_HALO_FIELD=False by @jordanflitter in #478
- Add b...