N-body Analysis (NBA) is a python package designed to analyze N-body simulations of galaxies.
NBA can be installed by cloning the repository and installing it locally:
$ git clone https://github.com/jngaravitoc/nba.git`
$ cd nba/
$ python -m pip install .
At the moment the code has readers for Gadget2/3/4, and ASCII files. However, readers for other simulations
output can easily be implemented in nba/ios/
Many of the routines in NBA can easily be parallelized with python packages such as Schwimmbad. An example showing how to compute the orbit of two halos can be found here.
At the moment the code has modules to perform the following analysis:
- Center of mass computations
- Orbit calculations
- Density estimation
- Compute halo shapes and angular momentum.
- Kinematics properties such as anisotropy parameter, velocity dispersion, and orbital poles.
- Coordinate transformations using astropy.
- Basic visualization in cartesian and mollweide projections.
- Compute structural properties of DM halos given a cosmology.
- tools to compute virial and r200 quantities and to transform between those.
- scipy
- matplotlib
- astropy
- pygadgetreader
- healpy (visualization)