wradlib.clutter.histo_cut

wradlib.clutter.histo_cut(prec_accum, upper_frequency=0.01, lower_frequency=0.01)

Histogram based clutter identification.

This identification algorithm uses the histogram of temporal accumulated rainfall. It iteratively detects classes whose frequency falls below a specified percentage (1% by default) of the frequency of the class with the biggest frequency and remove the values from the dataset until the changes from iteration to iteration falls below a threshold. This algorithm is able to detect static clutter as well as shadings.

The tresholds for the upper frequency (clutter) and the lower frequency (shading) can be parameterized by the respective kwargs, upper_frequency/lower_frequency.

It is suggested to choose a representative time periode for the input precipitation accumulation. The recommended time period should cover one year.

Parameters

prec_accum (numpy.ndarray) – spatial array containing rain accumulation

Keyword Arguments
  • upper_frequency (float) – Upper frequency percentage for clutter detection, defaults to 0.01.

  • lower_frequency (float) – Lower frequency percentage for shading detection, defaults to 0.01.

Returns

output (numpy.ndarray) – uint8 array with pixels identified as clutter set to 1 and shadings set to 2. Remaining pixels set to 0. Users strictly relying on a boolean mask might have to explicitely cast to boolean (adding .astype(np.bool) on the return).

Examples

See Heuristic clutter detection based on distribution properties (“histo cut”).