debug export csv

master
Theophile Terraz 2026-04-03 14:18:29 +02:00
parent 0886956ec8
commit 421e6797f6
3 changed files with 13 additions and 33 deletions

View File

@ -103,10 +103,7 @@ class CustomPlot(PamhyrPlot):
def get_ts_zmin(self, profile, res_id): def get_ts_zmin(self, profile, res_id):
results = self.data[res_id] results = self.data[res_id]
# nt = len(list(results.get("timestamps")))
reach = results.river.reach(self._current_reach) reach = results.river.reach(self._current_reach)
# berdrock = self.sl_compute_bedrock(reach)
# sl = reach.profile(profile).get_key("sl")
zfd = reach.profile(profile).get_key("zfd") zfd = reach.profile(profile).get_key("zfd")
return zfd return zfd

View File

@ -102,11 +102,7 @@ class PlotRKC(PamhyrPlot):
self.draw_bottom_geometry(reach) self.draw_bottom_geometry(reach)
def draw_bottom_with_bedload(self, reach): def draw_bottom_with_bedload(self, reach):
# self._bedrock = self.sl_compute_bedrock(reach)
rk = reach.geometry.get_rk() rk = reach.geometry.get_rk()
# z = self.sl_compute_current_z(reach)
zfd = list( zfd = list(
map( map(
lambda p: p.get_ts_key( lambda p: p.get_ts_key(

View File

@ -851,17 +851,17 @@ class ResultsWindow(PamhyrWindow):
my_dict = {} my_dict = {}
my_dict[dict_x["rk"]] = reach.geometry.get_rk() my_dict[dict_x["rk"]] = reach.geometry.get_rk()
if "bed_elevation" in y: if "bed_elevation" in y:
if self._current_results != 2: if reach.has_bedload():
zmin = reach.geometry.get_z_min()
else:
z_min1 = reach1.geometry.get_z_min()
z_min2 = reach2.geometry.get_z_min()
zmin = list( zmin = list(
map( map(
lambda x, y: x - y, lambda p: p.get_ts_key(
z_min2, z_min2 timestamp, "zfd"
),
reach.profiles
) )
) )
else:
zmin = reach.geometry.get_z_min()
my_dict[dict_y["bed_elevation"]] = zmin my_dict[dict_y["bed_elevation"]] = zmin
# if envelop and reach.has_sediment(): # if envelop and reach.has_sediment():
if "discharge" in y: if "discharge" in y:
@ -1096,29 +1096,16 @@ class ResultsWindow(PamhyrWindow):
if self._current_results == 2: if self._current_results == 2:
reach1 = self._results[0].river.reach(self._reach) reach1 = self._results[0].river.reach(self._reach)
reach2 = self._results[1].river.reach(self._reach) reach2 = self._results[1].river.reach(self._reach)
reach3 = self._results[2].river.reach(self._reach)
profile1 = reach1.profile(self._profile) profile1 = reach1.profile(self._profile)
profile2 = reach2.profile(self._profile) profile2 = reach2.profile(self._profile)
profile3 = reach3.profile(self._profile)
q1 = profile1.get_key("Q")
z1 = profile1.get_key("Z")
v1 = profile1.get_key("V")
q2 = profile2.get_key("Q")
z2 = profile2.get_key("Z")
v2 = profile2.get_key("V")
if "bed_elevation" in y: if "bed_elevation" in y:
if self._current_results != 2: if reach.has_bedload():
z_min = [profile.geometry.z_min()] * len(self._timestamps) z_min = profile.get_key("zfd")
else: else:
z_min1 = profile1.geometry.z_min() z_min = [profile.geometry.z_min()] * len(self._timestamps)
z_min2 = profile2.geometry.z_min()
z_min = list(
map(
lambda ts: z_min1 - z_min2,
self._timestamps
)
)
my_dict[dict_y["bed_elevation"]] = z_min my_dict[dict_y["bed_elevation"]] = z_min
if "discharge" in y: if "discharge" in y:
my_dict[dict_y["discharge"]] = q my_dict[dict_y["discharge"]] = q