How to filter spectrum width from ppi files?

I have a ppi file and i need the spectrum width data for the 16th sweep(85 degree elevation).I am getting spectrum width data above 7 km but there are no clouds above that height(verified with reflectivity and doppler velocity). How to filter these false data?
I am attaching the spectrum width and reflectivity plot respectively.


Thank you in advance

Hi, Py-ART provides a GateFilter functionality for just that!

What you would need to do is exclude all points where the reflectivity is masked.

A sample code for that given a radar is:

gatefilter = pyart.filters.GateFilter(radar)

You can then specify that gatefilter in your plotting routines, and use the gatefilter.gate_excluded array as your mask for any calculations with the data.

Hope this helps,