pyart icon indicating copy to clipboard operation
pyart copied to clipboard

Function to mask/remove high value gates at the edge of sweeps

Open jjhelmus opened this issue 10 years ago • 1 comments

As suggested in nguy/artview#107 a method for removing the 'ring' of high value gates at the edge of sweeps would make a good addition to Py-ART. A simple implementation is as follows:

radar = pyart.io.read('some_file.nc')
# insure that the reflectivity field is a masked array
radar.fields['reflectivity']['data'] = np.ma.array(radar.fields['reflectivity']['data'])
# mask out the last gates in each sweep
radar.fields['reflectivity']['data'][:, -10:] = np.ma.masked

Such a feature would fit well in the pyart.correct namespace.

jjhelmus avatar Oct 23 '15 21:10 jjhelmus

In addition it would be nice to write a procedure to detect this.. most radars I have seen using a test signal use a constant dBm .. so writing code that works out how many gates have within a certain stdev could be easy to implement.. (i'll give this a go)

On 10/23/15 5:26 PM, Jonathan J. Helmus wrote:

As suggested in nguy/artview#107 https://github.com/nguy/artview/issues/107 a method for removing the 'ring' of high value gates at the edge of sweeps would make a good addition to Py-ART. A simple implementation is as follows:

radar= pyart.io.read('some_file.nc')

insure that the reflectivity field is a masked array

radar.fields['reflectivity']['data']= np.ma.array(radar.fields['reflectivity']['data'])

mask out the last gates in each sweep

radar.fields['reflectivity']['data'][:,-10:]= np.ma.masked

Such a feature would fit well in the |pyart.correct| namespace.

— Reply to this email directly or view it on GitHub https://github.com/ARM-DOE/pyart/issues/407.

scollis avatar Oct 23 '15 21:10 scollis