tangos

Tangos is a system for building and querying databases summarising the results of numerical galaxy simulations.

Learn more in the following categories:

View the Project on GitHub

Tangos Tutorial – Eagle runs (Gadget HDF + Subfind)

Initial set up

Make sure you have followed the initial set up instructions.

Next, download the raw simulation data required for this tutorial. We will use the Eagle particle data from a 25 Mpc box (RefL0025N0376); to access this you need to sign up for a free account and download the individual snapshots, unpacking them in your home folder or the folder that you pointed the TANGOS_SIMULATION_FOLDER environment variable to.

For most Linux or macOS systems, the following typed at your bash command line will download the required data and unpack it in the correct location:

echo "Enter Eagle username:"
read EAGLE_USERNAME
echo "Enter Eagle password:"
read -s EAGLE_PASSWORD
cd $TANGOS_SIMULATION_FOLDER
for i in {1..28};
do
   curl -u $EAGLE_USERNAME:$EAGLE_PASSWORD "http://data.cosma.dur.ac.uk:8080/eagle-snapshots//download?run=RefL0025N0376&snapnum=$i" | tar -x
done

This will require 184GB of disk space and take a long time, depending on the speed of your internet connection.

Import the simulation

At the unix command line type:

tangos add eagle/RefL0025N0376 --max-objects 2000

Let’s pick this command apart.

Note that all tangos command-line tools provide help. For example tangos --help will show you all subcommands, and tangos add --help will tell you more about the possible options for adding a simulation.

At this point, the database knows about the existence of timesteps and their halos in our simulation, but nothing about the properties of those halos or groups. We need to add more information before the database is useful.

If you want to speed up this process, it can be MPI parallelised since version 1.8.

Import the relationship between halos and groups

At the unix command line type:

tangos import-properties --type group --for RefL0025N0376
tangos import-properties --for RefL0025N037

This will import the child/parent relationships between the groups and the halos. You’ll see a bunch of log messages scroll up the screen describing the progress.

Generate the merger trees

Merger trees can be generated using pynbody’s bridge function; to do this, type

tangos link --for RefL0025N0376
tangos link --type group --for RefL0025N0376

which builds the merger tree for the halos and then for the groups.

The construction of each merger tree can take a while, but you’ll see a log scroll up the screen while it happens.

If you want to speed up this process, it can be MPI parallelised.

Add the first property

Next, we will add some properties to the halos so that we can start to do some science. First let’s just add the mass (as determined by SubFind) of the groups, and then further properties for the halos (i.e. subgroups):

tangos write finder_mass --type group --for RefL0025N0376
tangos write SFR_10Myr finder_dm_mass BH_mass shrink_center finder_mass --for RefL0025N0376

Here,

If you want to speed up this process, it can be MPI parallelised. To save memory, we would recommend controlling the parallelisation using --load-mode=server. See the MPI page for more information.

Explore what’s possible

Now that you have a minimal functioning tangos database, you can proceed to the data exploration tutorial.