mg-pso-gui 0.2.94__py3-none-any.whl → 0.2.96__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.2.94.dist-info → mg_pso_gui-0.2.96.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.2.94.dist-info → mg_pso_gui-0.2.96.dist-info}/RECORD +8 -8
- mgpsogui/gui/HomePage.py +16 -1
- mgpsogui/gui/SetupTab/FunctionsList.py +24 -21
- mgpsogui/util/PSORunner.py +24 -2
- {mg_pso_gui-0.2.94.dist-info → mg_pso_gui-0.2.96.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.2.94.dist-info → mg_pso_gui-0.2.96.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.2.94.dist-info → mg_pso_gui-0.2.96.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=035xS1y_Z4u9qpohOWvTUAmhcq-8RMXGR5KYCD5wFX8,23610
|
5
5
|
mgpsogui/gui/OptionManager.py,sha256=OczLGSmS9MfE2HgpPNw0OFbl2AdNQ_70pxQUKIDWAnU,21707
|
6
6
|
mgpsogui/gui/OptionManager_backup.py,sha256=TCWfPnHL2foN5id47jsi267lamRG6yGU6y_M29eOOJk,18530
|
7
7
|
mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -17,7 +17,7 @@ mgpsogui/gui/SetupTab/BoundsEditorWindow.py,sha256=U64oaiDIOaimjbqKMz5rQNq2o1SrQ
|
|
17
17
|
mgpsogui/gui/SetupTab/BoundsList.py,sha256=x1D1A0S0EAeKwuA5LFzcqslpws4O1mFUR6bKnuPTDMA,15221
|
18
18
|
mgpsogui/gui/SetupTab/CustomFunctionEditorWindow.py,sha256=yx0dHSNa7fGy99Q6qFcI6j9r8p0DlV3iOBgyPMGd8pM,2884
|
19
19
|
mgpsogui/gui/SetupTab/CustomFunctionMetrics.py,sha256=vOJpElbTgz043m6JYwe9xz_2MBHg985S6KdbJkJERW4,5923
|
20
|
-
mgpsogui/gui/SetupTab/FunctionsList.py,sha256=
|
20
|
+
mgpsogui/gui/SetupTab/FunctionsList.py,sha256=dhFP_kP8yFrDWNZAo3CMCOMThdcXFSFnj8fj_eJX2h0,6955
|
21
21
|
mgpsogui/gui/SetupTab/ListEditor.py,sha256=nin7Pl8z7d_yfKoAxM-yVS34uhj-LnprJ2mNRSB7Z0A,3197
|
22
22
|
mgpsogui/gui/SetupTab/ListParametersView.py,sha256=mkGaC5cXhEOy5oD0MbTyK9z7VGZp019oK2Y8Ay-n05Q,7460
|
23
23
|
mgpsogui/gui/SetupTab/OverrideParameterMetrics.py,sha256=rBfaSitYDOajbHvyi2TfoXAHYlz1cCt028UVpIJ_Dc0,3369
|
@@ -48,7 +48,7 @@ mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ
|
|
48
48
|
mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
|
49
49
|
mgpsogui/gui/messages/welcome.txt,sha256=KzN_Zk3vaZeXx-G2KJmd5I7Q1_Shw62E9Fx8U4rQuUQ,5674
|
50
50
|
mgpsogui/util/GraphGenerator.py,sha256=LHHDCvBuJQ0RYQm0azi5tC-etrZ1KLQh-tkahVurPSI,31990
|
51
|
-
mgpsogui/util/PSORunner.py,sha256=
|
51
|
+
mgpsogui/util/PSORunner.py,sha256=6RaIlXHcCloGnAGxS7ukxKgR6Yg831sDfOm4-0ai-gM,23456
|
52
52
|
mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
53
|
mgpsogui/util/debug.py,sha256=Swzny9_1S-CCONWGssj9iDoSpbwu5Vr4f95g_9L8bec,19759
|
54
54
|
mgpsogui/util/helpers.py,sha256=Ht2rge_4pGO7halz6KoLsL2eukB0k2tlkx68lBBmBA8,2669
|
@@ -73,8 +73,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
73
73
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
74
74
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
75
75
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
76
|
-
mg_pso_gui-0.2.
|
77
|
-
mg_pso_gui-0.2.
|
78
|
-
mg_pso_gui-0.2.
|
79
|
-
mg_pso_gui-0.2.
|
80
|
-
mg_pso_gui-0.2.
|
76
|
+
mg_pso_gui-0.2.96.dist-info/METADATA,sha256=3tWAk4BIG7JI_BYM7lmCbC2o_VGVJtOMKqCzwJMSKD0,9455
|
77
|
+
mg_pso_gui-0.2.96.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
78
|
+
mg_pso_gui-0.2.96.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
79
|
+
mg_pso_gui-0.2.96.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
80
|
+
mg_pso_gui-0.2.96.dist-info/RECORD,,
|
mgpsogui/gui/HomePage.py
CHANGED
@@ -153,7 +153,10 @@ class App(customtkinter.CTk):
|
|
153
153
|
command=self.change_scaling_event)
|
154
154
|
self.scaling_optionemenu.grid(row=0, column=8, padx=(5, 20), pady=header_padding_y)
|
155
155
|
self.scaling_optionemenu.set("100%")
|
156
|
-
|
156
|
+
|
157
|
+
self.help_button = customtkinter.CTkButton(self.sidebar_frame, text="Help", width=20, command=self.open_help)
|
158
|
+
self.help_button.grid(row=0, column=9, padx=header_padding_x, pady=header_padding_y)
|
159
|
+
|
157
160
|
expand_image = customtkinter.CTkImage(Image.open(os.path.join("./images", "expand.png")), size=(20, 20))
|
158
161
|
#self.new_window = customtkinter.CTkButton(self.sidebar_frame, text=None, width=30, image=expand_image, command=self.open_new_window)
|
159
162
|
#ctt(self.new_window, delay=0.1, alpha=0.95, message="Open New Window")
|
@@ -211,7 +214,10 @@ class App(customtkinter.CTk):
|
|
211
214
|
self.after(1000, self.running_loop)
|
212
215
|
|
213
216
|
# Read the file ./messages/welcome.txt and load it as a string and put it into the message
|
217
|
+
|
218
|
+
self.open_help()
|
214
219
|
|
220
|
+
def open_help(self):
|
215
221
|
with open(os.path.join("./messages", "welcome.txt"), "r") as f:
|
216
222
|
message = f.read()
|
217
223
|
NW(title="Welcome!", message=message)
|
@@ -484,6 +490,15 @@ class App(customtkinter.CTk):
|
|
484
490
|
if not os.path.exists(folder):
|
485
491
|
os.makedirs(folder)
|
486
492
|
|
493
|
+
# Check if crash.txt exists in the folder
|
494
|
+
if (os.path.exists(os.path.join(folder, 'crash.txt'))):
|
495
|
+
with open(os.path.join(folder, 'crash.txt'), "r") as f:
|
496
|
+
message = f.read()
|
497
|
+
NW(title="Error Occurred!", message=message)
|
498
|
+
# Rename crash.txt to crash_read.txt
|
499
|
+
os.rename(os.path.join(folder, 'crash.txt'), os.path.join(folder, 'crash_read.txt'))
|
500
|
+
self.stop()
|
501
|
+
|
487
502
|
while True:
|
488
503
|
try:
|
489
504
|
stdout_line = stdout_queue.get_nowait()
|
@@ -43,6 +43,8 @@ class FunctionsList(CTkFrame):
|
|
43
43
|
self.containerFrame.grid(row=0, column=0, padx=(5, 5), pady=(5, 5), sticky="nsew")
|
44
44
|
self.containerFrame.grid_columnconfigure((0, 1), weight=1)
|
45
45
|
|
46
|
+
mode = self.option_manager.get_mode()
|
47
|
+
|
46
48
|
row = 1
|
47
49
|
|
48
50
|
funcs = self.option_manager.get_steps()[self.step_index]["objective_functions"]
|
@@ -56,23 +58,23 @@ class FunctionsList(CTkFrame):
|
|
56
58
|
|
57
59
|
row += 1
|
58
60
|
|
59
|
-
columns = ["absdiff",
|
60
|
-
"absdifflog",
|
61
|
-
"ave",
|
62
|
-
"bias",
|
63
|
-
"fhf",
|
64
|
-
"ioa",
|
65
|
-
"ioa2",
|
61
|
+
columns = ["absdiff (not supported)",
|
62
|
+
"absdifflog (not supported)",
|
63
|
+
"ave (not supported)",
|
64
|
+
"bias (not supported)",
|
65
|
+
"fhf (not supported)",
|
66
|
+
"ioa (not supported)",
|
67
|
+
"ioa2 (not supported)",
|
66
68
|
"kge",
|
67
|
-
"kge09",
|
68
|
-
"mns",
|
69
|
-
"mse",
|
69
|
+
"kge09 (not supported)",
|
70
|
+
"mns (not supported)",
|
71
|
+
"mse (not supported)",
|
70
72
|
"ns",
|
71
|
-
"ns2log",
|
73
|
+
"ns2log (not supported)",
|
72
74
|
"nslog1p",
|
73
|
-
"nslog2",
|
75
|
+
"nslog2 (not supported)",
|
74
76
|
"pbias",
|
75
|
-
"pmcc",
|
77
|
+
"pmcc (not supported)",
|
76
78
|
"rmse",
|
77
79
|
"trmse",
|
78
80
|
"custom"]
|
@@ -105,14 +107,15 @@ class FunctionsList(CTkFrame):
|
|
105
107
|
|
106
108
|
row += 1
|
107
109
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
110
|
+
if mode != "Sensitive Analysis":
|
111
|
+
CTkLabel(self.containerFrame, text="Observed and Simulated Data:").grid(row=row, column=0, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="nsew")
|
112
|
+
|
113
|
+
row += 1
|
114
|
+
|
115
|
+
CTkEntry(self.containerFrame, textvariable=func["data_observed"]).grid(row=row, column=0, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="nsew")
|
116
|
+
row += 1
|
117
|
+
CTkEntry(self.containerFrame, textvariable=func["data_simulated"]).grid(row=row, column=0, columnspan=3, padx=(5, 5), pady=(5, 5), sticky="nsew")
|
118
|
+
row += 1
|
116
119
|
|
117
120
|
if self.edit_mode:
|
118
121
|
remove_func = lambda index=index: (self.clear(), self.option_manager.remove_function(self.step_index, index), self.render())
|
mgpsogui/util/PSORunner.py
CHANGED
@@ -14,6 +14,19 @@ import shutil
|
|
14
14
|
import json
|
15
15
|
import numpy as np
|
16
16
|
|
17
|
+
ZERO_BEST = [
|
18
|
+
'rmse',
|
19
|
+
'trmse',
|
20
|
+
'pbias'
|
21
|
+
]
|
22
|
+
|
23
|
+
POSITIVE_BEST = [
|
24
|
+
'kge',
|
25
|
+
'nslog',
|
26
|
+
'nslog1p',
|
27
|
+
'ns'
|
28
|
+
]
|
29
|
+
|
17
30
|
def enqueue_output(out, queue):
|
18
31
|
for line in iter(out.readline, b''):
|
19
32
|
queue.put(line)
|
@@ -378,6 +391,15 @@ def run_sensitivity_analysis(data, folder, results_queue):
|
|
378
391
|
for param in output_steps[0]['param']:
|
379
392
|
parameters.append(param['name'])
|
380
393
|
|
394
|
+
positive_best = []
|
395
|
+
zero_best = []
|
396
|
+
|
397
|
+
for obj in output_steps[0]['objfunc']:
|
398
|
+
if obj['of'] in POSITIVE_BEST:
|
399
|
+
positive_best.append(obj['of'])
|
400
|
+
elif obj['of'] in ZERO_BEST:
|
401
|
+
zero_best.append(obj['of'])
|
402
|
+
|
381
403
|
request_json = {
|
382
404
|
"metainfo": {
|
383
405
|
"service_url": None,
|
@@ -392,11 +414,11 @@ def run_sensitivity_analysis(data, folder, results_queue):
|
|
392
414
|
},
|
393
415
|
{
|
394
416
|
"name": "positiveBestMetrics",
|
395
|
-
"value":
|
417
|
+
"value": positive_best
|
396
418
|
},
|
397
419
|
{
|
398
420
|
"name": "zeroBestMetrics",
|
399
|
-
"value":
|
421
|
+
"value": zero_best
|
400
422
|
}
|
401
423
|
]
|
402
424
|
}
|
File without changes
|
File without changes
|
File without changes
|