yt_astro_analysis.halo_analysis.halo_catalog.halo_catalog.HaloCatalog.add_recipe

HaloCatalog.add_recipe(recipe, *args, **kwargs)

Add a recipe to the halo catalog action list.

A recipe is an operation consisting of a series of callbacks, quantities, and/or filters called in succession. Recipes can be used to store a more complex series of analysis tasks as a single entity.

Currently, the available recipe is calculate_virial_quantities.

Parameters:

halo_recipe (string) – The name of the recipe.

Examples

>>> import yt
>>> from yt.extensions.astro_analysis.halo_analysis import HaloCatalog
>>>
>>> data_ds = yt.load('Enzo_64/RD0006/RedshiftOutput0006')
>>> halos_ds = yt.load('rockstar_halos/halos_0.0.bin')
>>> hc = HaloCatalog(data_ds=data_ds, halos_ds=halos_ds)
>>>
>>> # Filter out less massive halos
>>> hc.add_filter("quantity_value", "particle_mass", ">", 1e14, "Msun")
>>>
>>> # Calculate virial radii
>>> hc.add_recipe("calculate_virial_quantities", ["radius", "matter_mass"])
>>>
>>> hc.create()