pysteps.utils.tapering.compute_window_function

pysteps.utils.tapering.compute_window_function

pysteps.utils.tapering.compute_window_function(m, n, func, **kwargs)

Compute window function for a two-dimensional rectangular region. Window function-specific parameters are given as keyword arguments.

Parameters
m: int

Height of the array.

n: int

Width of the array.

func: str

The name of the window function. The currently implemented functions are ‘hann’ and ‘tukey’.

Returns
out: array

Array of shape (m, n) containing the tapering weights.

Other Parameters
alpha: float

Applicable if func is ‘tukey’.

Notes

Two-dimensional tapering weights are computed from one-dimensional window functions using w(r), where r is the distance from the center of the region.