From ec92f226992c94ff397ffb65fb76fbe050ae82a4 Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Sat, 27 Apr 2024 00:41:28 +0200
Subject: [PATCH] Blacken

---
 Inst_eddies/Analysis/eddy_dump.py      |  4 +++-
 Overlap/Analysis/plot_edge_contours.py | 26 +++++++++++++++++---------
 Trajectories/Analysis/plot_traj.py     |  4 +++-
 Trajectories/cost_function.py          |  4 +++-
 4 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/Inst_eddies/Analysis/eddy_dump.py b/Inst_eddies/Analysis/eddy_dump.py
index 98df7a05..f60472cc 100755
--- a/Inst_eddies/Analysis/eddy_dump.py
+++ b/Inst_eddies/Analysis/eddy_dump.py
@@ -40,7 +40,9 @@ else:
         assert eddy_index >= 1
 
     i_slice = SHPC.get_slice(date)
-    i_slice, ishape = SHPC.comp_ishape(date, eddy_index, args.orientation, i_slice)
+    i_slice, ishape = SHPC.comp_ishape(
+        date, eddy_index, args.orientation, i_slice
+    )
 
 print("ishape =", ishape)
 
diff --git a/Overlap/Analysis/plot_edge_contours.py b/Overlap/Analysis/plot_edge_contours.py
index c389bd9a..29583c3a 100755
--- a/Overlap/Analysis/plot_edge_contours.py
+++ b/Overlap/Analysis/plot_edge_contours.py
@@ -9,29 +9,37 @@ import plot_eddy_contours
 import util_eddies
 
 # Input:
-if len(sys.argv) != 6: sys.exit("Required arguments: {Anticyclones,Cyclones} "
-                                "SHPC_dir e_overestim head-node tail-node")
+if len(sys.argv) != 6:
+    sys.exit(
+        "Required arguments: {Anticyclones,Cyclones} SHPC_dir e_overestim "
+        "head-node tail-node"
+    )
 orientation = sys.argv[1]
 SHPC_dir = sys.argv[2]
 e_overestim = int(sys.argv[3])
 my_head = int(sys.argv[4])
 my_tail = int(sys.argv[5])
 
-SHPC = util_eddies.SHPC_class(SHPC_dir, def_orient = orientation)
+SHPC = util_eddies.SHPC_class(SHPC_dir, def_orient=orientation)
 date_head, eddy_i_head = util_eddies.node_to_date_eddy(my_head, e_overestim)
 date_tail, eddy_i_tail = util_eddies.node_to_date_eddy(my_tail, e_overestim)
 print(f"{date_head=}")
 print(f"{date_tail=}")
 i_slice_head = SHPC.get_slice(date_head)
 i_slice_tail = SHPC.get_slice(date_tail)
-i_slice_head, ishape_head = SHPC.comp_ishape(date_head,eddy_i_head,orientation,i_slice_head)
-i_slice_tail, ishape_tail = SHPC.comp_ishape(date_tail,eddy_i_tail,orientation,i_slice_tail)
+i_slice_head, ishape_head = SHPC.comp_ishape(
+    date_head, eddy_i_head, orientation, i_slice_head
+)
+i_slice_tail, ishape_tail = SHPC.comp_ishape(
+    date_tail, eddy_i_tail, orientation, i_slice_tail
+)
 fig = plt.figure()
 projection = ccrs.PlateCarree()
-ax = plt.axes(projection = projection)
+ax = plt.axes(projection=projection)
 plot_eddy_contours.snapshot(ax, [ishape_head], SHPC, i_slice_head, orientation)
-plot_eddy_contours.snapshot(ax, [ishape_tail], SHPC, i_slice_tail, orientation,
-                            dashed=True)
-ax.gridlines(draw_labels = True)
+plot_eddy_contours.snapshot(
+    ax, [ishape_tail], SHPC, i_slice_tail, orientation, dashed=True
+)
+ax.gridlines(draw_labels=True)
 ax.coastlines()
 plt.show()
diff --git a/Trajectories/Analysis/plot_traj.py b/Trajectories/Analysis/plot_traj.py
index 499fc6c3..711ca639 100755
--- a/Trajectories/Analysis/plot_traj.py
+++ b/Trajectories/Analysis/plot_traj.py
@@ -26,7 +26,9 @@ def get_extr_coord(traj, e_overestim, SHPC, orientation):
             node, e_overestim
         )
         i_slice = SHPC.get_slice(date_index)
-        i_slice, ishape = SHPC.comp_ishape(date_index, eddy_index, orientation, i_slice)
+        i_slice, ishape = SHPC.comp_ishape(
+            date_index, eddy_index, orientation, i_slice
+        )
         shape = SHPC.get_reader(i_slice, orientation, layer="extremum").shape(
             ishape
         )
diff --git a/Trajectories/cost_function.py b/Trajectories/cost_function.py
index c6f88061..42d4bd92 100755
--- a/Trajectories/cost_function.py
+++ b/Trajectories/cost_function.py
@@ -78,7 +78,9 @@ def node_to_prop(node_list, e_overestim, SHPC, orientation):
     for n in node_list:
         date_index, eddy_index = util_eddies.node_to_date_eddy(n, e_overestim)
         i_slice = SHPC.get_slice(date_index)
-        i_slice, ishape = SHPC.comp_ishape(date_index, eddy_index, orientation, i_slice)
+        i_slice, ishape = SHPC.comp_ishape(
+            date_index, eddy_index, orientation, i_slice
+        )
         shapeRec = SHPC.get_reader(
             i_slice, orientation, "extremum"
         ).shapeRecord(ishape)
-- 
GitLab