API Reference

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.