# Confusion with wradlib.clutter.classify\_echo\_fuzzy

**URL:** https://openradar.discourse.group/t/confusion-with-wradlib-clutter-classify-echo-fuzzy/73
**Category:** Corrections/Data Quality
**Tags:** wradlib
**Created:** [October 24, 2022, 1:52pm UTC](https://openradar.discourse.group/t/confusion-with-wradlib-clutter-classify-echo-fuzzy/73 "2022-10-24T13:52:28Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Chiara](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@Chiara](https://openradar.discourse.group/u/Chiara)
#### Post date: [October 24, 2022, 1:52pm UTC](https://openradar.discourse.group/t/confusion-with-wradlib-clutter-classify-echo-fuzzy/73/1 "2022-10-24T13:52:28Z")

</div>

Dear wradlib users and developers,

I’m very glad to join this community and I would like to get more information about the python module wradlib.clutter.classify\_echo\_fuzzy implemented in wradlib for echo-classification.

I have some doubts and I would be very grateful if someone could help me:

1. which kind of static clutter map should be used in input in wradlib.clutter.classify\_echo\_fuzzy? For example, it should be a matrix filled with integers representing ordinals of the elevations free from clutter in each bin(0 stands for first elevation free from clutter, 1 for second elevation…) or it should be filled with the first free elevation angle for each bin or something else?
2. Should nodata be masked or set to nan in each input field? Should bins affected from clutter in the static clutter map, for a given elevation, be masked or be set to nan too?

Thanks a lot for your patience and attention!  
Chiara

---

<div class="post-metadata">

### Author: ![kmuehlbauer](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/kmuehlbauer/32/439_2.png) [@kmuehlbauer](https://openradar.discourse.group/u/kmuehlbauer)
#### Post date: [October 24, 2022, 3:21pm UTC](https://openradar.discourse.group/t/confusion-with-wradlib-clutter-classify-echo-fuzzy/73/2 "2022-10-24T15:21:07Z")

</div>

Hi Chiara,

I’m a bit confused you are talking about cluttermap as input.

The input of this function are polarimetric moments and their respective membership functions, see [wradlib.clutter.classify\_echo\_fuzzy — wradlib](https://docs.wradlib.org/en/stable/generated/wradlib.clutter.classify_echo_fuzzy.html#wradlib.clutter.classify_echo_fuzzy).

An example you could follow is in the tutorial section of the wardlib docs [Simple fuzzy echo classification from dual-pol moments — wradlib](https://docs.wradlib.org/en/stable/notebooks/classify/wradlib_fuzzy_echo_classify.html).

---

<div class="post-metadata">

### Author: ![kmuehlbauer](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/kmuehlbauer/32/439_2.png) [@kmuehlbauer](https://openradar.discourse.group/u/kmuehlbauer)
#### Post date: [October 24, 2022, 3:33pm UTC](https://openradar.discourse.group/t/confusion-with-wradlib-clutter-classify-echo-fuzzy/73/3 "2022-10-24T15:33:51Z")

</div>

Hi Chiara,

Got it now, yes the cluttermap is part of the input moments. Essentially it is a 2d array (as the other moments) representing a number between 0 and 1 (0 no clutter, 1 clutter) for each bin. The map should be created from a certain sweep, and the moments should be measured at the same elevation.

---

<div class="post-metadata">

### Author: ![Chiara](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@Chiara](https://openradar.discourse.group/u/Chiara)
#### Post date: [October 24, 2022, 4:04pm UTC](https://openradar.discourse.group/t/confusion-with-wradlib-clutter-classify-echo-fuzzy/73/4 "2022-10-24T16:04:33Z")

</div>

Hi!

thank you very much for your explanation.  
I have then found the files used in the wradlib tutorial, in [wradlib-data/netcdf at main · wradlib/wradlib-data · GitHub](https://github.com/wradlib/wradlib-data/blob/main/netcdf/) and [wradlib-data/TAG\_cmap\_sweeps\_0204050607.hdf5 at main · wradlib/wradlib-data · GitHub](https://github.com/wradlib/wradlib-data/blob/main/hdf5/TAG_cmap_sweeps_0204050607.hdf5).  
As you have replied, the clutter map used in the tutorial is a boolean array (matrix of 1 and 0 if we use the numeric values).

Finally, would you recommend to mask nodata bins, by setting them to nan, for the other mandatory fields (such as zdr or rhohv)?

Thank you very much again!

---

<div class="post-metadata">

### Author: ![kmuehlbauer](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/kmuehlbauer/32/439_2.png) [@kmuehlbauer](https://openradar.discourse.group/u/kmuehlbauer)
#### Post date: [November 2, 2022, 7:13am UTC](https://openradar.discourse.group/t/confusion-with-wradlib-clutter-classify-echo-fuzzy/73/5 "2022-11-02T07:13:10Z")

</div>

Hi @Chiara,

I think I can’t answer your last question to the last extend. But if you want to make sure that no `nodata` bins accidentally end up in your evaluations then mask them. Another option would be to apply the `nodata`-mask to the output.

HTH  
Kai
