API Reference¶
Working with Merger-Trees¶
The load
can load all supported
merger-tree formats. Once loaded, the
save_arbor
and
save_tree
functions can be
used to save the entire arbor or individual trees.
load (filename[, method]) |
Load an Arbor, determine the type automatically. |
Arbor (filename) |
Base class for all Arbor classes. |
save_arbor ([filename, fields, trees, …]) |
Save the arbor to a file. |
save_tree ([filename, fields]) |
Save the tree to a file. |
set_selector (selector, *args, **kwargs) |
Sets the tree node selector to be used. |
TreeNodeSelector (function[, args, kwargs]) |
The TreeNodeSelector is responsible for choosing which one of a halo’s ancestors to return when querying the line of main progenitors for a halo. |
add_tree_node_selector (name, function) |
Add a TreeNodeSelector to the registry of known selectors, so they can be chosen with set_selector . |
max_field_value (ancestors, field) |
Return the TreeNode with the maximum value of the given field. |
min_field_value (ancestors, field) |
Return the TreeNode with the minimum value of the given field. |
Making Merger-Trees¶
TreeFarm (time_series[, setup_function]) |
TreeFarm is the merger-tree creator for Gadget FoF and Subfind halo catalogs. |
trace_ancestors (halo_type, root_ids[, …]) |
Trace the ancestry of a given set of halos. |
trace_descendents (halo_type[, fields, filename]) |
Trace the descendents of all halos. |
set_selector (selector, *args, **kwargs) |
Set the method for selecting candidate halos for tracing halo ancestry. |
set_ancestry_checker (ancestry_checker, …) |
Set the method for determing if a halo is the ancestor of another halo. |
set_ancestry_filter (ancestry_filter, *args, …) |
Select a method for determining which ancestors are kept. |
set_ancestry_short (ancestry_short, *args, …) |
Select a method for cutting short the ancestry search. |
AncestryChecker (function[, args, kwargs]) |
An AncestryCheck is a function that is responsible for determining whether one halo is an ancestor of another. |
add_ancestry_checker (name, function) |
Add an ancestry checking function to the registry. |
common_ids (descendent_ids, ancestor_ids[, …]) |
Determine if at least a given fraction of ancestor’s member particles are in the descendent. |
AncestryFilter (function[, args, kwargs]) |
An AncestryFilter takes a halo and a list of ancestors and returns a filtered list of filtered list of ancestors. |
add_ancestry_filter (name, function) |
Add an ancestry filter function to the registry. |
most_massive (halo, ancestors) |
Return only the most massive ancestor. |
AncestryShort (function[, args, kwargs]) |
An AncestryShort takes a halo and an ancestor halo and determines if the ancestry search should come to an end. |
add_ancestry_short (name, function) |
Add an ancestry short-out function to the registry. |
above_mass_fraction (halo, ancestor, fraction) |
Return only the most massive ancestor. |
HaloSelector (function[, args, kwargs]) |
A HaloSelector is a function that is responsible for creating a list of ids of halos that are potentially ancestors of a given halo. |
add_halo_selector (name, function) |
Add a HaloSelector to the registry of known selectors, so they can be chosen with set_selector . |
sphere_selector (hc, ds2, radius_field[, …]) |
Select halos within a sphere around the target halo. |
all_selector (hc, ds2) |
Return all halos from the ancestor dataset. |
Internal Classes¶
Arbor (filename) |
Base class for all Arbor classes. |
CatalogArbor (filename) |
Base class for Arbors created from a series of halo catalog files where the descendent ID for each halo has been pre-determined. |
FieldInfoContainer (arbor) |
A container for information about fields. |
FieldContainer (arbor) |
A container for field data. |
FakeFieldContainer (arbor[, name]) |
A fake field data container used to calculate dependencies. |
FieldIO (arbor) |
Base class for FieldIO classes. |
TreeFieldIO (arbor) |
IO class for getting fields for a tree. |
RootFieldIO (arbor) |
IO class for getting fields for the roots of all trees. |
FallbackRootFieldIO (arbor) |
Class for getting root fields from arbors that have no specialized storage for root fields. |
DataFile (filename) |
Base class for data files. |
CatalogDataFile (filename, arbor) |
Base class for halo catalog files. |
TreeNode (uid[, arbor, root]) |
Class for objects stored in Arbors. |
TreeNodeSelector (function[, args, kwargs]) |
The TreeNodeSelector is responsible for choosing which one of a halo’s ancestors to return when querying the line of main progenitors for a halo. |
AHFArbor (filename[, hubble_constant]) |
Arbor for Amiga Halo Finder data. |
AHFFieldInfo (arbor) |
|
AHFDataFile (filename, arbor) |
|
ArborArbor (filename) |
Class for Arbors created with ytree version 1.1.0 or earlier. |
ArborArborFieldInfo (arbor) |
|
ArborArborTreeFieldIO (arbor) |
|
ArborArborRootFieldIO (arbor) |
|
ConsistentTreesArbor (filename) |
Arbors from consistent-trees output files. |
ConsistentTreesFieldInfo (arbor) |
|
ConsistentTreesDataFile (filename) |
|
ConsistentTreesTreeFieldIO (arbor) |
|
LHaloTreeArbor (*args, **kwargs) |
Arbors for LHaloTree data. |
LHaloTreeFieldInfo (arbor) |
|
LHaloTreeTreeFieldIO (arbor) |
|
LHaloTreeRootFieldIO (arbor) |
|
RockstarArbor (filename) |
Class for Arbors created from Rockstar out_*.list files. |
RockstarFieldInfo (arbor) |
|
RockstarDataFile (filename, arbor) |
|
TreeFarmArbor (filename) |
Class for Arbors created with TreeFarm . |
TreeFarmFieldInfo (arbor) |
|
TreeFarmDataFile (filename, arbor) |
|
TreeFarmTreeFieldIO (arbor) |
|
YTreeArbor (filename) |
Class for Arbors created from the save_arbor or save_tree functions. |
YTreeDataFile (filename) |
|
YTreeTreeFieldIO (arbor) |
|
YTreeRootFieldIO (arbor) |