yt.analysis_modules.halo_analysis.halo_filters module

Halo filter object

class yt.analysis_modules.halo_analysis.halo_filters.HaloFilter(function, *args, **kwargs)[source]

Bases: yt.analysis_modules.halo_analysis.halo_callbacks.HaloCallback

A HaloFilter is a function that minimally takes a Halo object, performs some analysis, and returns either True or False. The return value determines whether the Halo is added to the final halo catalog being generated by the HaloCatalog object.

yt.analysis_modules.halo_analysis.halo_filters.add_filter(name, function)[source]
yt.analysis_modules.halo_analysis.halo_filters.not_subhalo(halo, field_type='halos')[source]

Only return true if this halo is not a subhalo.

This is used for halo finders such as Rockstar that output parent and subhalos together.

yt.analysis_modules.halo_analysis.halo_filters.quantity_value(halo, field, operator, value, units)[source]

Filter based on a value in the halo quantities dictionary.

Parameters:
  • halo (Halo object) – The Halo object to be provided by the HaloCatalog.
  • field (string) – The field used for the evaluation.
  • operator (string) – The comparison operator to be used (“<”, “<=”, “==”, “>=”, “>”, etc.)
  • value (numneric) – The value to be compared against.
  • units (string) – Units of the value to be compared.