Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a method to apply a gatefilter to fields to mask the data #763

Closed
scollis opened this issue Aug 23, 2018 · 2 comments
Closed

Add a method to apply a gatefilter to fields to mask the data #763

scollis opened this issue Aug 23, 2018 · 2 comments

Comments

@scollis
Copy link
Member

scollis commented Aug 23, 2018

At the moment the way I apply a gatefilter to mask (ie when I want to save) data is as follows:

gf.exclude_below('reflectivity', 10)
nf = deepcopy(radar.fields['reflectivity'])
nf['data'] = np.ma.masked_where(gf.gate_excluded, nf['data'])
radar.add_field('filtered_refectivity', nf, replace_existing=True)```

It would be great to have a method that automates this...

something like:

radar.apply_filter(gatefilter, replace=False, fields=None)

If replace = False it will append 'filtered_'+field with areas where gatefilter.gate_exluded set to _FillValue
if replace = True it does it in-place
if fields = None it does it to all fields 

Inspired by Brenda Dolan
@zssherman
Copy link
Collaborator

Self assigned, will look into this.

@zssherman
Copy link
Collaborator

Working on this now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants