debug water limits

adists_release
Theophile Terraz 2024-08-05 11:10:43 +02:00
parent d32baa61a1
commit a698d46144
1 changed files with 9 additions and 9 deletions

View File

@ -565,18 +565,18 @@ class ProfileXYZ(Profile, SQLSubModel):
start.append(y)
end = []
for i in reversed(range(self.number_points-1)):
if zz[i-1] <= z and zz[i] > z:
y = np.interp(
z,
[zz[i-1], zz[i]],
[station[i-1], station[i]]
)
end.append(y)
if points[-1].z <= z:
end.append(station[-1])
for i in reversed(range(self.number_points-1)):
if zz[i] <= z and zz[i+1] > z:
y = np.interp(
z,
[zz[i], zz[i+1]],
[station[i], station[i+1]]
)
end.append(y)
if len(start) != len(end):
logger.error(f"ERROR in get_all_water_limits_ac")
return [], []