Commit a698d461 authored by Theophile Terraz's avatar Theophile Terraz
Browse files

debug water limits

No related merge requests found
Pipeline #57145 passed with stages
in 56 seconds
Showing with 6 additions and 6 deletions
+6 -6
......@@ -565,18 +565,18 @@ class ProfileXYZ(Profile, SQLSubModel):
start.append(y)
end = []
if points[-1].z <= z:
end.append(station[-1])
for i in reversed(range(self.number_points-1)):
if zz[i-1] <= z and zz[i] > z:
if zz[i] <= z and zz[i+1] > z:
y = np.interp(
z,
[zz[i-1], zz[i]],
[station[i-1], station[i]]
[zz[i], zz[i+1]],
[station[i], station[i+1]]
)
end.append(y)
if points[-1].z <= z:
end.append(station[-1])
if len(start) != len(end):
logger.error(f"ERROR in get_all_water_limits_ac")
return [], []
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment