# Filtering and retrievals of C-band Dual-pol Radar

**URL:** <https://openradar.discourse.group/t/filtering-and-retrievals-of-c-band-dual-pol-radar/649>\
**Category:** Corrections/Data Quality\
**Tags:** py-art\
**Created:** [October 14, 2025, 5:15am UTC](https://openradar.discourse.group/t/filtering-and-retrievals-of-c-band-dual-pol-radar/649 "2025-10-14T05:15:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gene\_cgha](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/gene_cgha/32/405_2.png) [@gene\_cgha](https://openradar.discourse.group/u/gene_cgha)\
**Post date:** [October 14, 2025, 5:15am UTC](https://openradar.discourse.group/t/filtering-and-retrievals-of-c-band-dual-pol-radar/649/1 "2025-10-14T05:15:06Z")

</div>

Hi greetings. I’m currently working in some radar data, particularly in Tagaytay, Philippine’s C-band dual-pol radar. I’m trying to filter out weather echoes by following the same methodology as in the post for Swiss C-band by using the `pyart.filters.moment_and_texture_based_gate_filter` as part of the attenuation correction. Unfortunately, when I use the moment and texture based gt, the plot only shows a blank figure.

> import matplotlib.pyplot as plt  
> import pyart  
> import sounderpy as spy  
> import numpy as np
> 
> cd = spy.get\_model\_data(‘era5’, [14.089800, 120.908301], ‘2024’, ‘07’, ‘23’, ‘00’) #Tagaytay Station
> 
> height = cd[‘z’].m  
> temp = cd[‘T’].m
> 
> file = ‘2045TAG20240723001000\_cleaned.uf’  
> radar = pyart.io.read\_uf(file)
> 
> height\_dict, profile\_dict = pyart.retrieve.map\_profile\_to\_gates(temp, height, radar, profile\_field=‘TEMP’)  
> profile\_dict.update({  
> “units”: “degrees Celsius”,  
> “long\_name”: “Temperature”,  
> “standard\_name”: “air\_temperature”  
> })
> 
> radar.add\_field(‘temperature’, profile\_dict, replace\_existing=True)  
> radar.add\_field(‘height’, height\_dict, replace\_existing=True)
> 
> ncp\_values = np.ones((radar.nrays, radar.ngates))  
> ncp = pyart.config.get\_metadata(‘normalized\_coherent\_power’)  
> ncp[‘data’] = ncp\_values  
> radar.add\_field(‘normalized\_coherent\_power’, ncp, replace\_existing=True)
> 
> snr = pyart.retrieve.calculate\_snr\_from\_reflectivity(radar, refl\_field=‘reflectivity’, snr\_field=‘snr’)  
> radar.add\_field(‘signal\_to\_noise\_ratio’, snr, replace\_existing=True)
> 
> phidp, kdp = pyart.correct.phase\_proc\_lp(radar, 0.0,  
> fzl=5000,  
> self\_const=60000.0,  
> LP\_solver=‘pyglpk’,  
> refl\_field=‘reflectivity’,  
> phidp\_field=‘differential\_phase’,  
> rhv\_field=‘cross\_correlation\_ratio’,  
> ncp\_field=‘normalized\_coherent\_power’,  
> min\_rhv=0.85,  
> min\_ncp=0.5,  
> coef=0.914)
> 
> radar.add\_field(‘proc\_dp\_phase\_shift’, phidp, replace\_existing=True)  
> radar.add\_field(‘recalculated\_diff\_phase’, kdp, replace\_existing=True)
> 
> gtfilter = pyart.filters.moment\_and\_texture\_based\_gate\_filter(radar, rhv\_field=‘cross\_correlation\_ratio’,  
> phi\_field=‘proc\_dp\_phase\_shift’,  
> refl\_field=‘reflectivity’, min\_rhv=0.85)  
> gtfilter.exclude\_below(‘signal\_to\_noise\_ratio’, 10)
> 
> fig, ax = plt.subplots(1,2, figsize=(10,6), sharex= True, sharey=True)  
> display = pyart.graph.RadarDisplay(radar)  
> display.plot\_ppi(‘reflectivity’, 0, vmin=0, vmax=60., ax = ax[0], colorbar\_label = ‘Raw’, cmap=‘NWSRef’)  
> display.plot\_ppi(‘reflectivity’, 0, vmin=0, vmax=60., gatefilter = gtfilter,  
> ax = ax[1], colorbar\_label = ‘Filtered’, cmap=‘NWSRef’)  
> ax[0].set\_xlim([-100,100])  
> ax[0].set\_ylim([-100,100])  
> ax[0].set\_aspect(‘equal’, ‘box’)  
> ax[1].set\_aspect(‘equal’, ‘box’)

 ![image](https://global.discourse-cdn.com/free1/uploads/openradar/original/1X/e3037214ee09d3096aac690d20ae35ad6b0b085f.png)

Is there a way to fix this issue? A sample file is attached. [https://drive.google.com/file/d/1KFfaUlBOjlIKRsx1ny1hP8Gg-NK3zlXQ/view?usp=sharing](https://drive.google.com/file/d/1KFfaUlBOjlIKRsx1ny1hP8Gg-NK3zlXQ/view?usp=sharing)

> **[Filtering and retrievals on raw Swiss C-band data — Project Pythia Cookbook...](https://openradarscience.org/erad2022/notebooks/pyart/exercice1_swiss_thunderstorm.html)**

---

<div class="post-metadata">

**Author:** ![jorahu](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/jorahu/32/19_2.png) [@jorahu](https://openradar.discourse.group/u/jorahu)\
**Post date:** [October 14, 2025, 9:50am UTC](https://openradar.discourse.group/t/filtering-and-retrievals-of-c-band-dual-pol-radar/649/2 "2025-10-14T09:50:03Z")

</div>

Hey!

Doing some assuming here, but seems like you are accessing the subplot axes correctly in the plot\_ppi arguments (i.e. the example works correctly), the only difference I can see is the gatefilter that you apply. Are you sure the gatefilter is doing the expected thing? Or is it just removing everything? Try visualising the filter properties, or just plot the working data in both plots (the second plot\_ppi without the gatefilter argument). Then you will see if the problem is plotting or the gatefilter.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![gene\_cgha](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/gene_cgha/32/405_2.png) [@gene\_cgha](https://openradar.discourse.group/u/gene_cgha)\
**Post date:** [October 16, 2025, 7:03am UTC](https://openradar.discourse.group/t/filtering-and-retrievals-of-c-band-dual-pol-radar/649/3 "2025-10-16T07:03:29Z")

</div>

Hi greetings, @jorahu. Thanks for the input.

Upon inspection, I already resolved it by tweaking the SNR’s TOA. Particularly, I have to set it somewhere in between 10000 to 12000 m (instead of the 25000 m as is).
