pysteps.noise.fftgenerators.generate_noise_2d_fft_filter#
- pysteps.noise.fftgenerators.generate_noise_2d_fft_filter(F, randstate=None, seed=None, fft_method=None, domain='spatial')#
Produces a field of correlated noise using global Fourier filtering.
- Parameters:
F (dict) – A filter object returned by
pysteps.noise.fftgenerators.initialize_param_2d_fft_filter()
orpysteps.noise.fftgenerators.initialize_nonparam_2d_fft_filter()
. All values in the filter array are required to be finite.randstate (mtrand.RandomState) – Optional random generator to use. If set to None, use numpy.random.
seed (int) – Value to set a seed for the generator. None will not set the seed.
fft_method (str or tuple) – A string or a (function,kwargs) tuple defining the FFT method to use (see “FFT methods” in
pysteps.utils.interface.get_method()
). Defaults to “numpy”.domain ({"spatial", "spectral"}) – The domain for the computations: If “spatial”, the noise is generated in the spatial domain and transformed back to spatial domain after the Fourier filtering. If “spectral”, the noise field is generated and kept in the spectral domain.
- Returns:
N – A two-dimensional field of stationary correlated noise. The noise field is normalized to zero mean and unit variance.
- Return type:
array-like