temet 0.9.2
temet simulation analysis framework.
Requires Python: >3.11.0
Keywords: astronomy, simulation, cosmology, astrophysics

temet
=====

[![pyversions](https://img.shields.io/pypi/pyversions/temet)](https://pypi.org/project/temet/)
[![tests](https://github.com/dnelson/temet/actions/workflows/run_tests.yml/badge.svg)](https://github.com/dnelson/temet/actions/workflows/run_tests.yml)
[![ruff](https://github.com/dnelson/temet/actions/workflows/ruff.yml/badge.svg)](https://github.com/dnelson/temet/actions/workflows/ruff.yml)

A python toolkit for the preparation, analysis, and visualization of astrophysical numerical simulations. Specifically, hydrodynamical simulations run with the [AREPO](https://wwwmpa.mpa-garching.mpg.de/~volker/arepo/) moving mesh code, as well as codes producing similarly structured outputs including [GADGET-4](https://wwwmpa.mpa-garching.mpg.de/gadget4/), [GIZMO](http://www.tapir.caltech.edu/~phopkins/Site/GIZMO.html) and [SWIFT](http://swift.dur.ac.uk/).

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](https://www.illustris-project.org), [IllustrisTNG](https://www.tng-project.org/), EAGLE, and so on. Generally speaking, any simulation data available from the TNG public data release platform can be directly analyzed with this toolkit.


Documentation
-------------

Please see [online documentation](https://temet.tng-project.org/).

Installation and usage instructions are available there.


Acknowledgment & Citation
-------------------------

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)`.


Organization
------------

* 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


Reproducing Published Papers
----------------------------

* 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](http://arxiv.org/abs/1707.03395) - `projects.color.paperPlots()`
* [Nelson et al. (2018b) - TNG oxygen](http://arxiv.org/abs/1712.00016) - `projects.oxygen.paperPlots()`
* [Nelson et al. (2019b) - TNG50 outflows](http://arxiv.org/abs/1902.05554) - `projects.outflows.paperPlots()`
* [Nelson et al. (2020) - TNG50 small-scale CGM](http://arxiv.org/abs/2005.09654) - `projects.lrg.paperPlots()`
* [Nelson et al. (2021) - TNG50 MgII emission](http://arxiv.org/abs/2106.09023) - `projects.mg2emission.paperPlots()`
* [Nelson et al. (2023) - OVII X-ray Scattering](https://arxiv.org/abs/2306.05453) - `projects.xray_scattering.paperPlots()`
* [Nelson et al. (2024) - Introducing TNG-Cluster](https://arxiv.org/abs/2311.06338) - `projects.tngcluster.paperPlots()`
* [Nelson et al. (2025) - SALSA](https://arxiv.org/abs/2510.19904) - `projects.mockspec.paperPlots()`


Contributing
------------

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](https://github.com/dnelson/temet/issues) 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](https://github.com/dnelson/temet/pulls) 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