ytree.data_structures.arbor.Arbor.set_selector

Arbor.set_selector(selector, *args, **kwargs)[source]

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.

Parameters:
  • selector (string) – Name of the selector to be used.
  • additional arguments and keywords to be provided to (Any) –
  • selector function should follow. (the) –

Examples

>>> import ytree
>>> a = ytree.load("rockstar_halos/trees/tree_0_0_0.dat")
>>> a.set_selector("max_field_value", "mass")