nbodykit.source.catalog.lognormal

Classes

LogNormalCatalog(Plin, nbar, BoxSize, Nmesh) A CatalogSource containing biased particles that have been Poisson-sampled from a log-normal density field.
class nbodykit.source.catalog.lognormal.LogNormalCatalog(Plin, nbar, BoxSize, Nmesh, bias=2.0, seed=None, cosmo=None, redshift=None, unitary_amplitude=False, inverted_phase=False, comm=None, use_cache=False)[source]

A CatalogSource containing biased particles that have been Poisson-sampled from a log-normal density field.

Parameters:
  • Plin (callable) – callable specifying the linear power spectrum
  • nbar (float) – the number density of the particles in the box, assumed constant across the box; this is used when Poisson sampling the density field
  • BoxSize (float, 3-vector of floats) – the size of the box to generate the grid on
  • Nmesh (int) – the mesh size to use when generating the density and displacement fields, which are Poisson-sampled to particles
  • bias (float, optional) – the desired bias of the particles; applied while applying a log-normal transformation to the density field
  • seed (int, optional) – the global random seed; if set to None, the seed will be set randomly
  • cosmo (nbodykit.cosmology.core.Cosmology, optional) – this must be supplied if Plin does not carry cosmo attribute
  • redshift (float, optional) – this must be supplied if Plin does not carry a redshift attribute
  • comm (MPI Communicator, optional) – the MPI communicator instance; default (None) sets to the current communicator
  • use_cache (bool, optional) – whether to cache data read from disk; default is False

References

Cole and Jones, 1991 Agrawal et al. 2017

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

Position() Position assumed to be in 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() Velocity in km/s
VelocityOffset() The corresponding RSD offset, in 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) 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_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.
Position()[source]

Position assumed to be in Mpc/h

Velocity()[source]

Velocity in km/s

VelocityOffset()[source]

The corresponding RSD offset, in Mpc/h