Skip to content
Snippets Groups Projects
Commit 1f678763 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 1a5189d9
No related branches found
Tags v0.5.1
No related merge requests found
......@@ -280,14 +280,18 @@ def get_average(tile_2d):
def get_grid_values_all(h5f, grid_name, scale_factor_name='scale_factor', add_offset_name='add_offset',
fill_value_name='_FillValue', range_name='actual_range', fill_value=None):
fill_value_name='_FillValue', range_name='actual_range', fill_value=None, stride=None):
hfds = h5f[grid_name]
attrs = hfds.attrs
if attrs is None:
raise GenericException('No attributes object for: '+grid_name)
grd_vals = hfds[:,]
if stride is None:
grd_vals = hfds[:,]
else:
grd_vals = hfds[::stride, ::stride]
if fill_value is not None:
grd_vals = np.where(grd_vals == fill_value, np.nan, grd_vals)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment