Skip to content

Commit 55860fb

Browse files
committed
check if contour is available
1 parent d31e437 commit 55860fb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/py_eddy_tracker/gui.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,11 @@ def update(self):
188188
if len(i) == 0:
189189
self.m[name]["contour_s"].set_data([], [])
190190
else:
191-
self.m[name]["contour_s"].set_data(
192-
flatten_line_matrix(dataset["contour_lon_s"][i]),
193-
flatten_line_matrix(dataset["contour_lat_s"][i]),
194-
)
191+
if 'contour_lon_s' in dataset.elements:
192+
self.m[name]["contour_s"].set_data(
193+
flatten_line_matrix(dataset["contour_lon_s"][i]),
194+
flatten_line_matrix(dataset["contour_lat_s"][i]),
195+
)
195196
# text.append(f"{i.shape[0]}")
196197
local_path = dataset.extract_ids(dataset["track"][i])
197198
x, y, t, n, tr = (

0 commit comments

Comments
 (0)