nbodykit.source.catalog.halos

Classes

HaloCatalog(source, cosmo, redshift[, mdef, …]) A wrapper CatalogSource of halo objects to interface nicely with halotools.sim_manager.UserSuppliedHaloCatalog.
class nbodykit.source.catalog.halos.HaloCatalog(source, cosmo, redshift, mdef='vir', mass='Mass', position='Position', velocity='Velocity')[source]

A wrapper CatalogSource of halo objects to interface nicely with halotools.sim_manager.UserSuppliedHaloCatalog.

Parameters:
  • source (CatalogSource) – the source holding the particles to be interpreted as halos
  • cosmo (Cosmology) – the cosmology instance;
  • redshift (float) – the redshift of the halo catalog
  • mdef (str, optional) – string specifying mass definition, used for computing default halo radii and concentration; should be ‘vir’ or ‘XXXc’ or ‘XXXm’ where ‘XXX’ is an int specifying the overdensity
  • mass (str, optional) – the column name specifying the mass of each halo
  • position (str, optional) – the column name specifying the position of each halo
  • velocity (str, optional) – the column name specifying the velocity of each halo

Attributes

Index The attribute giving the global index rank of each particle in the list.
attrs A dictionary storing relevant meta-data about the CatalogSource.
columns All columns in the CatalogSource, including those hard-coded into the class’s defintion and override columns provided by the user.
csize The total, collective size of the CatalogSource, i.e., summed across all ranks.
hardcolumns A list of the hard-coded columns in the CatalogSource.
size The number of objects in the CatalogSource on the local rank.
use_cache If set to True, use the built-in caching features of dask to cache data in memory.

Methods

Concentration() The halo concentration, computed using nbodykit.transform.HaloConcentration().
Mass() The halo mass column, assumed to be in units of \(M_\odot/h\).
Position() The halo position column, assumed to be in units of \(\mathrm{Mpc}/h\).
Radius() The halo radius, computed using nbodykit.transform.HaloRadius().
Selection() A boolean column that selects a subset slice of the CatalogSource.
Value() When interpolating a CatalogSource on to a mesh, the value of this array is used as the Value that each particle contributes to a given mesh cell.
Velocity() The halo velocity column, assumed to be in units of km/s.
VelocityOffset() The redshift-space distance offset due to the velocity in units of distance.
Weight() The column giving the weight to use for each particle on the mesh.
compute(*args, **kwargs) Our version of dask.compute() that computes multiple delayed dask collections at once.
copy() Return a shallow copy of the object, where each column is a reference of the corresponding column in self.
get_hardcolumn(col) Construct and return a hard-coded column.
gslice(start, stop[, end, redistribute]) Execute a global slice of a CatalogSource.
make_column(array) Utility function to convert an array-like object to a dask.array.Array.
read(columns) Return the requested columns as dask arrays.
save(output, columns[, datasets, header]) Save the CatalogSource to a bigfile.BigFile.
sort(keys[, reverse, usecols]) Return a CatalogSource, sorted globally across all MPI ranks in ascending order by the input keys.
to_halotools([BoxSize, selection]) Return the CatalogSource as a halotools.sim_manager.UserSuppliedHaloCatalog.
to_mesh([Nmesh, BoxSize, dtype, interlaced, …]) Convert the CatalogSource to a MeshSource, using the specified parameters.
view([type]) Return a “view” of the CatalogSource object, with the returned type set by type.
Concentration()[source]

The halo concentration, computed using nbodykit.transform.HaloConcentration().

This uses the analytic formulas for concentration from Dutton and Maccio 2014.

Mass()[source]

The halo mass column, assumed to be in units of \(M_\odot/h\).

Position()[source]

The halo position column, assumed to be in units of \(\mathrm{Mpc}/h\).

Radius()[source]

The halo radius, computed using nbodykit.transform.HaloRadius().

Assumed units of \(\mathrm{Mpc}/h\).

Velocity()[source]

The halo velocity column, assumed to be in units of km/s.

VelocityOffset()[source]

The redshift-space distance offset due to the velocity in units of distance. The assumed units are \(\mathrm{Mpc}/h\).

This multiplies Velocity by \(1 / (a 100 E(z)) = 1 / (a H(z)/h)\).

to_halotools(BoxSize=None, selection='Selection')[source]

Return the CatalogSource as a halotools.sim_manager.UserSuppliedHaloCatalog.

The Halotools catalog only holds the local data, although halos are labeled via the halo_id column using the global index.

Parameters:
  • BoxSize (float, array_like, optional) – the size of the box; note that anisotropic boxes are currently not supported by halotools
  • selection (str, optional) – the name of the column to slice the data on before converting to a halotools catalog
Returns:

cat – the Halotools halo catalog, storing the local halo data

Return type:

halotools.sim_manager.UserSuppliedHaloCatalog