nbody

nbody.io

Routines for reading nbody (gbpHalos, gbpTrees etc.) output files.

dragons.nbody.io.read_density_grid(fname)[source]

Deprecated since version 0.2.1: The read_density_grid function is deprecated and may be removed in a future version. Use dragons.nbody.io.read_grid instead.

Read in a density grid produced by gbpCode.

Args:
fnamestr

Full path to input grid file.

Returns:
gridarray

The density grid.

dragons.nbody.io.read_grid(fname, grid_name)[source]

Read in a real space grid produced by gbpCode.

Args:
fnamestr

Full path to input grid file.

grid_namestr

The name of the grid. Must be either density, vx, vy, or vz.

Returns:
gridndarray

The requested grid.

dragons.nbody.io.read_halo_catalog(catalog_loc)[source]

Read in a halo catalog produced by gbpCode.

Args:
catalog_locstr

Full path to input catalog file or directory

Returns:
haloarray

The catalog of halos