Results: Fix sl results display.

setup.py
Pierre-Antoine Rouby 2023-12-18 15:11:56 +01:00
parent e6de528b7f
commit 5c0f90b43e
2 changed files with 8 additions and 5 deletions

View File

@ -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]
)
)

View File

@ -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,