mirror of https://gitlab.com/pamhyr/pamhyr2
Results: Custom plot: Use 'zfd' np table.
parent
be865102a8
commit
5327c29641
|
|
@ -91,12 +91,14 @@ class CustomPlot(PamhyrPlot):
|
|||
self.lines = {}
|
||||
|
||||
def draw_bottom_with_bedload(self, reach):
|
||||
results = self.data[self._current_res_id]
|
||||
table = results.get("table")["zfd"]
|
||||
ts = results.get_timestamp_id(self._current_timestamp)
|
||||
|
||||
rk = reach.geometry.get_rk()
|
||||
z = list(
|
||||
map(
|
||||
lambda p: p.get_ts_key(
|
||||
self._current_timestamp, "zfd"
|
||||
),
|
||||
lambda p: table[ts, p.global_index],
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
|
|
@ -106,7 +108,10 @@ class CustomPlot(PamhyrPlot):
|
|||
def get_ts_zmin(self, profile, res_id):
|
||||
results = self.data[res_id]
|
||||
reach = results.river.reach(self._current_reach)
|
||||
zfd = reach.profile(profile).get_key("zfd")
|
||||
|
||||
table = results.get("table")["zfd"]
|
||||
|
||||
zfd = table[:, reach.profile(profile).global_index]
|
||||
return zfd
|
||||
|
||||
def _draw_rk(self):
|
||||
|
|
@ -170,22 +175,14 @@ class CustomPlot(PamhyrPlot):
|
|||
)
|
||||
else:
|
||||
if reach.has_bedload():
|
||||
z_min1 = list(
|
||||
map(
|
||||
lambda p: p.get_ts_key(
|
||||
self._current_timestamp, "zfd"
|
||||
),
|
||||
reach1.profiles
|
||||
)
|
||||
)
|
||||
z_min2 = list(
|
||||
map(
|
||||
lambda p: p.get_ts_key(
|
||||
self._current_timestamp, "zfd"
|
||||
),
|
||||
reach2.profiles
|
||||
)
|
||||
)
|
||||
z_min1 = list(map(
|
||||
lambda p: table["zfd"][id_ts, p.global_index],
|
||||
reach1.profiles
|
||||
))
|
||||
z_min2 = list(map(
|
||||
lambda p: table["zfd"][id_ts, p.global_index],
|
||||
reach2.profiles
|
||||
))
|
||||
else:
|
||||
z_min1 = reach1.geometry.get_z_min()
|
||||
z_min2 = reach2.geometry.get_z_min()
|
||||
|
|
|
|||
Loading…
Reference in New Issue