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

Polish

parent 0c328f80
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,7 @@ def new_traj(ind_traj, traj_prop, n, traj_vert_ind):
if len(sys.argv) != 2: sys.exit("Required argument: input-graph")
g = graph_tool.load_graph(sys.argv[1])
print("Loading done")
if "cost_function" in g.edge_properties:
closest_succ = g.new_vertex_property('int')
......@@ -61,6 +62,8 @@ traj_vert_ind = []
# An element of traj_vert_ind is a trajectory, represented by a list
# of vertex indices.
print("Starting loop to define traj_prop...")
for n in topology.topological_sort(g):
# First, we check whether we have a phantom pattern. Phantom
# eddies may appear in altimetric data because of
......@@ -166,6 +169,8 @@ for t in traj_vert_ind:
traj_segm.append(list_segm)
expanded_traj.append(list_eddies_traj)
print("Saving...")
with open("traj_segm.json", "w") as outfile:
json.dump(traj_segm, outfile, indent = 4)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment