I am pleased to announce the release of ytree version 1.1.
ytree is a merger-tree code with yt-like syntax for loading data and accessing fields. ytree can:
return tree and halo data fields with symbolic units like in yt
create merger-trees for Gadget FoF/Subfind catalogs
load merger-trees from Rockstar halo catalogs and consistent-trees outputs
save individual and collections of merger-trees into a reloadable format
As of ytree version 1.1, field access is even more yt-like.
import ytree a = ytree.load("tree_0_0_0.dat") # consistent-trees
# masses for roots of all trees
print (a["mvir"].to("Msun")) [ 1.65035971e+13, 1.43309353e+13, 5.18129496e+14, ... 3.47482014e+12, 1.30273381e+12, 3.47482014e+12] Msun
# mass for the root of the first tree
print (a["mvir"]) 11470000000000.0 Msun/h
# most massive progenitors for first tree
print (a["line", "mvir"]) [ 1.14700000e+13, 1.20700000e+13, 1.23700000e+13, ... 3.32000000e+12, 1.20700000e+12, 2.71600000e+12] Msun/h
ytree is compatible with both Python 2 and 3 and can be installed with pip as:
pip install ytree
For more information, please visit: http://ytree.readthedocs.io/
ytree is an open-source project. If you're interested in contributing, please do!