kspace.GaussianRandomField#
- class kspace.GaussianRandomField(left_edge, right_edge, ddims, power_spec, seed=None)[source]#
Bases:
RandomField- Parameters:
left_edge (array-like) – The lower edge of the box [kpc] for each of the dimensions.
right_edge (array-like) – The upper edge of the box [kpc] for each of the dimensions.
ddims (array-like) – The number of grids in each of the axes.
power_spec (PowerSpectrum object) – The power spectrum function for the field.
seed (int, optional) – Random seed for reproducibility.
Methods
__init__(left_edge, right_edge, ddims, ...)generate_scalar_field_realization([...])Generate a random realization of the field as a scalar field.
generate_vector_field_realization([...])Generate a random realization of the field as a vector field.