class ytree.arbor.arbor.Arbor(filename)

Base class for all Arbor classes.

Loads a merger-tree output file or a series of halo catalogs and create trees, stored in an array in trees. Arbors can be saved in a universal format with save_arbor. Also, provide some convenience functions for creating YTArrays and YTQuantities and a cosmology calculator.


Initialize an Arbor given an input file.


__init__(filename) Initialize an Arbor given an input file.
add_alias_field(alias, field[, units, force_add]) Add a field as an alias to another field.
add_analysis_field(name, units) Add an empty field to be filled by analysis operations.
add_derived_field(name, function[, units, …]) Add a field that is a function of other fields.
is_grown(tree_node) Return True if a tree has been fully assembled, i.e., the hierarchy of ancestor tree nodes has been built.
is_setup(tree_node) Return True if arrays of uids and descendent uids have been read in.
query(key) If given a string, return an array of field values for the roots of all trees.
save_arbor([filename, fields, trees, …]) Save the arbor to a file.
select_halos(criteria[, trees, select_from, …]) Select halos from the arbor based on a set of criteria given as a string.
set_selector(selector, *args, **kwargs) Sets the tree node selector to be used.


arr Create a YTArray using the Arbor’s unit registry.
box_size The simulation box size.
field_info A dictionary containing information for each available field.
hubble_constant Value of the Hubble parameter.
quan Create a YTQuantity using the Arbor’s unit registry.
size Return length of tree list.
trees Array containing all trees in the arbor.
unit_registry Unit system registry.