From 5c0f90b43e496337a746480bc9e1e4f26038c5f9 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr> Date: Mon, 18 Dec 2023 15:11:56 +0100 Subject: [PATCH] Results: Fix sl results display. --- src/View/Results/PlotSedProfile.py | 4 ++-- src/View/Results/PlotSedReach.py | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/View/Results/PlotSedProfile.py b/src/View/Results/PlotSedProfile.py index 895df719..1db320f9 100644 --- a/src/View/Results/PlotSedProfile.py +++ b/src/View/Results/PlotSedProfile.py @@ -51,13 +51,13 @@ class PlotSedProfile(PamhyrPlot): profiles_sl = list( map( lambda sl: sl[0], - profile.get_ts_key(self._current_timestamp, "sl") + profile.get_ts_key(self._current_timestamp, "sl")[0] ) ) profiles_sl_0 = list( map( lambda sl: sl[0], - profile.get_ts_key(0.0, "sl") + profile.get_ts_key(0.0, "sl")[0] ) ) diff --git a/src/View/Results/PlotSedReach.py b/src/View/Results/PlotSedReach.py index 3978930d..b7f229c8 100644 --- a/src/View/Results/PlotSedReach.py +++ b/src/View/Results/PlotSedReach.py @@ -124,14 +124,14 @@ class PlotSedReach(PamhyrPlot): profiles_sl_0 = list( map( # Get SL list for profile p at time 0 (initial data) - lambda p: p.get_ts_key(0.0, "sl"), + lambda p: p.get_ts_key(0.0, "sl")[0], reach.profiles ) ) profiles_sl = list( map( # Get SL list for profile p at current time - lambda p: p.get_ts_key(self._current_timestamp, "sl"), + lambda p: p.get_ts_key(self._current_timestamp, "sl")[0], reach.profiles ) ) @@ -163,7 +163,10 @@ class PlotSedReach(PamhyrPlot): z_sl = reduce( lambda acc, v: acc + [ list( - map(lambda x, y: y - x, v, acc[-1]) + map( + lambda x, y: y - x, + v, acc[-1] + ) ) ], sl_0, -- GitLab