set_selector(selector, *args, **kwargs)¶
Sets the tree node selector to be used.
This sets the manner in which halo progenitors are chosen from a list of ancestors. The most obvious example is to select the most massive ancestor.
- selector : string
- Name of the selector to be used.
Any additional arguments and keywords to be provided to the selector function should follow.
>>> import ytree >>> a = ytree.load("rockstar_halos/trees/tree_0_0_0.dat") >>> a.set_selector("max_field_value", "mass")