Skip to content
Snippets Groups Projects
Commit 5a348be3 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Handle missing orientation in `plot_eddy_contours`

parent 5fa98163
No related branches found
No related tags found
No related merge requests found
...@@ -37,19 +37,23 @@ def select_ishapes(d, SHPC, i_slice, orientation, window = None): ...@@ -37,19 +37,23 @@ def select_ishapes(d, SHPC, i_slice, orientation, window = None):
ishape_first = SHPC.comp_ishape(d, eddy_index = 1, i_slice = i_slice, ishape_first = SHPC.comp_ishape(d, eddy_index = 1, i_slice = i_slice,
orientation = orientation) orientation = orientation)
ishape_last = SHPC.get_ishape_last(i_slice, orientation)\ try:
[d - SHPC.d_init[i_slice]] ishape_last = SHPC.get_ishape_last(i_slice, orientation)\
[d - SHPC.d_init[i_slice]]
if window is None: except TypeError:
ishape_list = list(range(ishape_first, ishape_last + 1))
else:
ishape_list = [] ishape_list = []
reader = SHPC.get_reader(i_slice, layer = "extremum", else:
orientation = orientation) if window is None:
ishape_list = list(range(ishape_first, ishape_last + 1))
for ishape in range(ishape_first, ishape_last + 1): else:
points = reader.shape(ishape).points[0] ishape_list = []
if util_eddies.in_window(points, window): ishape_list.append(ishape) reader = SHPC.get_reader(i_slice, layer = "extremum",
orientation = orientation)
for ishape in range(ishape_first, ishape_last + 1):
points = reader.shape(ishape).points[0]
if util_eddies.in_window(points, window):
ishape_list.append(ishape)
return ishape_list return ishape_list
......
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