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

FIX: Fix for missing gatefilter in map_to_grid. #946

Merged
merged 1 commit into from
Jul 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pyart/map/grid_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def map_to_grid(radars, grid_shape, grid_limits, grid_origin=None,

# create arrays to hold the gate locations and indicators if the gate
# should be included in the interpolation.
gate_locations = np.empty((total_gates, 3), dtype=np.float64)
gate_locations = np.ma.empty((total_gates, 3), dtype=np.float64)
include_gate = np.ones((total_gates), dtype=np.bool)

offsets = [] # offsets from the grid origin, in meters, for each radar
Expand Down Expand Up @@ -495,9 +495,9 @@ def map_to_grid(radars, grid_shape, grid_limits, grid_origin=None,

# add gate locations to gate_locations array
start, end = gate_offset[iradar], gate_offset[iradar + 1]
gate_locations[start:end, 0] = zg_loc.flat[:]
gate_locations[start:end, 1] = yg_loc.flat[:]
gate_locations[start:end, 2] = xg_loc.flat[:]
gate_locations[start:end, 0] = zg_loc.flatten()
gate_locations[start:end, 1] = yg_loc.flatten()
gate_locations[start:end, 2] = xg_loc.flatten()
del xg_loc, yg_loc

# determine which gates should be included in the interpolation
Expand All @@ -509,7 +509,7 @@ def map_to_grid(radars, grid_shape, grid_limits, grid_origin=None,
gatefilter = moment_based_gate_filter(radar, **kwargs)
gflags = np.logical_and(gflags, gatefilter.gate_included)

include_gate[start:end] = gflags.flat
include_gate[start:end] = gflags.flatten()

if not copy_field_data:
# record the number of gates from the current radar which
Expand Down