From 4d80f25c5b21308865c3e0fd0dd06f9cdfb469f6 Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Wed, 9 Sep 2020 18:36:45 +0200
Subject: [PATCH] Polish

---
 Analysis/distribution_function.py      |  1 -
 Analysis/filter.py                     |  2 +-
 Analysis/plot_traj.py                  | 11 ++++++++++-
 Documentation_texfol/documentation.tex | 13 +++++++------
 4 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/Analysis/distribution_function.py b/Analysis/distribution_function.py
index d7278b4f..9cbbcc09 100755
--- a/Analysis/distribution_function.py
+++ b/Analysis/distribution_function.py
@@ -123,5 +123,4 @@ def plot_all(dict_list, label = None):
 if __name__ == "__main__":
     d = read()
     plot_all([d])
-    
     plt.show()
diff --git a/Analysis/filter.py b/Analysis/filter.py
index 554f8f5e..9aaca2b0 100755
--- a/Analysis/filter.py
+++ b/Analysis/filter.py
@@ -1,7 +1,7 @@
 #!/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
diff --git a/Analysis/plot_traj.py b/Analysis/plot_traj.py
index 807cf53b..ec1e9346 100755
--- a/Analysis/plot_traj.py
+++ b/Analysis/plot_traj.py
@@ -1,5 +1,10 @@
 #!/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,
diff --git a/Documentation_texfol/documentation.tex b/Documentation_texfol/documentation.tex
index 33714fce..a6e61c54 100644
--- a/Documentation_texfol/documentation.tex
+++ b/Documentation_texfol/documentation.tex
@@ -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]
-- 
GitLab