mg-pso-gui 0.1.112__py3-none-any.whl → 0.1.113__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mg_pso_gui-0.1.112.dist-info → mg_pso_gui-0.1.113.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.1.112.dist-info → mg_pso_gui-0.1.113.dist-info}/RECORD +7 -6
- mgpsogui/gui/HomePage.py +19 -3
- mgpsogui/util/helpers.py +22 -0
- {mg_pso_gui-0.1.112.dist-info → mg_pso_gui-0.1.113.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.1.112.dist-info → mg_pso_gui-0.1.113.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.1.112.dist-info → mg_pso_gui-0.1.113.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
mgpsogui/__init__.py,sha256=q7AfBjeJABnFtbsZnsObpUwaXKPDVYtz46G6MKXLF74,42
|
|
2
2
|
mgpsogui/mgpsogui.py,sha256=NIZmyNcbwC8EgSwf1ubdMUSJscrIEgoD4jLYziqHQ-k,148
|
|
3
3
|
mgpsogui/start.yaml,sha256=ZjCVLb-MLqAxrGRm9kA7_SDpa-45EuKIELNQ2QqCAiU,4713
|
|
4
|
-
mgpsogui/gui/HomePage.py,sha256=
|
|
4
|
+
mgpsogui/gui/HomePage.py,sha256=ckJvKDkUhWrfV6OPSaUgmzlqxdZJYOb5GAqNrFjxArQ,24605
|
|
5
5
|
mgpsogui/gui/OptionManager.py,sha256=H5ofd7PA5f6dVfSghUhKdPiqLHNE0IVpPPzf93k7JD4,12527
|
|
6
6
|
mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
mgpsogui/gui/PlatformTab/PlatformTab.py,sha256=KyIoHlMKD9nfQqHeGJwRDA4RCoe4UykjB2l6xMTKK_M,10486
|
|
@@ -36,6 +36,7 @@ mgpsogui/util/GraphGenerator.py,sha256=HhUsFUFhCv3wTYV8CTqU0wo56Ph9c1DocPj25AVIA
|
|
|
36
36
|
mgpsogui/util/PSORunner.py,sha256=Do3-OUH7iZGL6aoCcwsM-6lxof8ERwyKA-_g8rDr_DM,3942
|
|
37
37
|
mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
38
|
mgpsogui/util/debug.py,sha256=36oZ3wf3_zGQbdZLGwHJ1Kk8QArl9pjNqkIaz6IPt74,19742
|
|
39
|
+
mgpsogui/util/helpers.py,sha256=fCfVDaGholx16FVVqf2BhWs9KCevI7aFIve1w2W68EQ,769
|
|
39
40
|
mgpsogui/util/CTkToolTip/__init__.py,sha256=G1jxV55hGtGgwyC1sR-uUUdasDdh0XZgcI-aILgGYA0,225
|
|
40
41
|
mgpsogui/util/CTkToolTip/ctk_tooltip.py,sha256=SZMovpQIGvdpDRbqCKl9SHs92DrFCO2MOYL2ifolvOE,6329
|
|
41
42
|
mgpsogui/util/recosu/__init__.py,sha256=T7_iigIlowGbPOHLO3hwihjw2kbwIg6olOMhFhNiL38,236
|
|
@@ -47,8 +48,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
|
47
48
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
|
48
49
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
|
49
50
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
|
50
|
-
mg_pso_gui-0.1.
|
|
51
|
-
mg_pso_gui-0.1.
|
|
52
|
-
mg_pso_gui-0.1.
|
|
53
|
-
mg_pso_gui-0.1.
|
|
54
|
-
mg_pso_gui-0.1.
|
|
51
|
+
mg_pso_gui-0.1.113.dist-info/METADATA,sha256=vXvLYdDq78LaCnarZZuiKcjFd34R9pETcCmfVc25fbw,9459
|
|
52
|
+
mg_pso_gui-0.1.113.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
53
|
+
mg_pso_gui-0.1.113.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
|
54
|
+
mg_pso_gui-0.1.113.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
|
55
|
+
mg_pso_gui-0.1.113.dist-info/RECORD,,
|
mgpsogui/gui/HomePage.py
CHANGED
|
@@ -31,6 +31,7 @@ from queue import Empty
|
|
|
31
31
|
from ..util import PSORunner
|
|
32
32
|
from ..util import GraphGenerator
|
|
33
33
|
from ..util.CTkToolTip import CTkToolTip as ctt
|
|
34
|
+
from ..util import helpers as hp
|
|
34
35
|
|
|
35
36
|
import subprocess
|
|
36
37
|
import plotly.express as px
|
|
@@ -535,6 +536,24 @@ class App(customtkinter.CTk):
|
|
|
535
536
|
trace = results_queue.get_nowait()
|
|
536
537
|
|
|
537
538
|
print("TRACE " + str(trace), flush=True)
|
|
539
|
+
|
|
540
|
+
final_results = hp.extract_final_round_values(trace)
|
|
541
|
+
print("Final results: " + str(final_results), flush=True)
|
|
542
|
+
|
|
543
|
+
all_steps = self.option_manager.get_steps()
|
|
544
|
+
data = final_results["data"]
|
|
545
|
+
index = 0
|
|
546
|
+
for step in data:
|
|
547
|
+
for param in step.keys():
|
|
548
|
+
value = step[param]
|
|
549
|
+
target_step = all_steps[index]
|
|
550
|
+
for target_param in target_step['param']:
|
|
551
|
+
if target_param['name'] == param:
|
|
552
|
+
target_param['optimal_value'].set(value)
|
|
553
|
+
index += 1
|
|
554
|
+
print("Applied optimal values")
|
|
555
|
+
|
|
556
|
+
|
|
538
557
|
except Empty:
|
|
539
558
|
break
|
|
540
559
|
except Exception as e:
|
|
@@ -650,9 +669,6 @@ class App(customtkinter.CTk):
|
|
|
650
669
|
self.progress_message_right.configure(text="")
|
|
651
670
|
self.textbox.insert("0.0", "\nCalibration finished!\n")
|
|
652
671
|
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
672
|
def start():
|
|
657
673
|
app = App()
|
|
658
674
|
app.mainloop()
|
mgpsogui/util/helpers.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
def extract_final_round_values(data):
|
|
2
|
+
max_rounds = data['max_rounds'] + 1
|
|
3
|
+
steps = data['n_steps'] + 1
|
|
4
|
+
|
|
5
|
+
final_value = {}
|
|
6
|
+
|
|
7
|
+
for round in range(max_rounds):
|
|
8
|
+
for step in range(steps):
|
|
9
|
+
key = f"r{round}s{step}"
|
|
10
|
+
if key in data:
|
|
11
|
+
obj = data[key]
|
|
12
|
+
round_steps = []
|
|
13
|
+
for o_step in obj['steps']:
|
|
14
|
+
step_obj = {}
|
|
15
|
+
for param in o_step['param']:
|
|
16
|
+
if 'name' in param and 'value' in param:
|
|
17
|
+
step_obj[param['name']] = param['value']
|
|
18
|
+
|
|
19
|
+
round_steps.append(step_obj)
|
|
20
|
+
final_value["data"] = round_steps
|
|
21
|
+
final_value["index"] = key
|
|
22
|
+
return final_value
|
|
File without changes
|
|
File without changes
|
|
File without changes
|