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

Polish

parent b84fb5dd
No related branches found
No related tags found
No related merge requests found
......@@ -123,5 +123,4 @@ def plot_all(dict_list, label = None):
if __name__ == "__main__":
d = read()
plot_all([d])
plt.show()
#!/usr/bin/env python3
"""Note: the creation of ishape_last.txt assumes no missing date in
the output."""
the filtered output."""
import shapefile
import argparse
......
#!/usr/bin/env python3
"""Must be run from directory containing edgelist.csv, ishape_last.txt
and SHP-triplet directory for interpolated eddies.
"""
def compute_ishape(n, k1, ishape_last):
"""n: node, tuple (date_index, eddy_index). k1: first date in triplet
of shapefiles.
......@@ -33,6 +38,10 @@ if __name__ == "__main__":
import matplotlib.pyplot as plt
import networkx as nx
if len(sys.argv) != 2:
sys.exit("Required argument: directory containing triplet of "
"shapefiles, result of extracting the eddies at all dates")
shp_tr_dir = sys.argv[1]
G = report_graph.read_eddy_graph()
ishape_last = np.loadtxt(path.join(shp_tr_dir, "ishape_last.txt"),
......@@ -63,7 +72,7 @@ if __name__ == "__main__":
nx.draw_networkx(G, pos, edgelist = G.edges(component),
nodelist = component, edge_color=color, node_size=10,
node_color=color, with_labels=False)
H= G.subgraph(component)
H = G.subgraph(component)
t = nx.topological_sort(H)
ancestor = next(t)
plt.annotate(str(ancestor), pos[ancestor], color = color,
......
......@@ -1254,8 +1254,8 @@ Le processus $m$ envoie au processus $m - 1$. Cf. figure
\includegraphics[width=\textwidth]{processes}
\caption[Raccordement des processus]{Raccordement des processus. Les
comparaisons représentées ici en couleurs sont faites par le
processus m. En rouge dans la boucle principale, en bleu, vert et
marron dans l'épilogue.}
processus $m$. En rouge dans la boucle principale, en bleu, vert
et marron dans l'épilogue.}
\label{fig:processes}
\end{figure}
Il faut, pour $m < n_p - 1$ :
......@@ -1391,10 +1391,11 @@ Exemples : cf. tableaux (\ref{tab:m2}) et (\ref{tab:m3}) et figures
1 & 6 & 10 & 10
\end{tabular}
\caption[$\max \delta = 4$, n\_dates = 10, $n_p =
2$]{$\max \delta = 4$, n\_dates = 10, $n_p = 2$, $k_1 = 1$. $m = 0$ : lecture
dates 1 à 5, écriture date 1, réception date 6, écriture dates 2 à
4, réception dates 7 à 9, écriture dates 5 à 9. $m = 1$ : lecture
6 à 10, envoi 6 à 9, écriture 10.}
2$]{$\max \delta = 4$, n\_dates = 10, $n_p = 2$, $k_1 = 1$. $m$ est
le numéro du processus MPI. $m = 0$ : lecture dates 1 à 5,
écriture date 1, réception date 6, écriture dates 2 à 4, réception
dates 7 à 9, écriture dates 5 à 9. $m = 1$ : lecture 6 à 10, envoi
6 à 9, écriture 10.}
\label{tab:m2}
\end{table}
\begin{table}[htbp]
......
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