Functions
find_object_dtypes (data) |
Utility function to convert ‘O’ data types to strings |
gal_type_integers (galtab) |
Convert centrals to 0 and satellites to 1 |
Classes
HODBase (halos[, seed, use_cache, comm]) |
A base class to be used for HOD population of a halo catalog. |
HODCatalog (halos[, logMmin, sigma_logM, …]) |
A CatalogSource that uses the HOD prescription of Zheng et al 2007 to populate an input halo catalog with galaxies. |
nbodykit.source.catalog.hod.
HODBase
(halos, seed=None, use_cache=False, comm=None, **params)[source]¶A base class to be used for HOD population of a halo catalog.
The user must supply the __makemodel__()
function, which returns
the halotools composite HOD model.
This abstraction allows the user to potentially implement several different types of HOD models quickly, while using the population framework of this base class.
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 |
The union of the columns in the file and any transformed columns. |
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
Position () |
Galaxy positions, in units of Mpc/h |
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 () |
Galaxy velocity, in units of km/s |
VelocityOffset () |
The RSD velocity offset, in units of Mpc/h |
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) |
Return a column from the underlying data array/dict. |
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. |
repopulate ([seed]) |
Update the HOD parameters and then re-populate the mock catalog |
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_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 . |
VelocityOffset
()[source]¶The RSD velocity offset, in units of Mpc/h
This multiplies Velocity by 1 / (a*100*E(z)) = 1 / (a H(z)/h)
__makemodel__
()[source]¶Abstract class to be overwritten by user; this should return the HOD model instance that will be used to do the mock population.
See the documentation for more details.
Returns: | the halotools object implementing the HOD model |
---|---|
Return type: | HodModelFactory |
__makesource__
()[source]¶Make the source of galaxies by performing the halo HOD population
Note
The mock population is only done by the root, and the resulting catalog is then distributed evenly amongst the available ranks
repopulate
(seed=None, **params)[source]¶Update the HOD parameters and then re-populate the mock catalog
Warning
This operation is done in-place, so the size of the Source changes
Parameters: |
|
---|
nbodykit.source.catalog.hod.
HODCatalog
(halos, logMmin=13.031, sigma_logM=0.38, alpha=0.76, logM0=13.27, logM1=14.08, seed=None, use_cache=False, comm=None)[source]¶A CatalogSource that uses the HOD prescription of Zheng et al 2007 to populate an input halo catalog with galaxies.
The mock population is done using halotools
. See the documentation
for halotools.empirical_models.Zheng07Cens
and
halotools.empirical_models.Zheng07Sats
for further details
regarding the HOD.
The columns generated in this catalog are:
csize
size
conc_NFWmodel
Velocity
Position
For futher details, please see the documentation.
Note
Default HOD values are from Reid et al. 2014
Parameters: |
|
---|
References
Zheng et al. (2007), arXiv:0703457
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 |
The union of the columns in the file and any transformed columns. |
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
Position () |
Galaxy positions, in units of Mpc/h |
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 () |
Galaxy velocity, in units of km/s |
VelocityOffset () |
The RSD velocity offset, in units of Mpc/h |
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) |
Return a column from the underlying data array/dict. |
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. |
repopulate ([seed]) |
Update the HOD parameters and then re-populate the mock catalog |
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_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 . |