pysteps.noise.fftgenerators.initialize_nonparam_2d_nested_filter

pysteps.noise.fftgenerators.initialize_nonparam_2d_nested_filter(X, gridres=1.0, **kwargs)

Function to compute the local Fourier filters using a nested approach.

Parameters:
X : array-like

Two- or three-dimensional array containing one or more input fields. All values are required to be finite. If more than one field are passed, the average fourier filter is returned. It assumes that fields are stacked by the first axis: [nr_fields, y, x].

gridres : float

Grid resolution in km.

Returns:
F : array-like

Four-dimensional array containing the 2d fourier filters distributed over a 2d spatial grid. It can be passed to pysteps.noise.fftgenerators.generate_noise_2d_ssft_filter().

Other Parameters:
 
max_level : int

Localization parameter. 0: global noise, >0: increasing degree of localization (default 3).

win_type : {‘hanning’, ‘flat-hanning’}

Optional tapering function to be applied to X, generated with pysteps.noise.fftgenerators.build_2D_tapering_function() (default ‘flat-hanning’).

war_thr : float [0;1]

Threshold for the minimum fraction of rain needed for computing the FFT (default 0.1).

rm_rdisc : bool

Whether or not to remove the rain/no-rain disconituity. It assumes no-rain pixels are assigned with lowest value.

fft_method : str or tuple

A string or a (function,kwargs) tuple defining the FFT method to use (see pysteps.utils.fft.get_method()). Defaults to “numpy”.