A python toolkit for the preparation, analysis, and visualization of astrophysical numerical simulations. Specifically, hydrodynamical simulations run with the AREPO moving mesh code, as well as codes producing similarly structured outputs including GADGET-4, GIZMO and SWIFT.
In addition, this codebase is focused on cosmological simulations for large-scale structure and galaxy formation, particularly those processed with a substructure identification algorithm (halo finder) such as subfind, including Illustris, IllustrisTNG, EAGLE, and so on. Generally speaking, any simulation data available from the TNG public data release platform can be directly analyzed with this toolkit.
Please see online documentation.
Installation and usage instructions are available there.
This code was originally written by Dylan Nelson (dnelson@uni-heidelberg.de).
If you find it useful and/or make use of it for a scientific publication, please cite Nelson, D. (in prep).
- catalog/ - creation of post-processing catalogs.
- cosmo/ - analysis specific for cosmological/comoving boxes
- data/ - external text data files from the literature
- ICs/ - initial condition generation
- load/ - loading of group catalogs, snapshots, auxcats
- ML/ - machine learning
- obs/ - analysis and data reduction for observations
- plot/ - generalized plotting
- tables/ - large pre-computed datafiles (empty until downloaded)
- tracer/ - Monte Carlo tracer particles
- util/ - helper utilities and general algorithms.
- vis/ - visualization
- projects/ - analysis and plots for specific papers/projects
The complete analysis and plot set of published papers can (theoretically) be reproduced with the following entry points
inside the projects/ directory. Note that in practice some analyses are costly and would better be done (and were actually
done) by splitting into many parallel jobs on a cluster. Also note that exact reproduction may require use of an (older) code
version, tagged on the date near the finalization of the paper.
- Nelson et al. (2018a) - TNG colors -
projects.color.paperPlots() - Nelson et al. (2018b) - TNG oxygen -
projects.oxygen.paperPlots() - Nelson et al. (2019b) - TNG50 outflows -
projects.outflows.paperPlots() - Nelson et al. (2020) - TNG50 small-scale CGM -
projects.lrg.paperPlots() - Nelson et al. (2021) - TNG50 MgII emission -
projects.mg2emission.paperPlots() - Nelson et al. (2023) - OVII X-ray Scattering -
projects.xray_scattering.paperPlots() - Nelson et al. (2024) - Introducing TNG-Cluster -
projects.tngcluster.paperPlots() - Nelson et al. (2025) - SALSA -
projects.mockspec.paperPlots()
Any contributions to this open source project, large or small, are welcome. To submit a bug report, feature request, general question, or similar, please open a new issue directly on github. Please include as much detail as possible, including a minimum working example which reproduces any problem or buggy behavior.
To directly contribute code or documentation please try to follow existing style and structure as much as possible. When you are ready, please make a pull request with your proposed changes. To do so you should take the following steps: (i) fork the repository, (ii) clone the project to your local machine, (iii) edit and make changes, (iv) commit your changes to your own branch, (v) push your work back up to your fork, (vi) submit a pull request for review.
Additional code contributions, fixes, and suggestions to this package have been made by:
- Chris Byrohl
- Lukas Eisert
- Andres Aramburo Garcia
- Martin Glatzle
- Annalisa Pillepich
- Rahul Ramesh