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

Generalize to any slice

Except with option `-i`, which still assumes slice 0.
parent e20a4142
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ SHPC = util_eddies.SHPC_class(args.directory, def_orient=args.orientation)
if args.ishape:
ishape = args.ishape
i_slice = 0
else:
if args.node:
with open("e_overestim.txt") as f:
......@@ -37,7 +38,8 @@ else:
eddy_index = int(reply[1])
assert eddy_index >= 1
ishape = SHPC.comp_ishape(date, eddy_index, 0, args.orientation)
i_slice = SHPC.get_slice(date)
ishape = SHPC.comp_ishape(date, eddy_index, i_slice, args.orientation)
print("ishape =", ishape)
......@@ -45,9 +47,9 @@ for layer in ["extremum", "outermost_contour", "max_speed_contour", "centroid"]:
print()
try:
shapeRec = SHPC.get_reader(0, args.orientation, layer).shapeRecord(
ishape
)
shapeRec = SHPC.get_reader(
i_slice, args.orientation, layer
).shapeRecord(ishape)
except AttributeError:
pass
else:
......
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