nbodykit includes two subclasses of
CatalogSource that
generate particles randomly in a box: RandomCatalog
and UniformCatalog. While these catalogs do not produce
realistic cosmological distributions of objects, they are especially useful
for generating catalogs quickly and for testing purposes.

The RandomCatalog class includes a random number generator
with the functionality of numpy.random.RandomState that generates
random numbers in parallel and in a manner that is independent of the number
of MPI ranks being used. This property is especially useful for running
reproducible tests where the number of CPUs might vary. The random number
generator is stored as the rng attribute.
Users can use this random number generator to add columns to the catalog,
using the syntax to add columns.

For a list of the full functionality of the rng
attribute, please see the API documentation for MPIRandomState.

When adding columns, the new column must have the same length as the local
size of the catalog, as specified by the size attribute. Most functions
of the rng attribute accept the size
keyword to generate an array of the correct size.

The UniformCatalog is a subclass of
RandomCatalog that includes Position and Velocity
columns that are uniformly distributed. The positions of the particles are
uniformly distributed between zero and the size of the box (as specified by
the user), with an input number density. The velocities are also
uniformly distributed but on a scale that is 1% of the size of the box.