Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Halo Occupation Distribution (HOD) with OpenCosmo

In this tutorial, we compute the Halo Occupation Distribution (HOD) for hydrodynamic simulations from the SCIDAC suite.

The HOD describes the average number of galaxies hosted by halos as a function of halo mass:

[⟨Ngal∣Mhalo⟩][\langle N_{\mathrm{gal}} \mid M_{\mathrm{halo}} \rangle]

We will:

  • Load halo and galaxy data

  • Select cluster-scale halos

  • Count galaxies per halo

  • Compute and plot the HOD

Data Halo Properties Galaxy Properties
Tasks Filter Add Columns Evaluate

Load dataset

We begin by loading the dataset using OpenCosmo.

Collection of halos with galaxy_properties and halo_properties

Inspect dataset structure

Each halo is represented as a structure containing:

  • halo_properties

  • galaxy_properties

dict_keys(['halo_properties'])

Select cluster-scale halos

Compute the HOD

We bin halos in log mass and compute the mean number of galaxies per bin.

Check bin populations

We inspect how many halos fall into each bin.

Counts per bin: [55. 45. 21. 20. 14.  7.  1.  1.]

Plot the HOD

<Figure size 700x500 with 1 Axes>

Galaxy counts per halo

<Figure size 640x480 with 1 Axes>

Summary

In this tutorial, we:

  • Loaded halo and galaxy data using OpenCosmo

  • Selected cluster-scale halos

  • Counted galaxies per halo

  • Computed and visualized the Halo Occupation Distribution (HOD)

This workflow can be extended to compare galaxy populations across multiple simulations.