From 476fa81bc2891827afd9fbb1b42c458ee558569c Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby Date: Tue, 7 Jul 2026 21:56:19 +0200 Subject: [PATCH] Results: Plot{AC,RKC}: Fix max elevation and minor change. --- src/View/Results/PlotAC.py | 4 ++-- src/View/Results/PlotRKC.py | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/View/Results/PlotAC.py b/src/View/Results/PlotAC.py index 5c8cf4d9..ccc9c3b2 100644 --- a/src/View/Results/PlotAC.py +++ b/src/View/Results/PlotAC.py @@ -248,8 +248,8 @@ class PlotAC(PamhyrPlot): if not self._init: self.draw() - reach = self.results[self._current_res_id].river.reach( - self._current_reach_id) + reach = self.results[self._current_res_id]\ + .river.reach(self._current_reach_id) profile = reach.profile(self._current_profile_id) x = profile.geometry.get_station() z = profile.geometry.z() diff --git a/src/View/Results/PlotRKC.py b/src/View/Results/PlotRKC.py index 36bb7a0c..1dfbfa8b 100644 --- a/src/View/Results/PlotRKC.py +++ b/src/View/Results/PlotRKC.py @@ -208,9 +208,11 @@ class PlotRKC(PamhyrPlot): water_z = list( map( - lambda p: table[ - ts, p.global_index - ], + lambda p: np.max( + table[ + :, p.global_index + ] + ), reach.profiles ) ) @@ -268,7 +270,7 @@ class PlotRKC(PamhyrPlot): table = result.get("table")["Z"] for profile in reach.profiles: - z_max = max(table[:, profile.global_index]) + z_max = np.max(table[:, profile.global_index]) z_max_ts = 0 for i, ts in enumerate(self._timestamps): z = table[i, profile.global_index]