pisces.math_utils.random_fields.GaussianRandomVectorField.generate#

GaussianRandomVectorField.generate(divergence_cleaning: str | bool = False) ndarray[source]#

Generate a real-space Gaussian random vector field.

Parameters:

divergence_cleaning ({'discrete', 'continuous', False}, optional) – If ‘discrete’ or ‘continuous’, perform divergence cleaning in Fourier space to ensure the field is divergence-free. If False or ‘off’, no divergence cleaning is applied. Default is ‘discrete’.

Returns:

Real-valued random vector field with shape (*domain_dimensions, ndim).

Return type:

np.ndarray