What is SPARTA?

SPARTA is an acronym for Subhalo and PARticle Trajectory Analysis. The code is an MPI-parallelized, pure-C framework for the dynamical analysis of particle-based astrophysical simulations. SPARTA works in post-processing and needs two inputs: the snapshots (particle data) of the simulation and halo catalogs (currently, only the Rockstar halo finder is implemented). Given this input, SPARTA connects all particles in all halos over time and analyzes their orbits.

The original purpose of SPARTA was to compute the splashback radius of halos, but the code is much more general: the user can add plugin-like modules to analyze individual particle trajectories and/or halos. SPARTA automatically takes care of all I/O, parallelization, assigning particles to halos and so on. A code extension called MORIA recombines SPARTA’s output with the original halo catalogs to create enhanced catalogs and merger trees. These data products are available for the Erebos N-body simulations.

The Online Documentation contains a much more extensive introduction to SPARTA as well as guidance on compiling, running, and developing the code. Please note that SPARTA is under active development and certainly contains numerous bugs! While the routines used in published papers have been tested thoroughly, there is no guarantee that any of the results are correct.


If you use SPARTA for a publication, please cite at least the two code papers (Diemer 2017 and Diemer 2020a). Depending on what features of the code you are using, you may want to also reference other papers. If in doubt, please feel free to get in touch.

Getting SPARTA

SPARTA is hosted in a git repository on BitBucket repository. If you wish to do significant development on SPARTA, please feel free to contact me for access to the private development fork of this repository.