Welcome to ytree’s documentation!

ytree is a merger-tree code based on the yt analysis toolkit. ytree can create merger-trees from Gadget FoF/Subfind catalogs, either for all halos or for a specific set of halos. ytree is able to load in merger-tree from the following formats:

All formats can be saved with a universal format that can be reloaded with ytree. Individual trees for single halos can also be saved. Similar to yt, fields queried for halos or trees are returned with units.


ytree’s main dependency is yt. Once you have installed yt following the instructions here, ytree can be installed using pip.

pip install ytree

And that’s it!


Since ytree is heavily based on yt, the best way to get help is by joining the yt users list. Feel free to post any questions or ideas for development.

Citing ytree

If you use ytree in your work, please cite it as “ytree, written by Britton smith” with a footnote pointing to http://ytree.readthedocs.io.