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

Polish

parent 51e63056
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3 #!/usr/bin/env python3
"""This script loads a segmented cf graph in the gt format, iterates """This script loads the graph of segments, with cost functions and
on all of the edges and cost functions and generates the trajectories identifies trajectories.
as done in MATLAB. Segments (nodes) have a new vertex property called
"traj_prop" that holds the trajectory ID that that segment belongs to. The Inputs: the graph of segments produced by Graph-tool (gt or graphml
output is either an expanded JSON file and/or an edgelist file with format). Output: trajectories as lists of segments and as lists of
all of the trajectories. instantaneous eddies, in JSon files.
Inputs:
the gt segmented cf graph
Output:
trajectories.json that contains all of the trajectories
""" """
import graph_tool import graph_tool
from os import path
import json import json
import csv
from graph_tool import util, search
import sys import sys
import numpy as np import numpy as np
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment