Galaxy/Halo? Merger Tree
Using the unique IDs of dark matter (and optionally star particles) as tracers, you can create a detailed halo/galaxy merger history. You'll need to identify the haloes from the final data dump you're interested in, and discover how far back in time haloes exist, so you'll have to run HOP manually? before running this.
The output of the script is a Graphviz file with example content shown below. Each three-level box has four pieces of information: The percentage of the group that wasn't in any group in the previous time step, the number of particles in that group (which isn't commensurate with total mass if you have stars turned on), the center of the halo, and the percentage of particles that leave this halo for no halo in the next time step. The colors of the boxes correspond to its relative size at each data dump. The largest haloes have red boxes. Boxes at the beginning and end of the tree are missing the top or bottom level, respectively. The percentages next to each arrow give the amount from the parent halo that go to the child halo. There are also light blue boxes that give the redshift for each data dump (not depicted).
Once you've determined the data dumps to inspect, you'll need to edit fastBuildMerge.py. This is a script that outputs a python script which drives functions which make the merger tree. At the top of fastBuildMerge.py, edit these values:
# the GraphViz file outfile = "157-120.dot" # the directory basename, no trailing slash needed # if a data dump is /path/to/enzo/data/DD0243/data0243, put /path/to/enzo/data/DD below dirbasename = "/path/to/enzo/data/DD" # usually DD, maybe RD, or data filebasename = "data" # the maximum number of groups analyzed at one time step hardmaxgroup = 2500 # the hop density threshold used for grouping hopthreshold = 80.0 # dm only, True or False dmonly = "True" # The range of data dumps you wish to operate upon. It's a good idea to manually see how far back # haloes exist before setting the end value. # start > end end = 120 start = 157 # A list of the haloes in the final data dump for which you want to find ancestors. Use the IDs provided # by hop, so you'll probably have to run hop on the final data dump before deciding which haloes to # put here, unless you know it's the largest halo, which is always ID=0. The list can be a singleton. indices = [0,1] # change below to reflect where python is # it is important to use python >= 2.5 as previous versions have a memory bug # which affects this script, which is important if you're running large datasets. print "#!/usr/bin/env /Library/Frameworks/Python.framework/Versions/Current/bin/python"
Run this script, and make it executable, i.e. python fastBuildMerge.py > 157-120.py; chmod a+x 157-120.py, and then run the output: ./157-120.py. Once it's done, you can open the output file (157-120.dot in this example) using Graphviz, and get something like this (a fairly sparse example):
Attachments
-
MergerKey.png
(25.5 KB) - added by mturk
2 years ago.
merger key from sskory
-
157-120.png
(393.7 KB) - added by mturk
2 years ago.
merger tree


