broadcast_host_halo_property¶
- halotools.utils.broadcast_host_halo_property(table, halo_property_key, delete_possibly_existing_column=False)[source]¶
Calculate a property of the host of a group system and broadcast that property to all group members, e.g., calculate host halo mass.
- Parameters:
- tableAstropy
Table
Table storing the halo catalog.
- halo_property_keystring
Name of the column to be broadcasted to all halo members
- delete_possibly_existing_columnbool, optional
If set to False,
add_halo_hostid
will raise an Exception if the input table already contains ahalo_hostid
column. If True, the column will be deleted if it exists, and no action will be taken if it does not exist. Default is False.
- tableAstropy
Notes
This function is primarily for use with Halotools-formatted halo tables. In particular, this function assumes that the table has a
halo_id
andhalo_hostid
column.Examples
>>> from halotools.sim_manager import FakeSim >>> halocat = FakeSim() >>> broadcast_host_halo_property(halocat.halo_table, 'halo_spin')
The
halo_table
now has a column calledhalo_spin_host_halo
.