This commit is contained in:
Theophile Terraz committed 2025-02-03 10:09:45 +01:00
1 parent e44bbd5a3c
commit 4d08f3c271
11 files changed
+46 -64

No files matched your search

+9 -27
View File
@@ -82,7 +82,7 @@ from View.RunSolver.Window import (
SolverLogWindow,
CompareSolversWindow
)
from View.Results.Window import ResultsWindow # , CompareResultsWindow
from View.Results.Window import ResultsWindow
from View.RunSolver.WindowAdisTS import (
SelectSolverWindowAdisTS,
SolverLogWindowAdisTS
@@ -1584,22 +1584,11 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
# Windows already opened
if self.sub_window_exists(
ResultsWindow,
data=[
self._study,
None] + # No config
[r._solver for r in results] +
[r._repertory for r in results] +
[r._name for r in results]
data=[self._study, None] +
[r._solver for r in results] +
[r._repertory for r in results] +
[r._name for r in results]
):
#w = self.get_sub_window(
#ResultsWindow,
#data=[
#self._study,
#None, # No config
#results,
#parent=self
#])
#w.add_result(result[1], run.solver2)
return
res = ResultsWindow(
@@ -1609,15 +1598,6 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
)
res.show()
#res = CompareResultsWindow(
#study=self._study,
#solver=results._solver,
#results=results,
#parent=self
#)
#res.show()
def diff_results(self, solver1, solver2):
if solver1 is None:
# TODO message
@@ -1667,7 +1647,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
result3.set("nb_profile", result1.get("nb_profile"))
result4.set("nb_profile", result1.get("nb_profile"))
result5.set("nb_profile", result1.get("nb_profile"))
ts = list(result1.get("timestamps").intersection(result2.get("timestamps")))
ts = list(result1.get("timestamps").intersection(
result2.get("timestamps")))
result3.set("timestamps", ts)
result4.set("timestamps", ts)
result5.set("timestamps", ts)
@@ -1685,7 +1666,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
reach3 = result3.river.reach(r)
reach4 = result4.river.reach(r)
reach5 = result5.river.reach(r)
for p, (profile1, profile2) in enumerate(zip(reach1.profiles, reach2.profiles)):
for p, (profile1, profile2) in enumerate(zip(
reach1.profiles, reach2.profiles)):
for key in ["Z", "Q", "V"]:
d1 = profile1.get_ts_key(timestamp, key)
d2 = profile2.get_ts_key(timestamp, key)