mg-pso-gui 0.1.43__py3-none-any.whl → 0.1.45__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.43.dist-info → mg_pso_gui-0.1.45.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.1.43.dist-info → mg_pso_gui-0.1.45.dist-info}/RECORD +7 -7
- mgpsogui/gui/VisualizeTab/SideBar.py +8 -8
- mgpsogui/util/GraphGenerator.py +65 -1
- {mg_pso_gui-0.1.43.dist-info → mg_pso_gui-0.1.45.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.1.43.dist-info → mg_pso_gui-0.1.45.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.1.43.dist-info → mg_pso_gui-0.1.45.dist-info}/top_level.txt +0 -0
|
@@ -17,7 +17,7 @@ mgpsogui/gui/SetupTab/SetupTab.py,sha256=Doy_6xLq1BjhLTFHRQm7CAbpQzUnNJW4KkBcdfr
|
|
|
17
17
|
mgpsogui/gui/SetupTab/StaticParameterView.py,sha256=iEG-UpBBlAJabZo3MG768oLqOROjUPc23tKOSd47IUc,2739
|
|
18
18
|
mgpsogui/gui/SetupTab/StepView.py,sha256=oG5Q-3xpTRP1f_PbNvohKctrbpD63zLAJzHD00bN44k,5531
|
|
19
19
|
mgpsogui/gui/SetupTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
-
mgpsogui/gui/VisualizeTab/SideBar.py,sha256=
|
|
20
|
+
mgpsogui/gui/VisualizeTab/SideBar.py,sha256=OhKGjlGzwGr4QX8ig5-D_QbcLbK3dOL9fy0md14Y-j8,6025
|
|
21
21
|
mgpsogui/gui/VisualizeTab/VisualizeTab.py,sha256=zYu5NDEYkNa76fx_JU8iZ8hMTzdDNcP77cVZwR7Qhkw,3462
|
|
22
22
|
mgpsogui/gui/VisualizeTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
mgpsogui/gui/images/IGOW 4 Logo.png,sha256=JixNXz5gOEj898VF-_PHthAlGU-6W-y9ucb4EVNPtjs,433752
|
|
@@ -31,7 +31,7 @@ mgpsogui/gui/images/stop.png,sha256=JPuxXQerCGpLikcp7cAj3iLCOjULMYYZ2sZe0lArh68,
|
|
|
31
31
|
mgpsogui/gui/images/test.png,sha256=MUnVpRK-isxhEHzx4Q6Yh0M6FRZD1qvgCHH2XmiSBbk,3642
|
|
32
32
|
mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ,2958
|
|
33
33
|
mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
|
|
34
|
-
mgpsogui/util/GraphGenerator.py,sha256=
|
|
34
|
+
mgpsogui/util/GraphGenerator.py,sha256=X-u8v29JQLCPbDlXgnXhfDVg5kdULfDC2mNpW3fKshM,11692
|
|
35
35
|
mgpsogui/util/PSORunner.py,sha256=wfkrZLysgSS_5BrdFEm8U-0S7DHYpxmHPau_Ec5W8ak,4510
|
|
36
36
|
mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
37
|
mgpsogui/util/CTkToolTip/__init__.py,sha256=G1jxV55hGtGgwyC1sR-uUUdasDdh0XZgcI-aILgGYA0,225
|
|
@@ -45,8 +45,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
|
45
45
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
|
46
46
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
|
47
47
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
|
48
|
-
mg_pso_gui-0.1.
|
|
49
|
-
mg_pso_gui-0.1.
|
|
50
|
-
mg_pso_gui-0.1.
|
|
51
|
-
mg_pso_gui-0.1.
|
|
52
|
-
mg_pso_gui-0.1.
|
|
48
|
+
mg_pso_gui-0.1.45.dist-info/METADATA,sha256=qbnnSKata-KCj7CpheBCFQWviSyG2BaXjS2LlCqMHZU,9458
|
|
49
|
+
mg_pso_gui-0.1.45.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
|
|
50
|
+
mg_pso_gui-0.1.45.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
|
51
|
+
mg_pso_gui-0.1.45.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
|
52
|
+
mg_pso_gui-0.1.45.dist-info/RECORD,,
|
|
@@ -78,10 +78,10 @@ class SideBar(CTkScrollableFrame):
|
|
|
78
78
|
self.home_page.selected_csv.set(name_list[0])
|
|
79
79
|
|
|
80
80
|
file_label = CTkLabel(self.containerFrame, text="CSV File:")
|
|
81
|
-
file_label.grid(row=0, column=0, padx=(20, 20), pady=(20,
|
|
81
|
+
file_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
|
82
82
|
|
|
83
83
|
self.home_page.csv_file_selector = CTkOptionMenu(self.containerFrame, values=name_list, variable=self.home_page.selected_csv, command=self.home_page.update_graph)
|
|
84
|
-
self.home_page.csv_file_selector.grid(row=1, column=0, padx=(20, 20), pady=(
|
|
84
|
+
self.home_page.csv_file_selector.grid(row=1, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
|
85
85
|
|
|
86
86
|
selected_file = self.home_page.selected_csv.get()
|
|
87
87
|
if (selected_file in path_map and selected_file != self.home_page.open_file):
|
|
@@ -93,28 +93,28 @@ class SideBar(CTkScrollableFrame):
|
|
|
93
93
|
columns = self.home_page.csv_data.columns
|
|
94
94
|
|
|
95
95
|
x_axis_label = CTkLabel(self.containerFrame, text="X Axis:")
|
|
96
|
-
x_axis_label.grid(row=2, column=0, padx=(20, 20), pady=(
|
|
96
|
+
x_axis_label.grid(row=2, column=0, padx=(20, 20), pady=(40, 5), sticky="w")
|
|
97
97
|
|
|
98
98
|
self.home_page.csv_x_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.home_page.selected_x, command=self.home_page.update_graph)
|
|
99
|
-
self.home_page.csv_x_selector.grid(row=3, column=0, padx=(20, 20), pady=(
|
|
99
|
+
self.home_page.csv_x_selector.grid(row=3, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
|
100
100
|
|
|
101
101
|
if (self.home_page.csv_x_selector.get() not in columns):
|
|
102
102
|
self.home_page.csv_x_selector.set(columns[1])
|
|
103
103
|
|
|
104
104
|
y1_axis_label = CTkLabel(self.containerFrame, text="Y Axis:")
|
|
105
|
-
y1_axis_label.grid(row=4, column=0, padx=(20, 20), pady=(20,
|
|
105
|
+
y1_axis_label.grid(row=4, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
|
106
106
|
|
|
107
107
|
self.home_page.csv_y1_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.home_page.selected_y1, command=self.home_page.update_graph)
|
|
108
|
-
self.home_page.csv_y1_selector.grid(row=5, column=0, padx=(20, 20), pady=(
|
|
108
|
+
self.home_page.csv_y1_selector.grid(row=5, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
|
109
109
|
|
|
110
110
|
if (self.home_page.csv_y1_selector.get() not in columns):
|
|
111
111
|
self.home_page.csv_y1_selector.set(columns[2])
|
|
112
112
|
|
|
113
113
|
y2_axis_label = CTkLabel(self.containerFrame, text="Secondary Y Axis:")
|
|
114
|
-
y2_axis_label.grid(row=6, column=0, padx=(20, 20), pady=(20,
|
|
114
|
+
y2_axis_label.grid(row=6, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
|
115
115
|
|
|
116
116
|
self.home_page.csv_y2_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.home_page.selected_y2, command=self.home_page.update_graph)
|
|
117
|
-
self.home_page.csv_y2_selector.grid(row=7, column=0, padx=(20, 20), pady=(
|
|
117
|
+
self.home_page.csv_y2_selector.grid(row=7, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
|
118
118
|
|
|
119
119
|
if (self.home_page.csv_y2_selector.get() not in columns):
|
|
120
120
|
self.home_page.csv_y2_selector.set(columns[3])
|
mgpsogui/util/GraphGenerator.py
CHANGED
|
@@ -26,6 +26,9 @@ def generate_graphs(HomePage):
|
|
|
26
26
|
elif (selected_graph == "Calibrated Parameters"):
|
|
27
27
|
HomePage.selected_graph_name = "calibrated_params_by_round"
|
|
28
28
|
calibrated_params_by_round(HomePage.running_config['steps'], HomePage.calibration_data, HomePage.option_manager)
|
|
29
|
+
elif (selected_graph == "Custom CSV"):
|
|
30
|
+
HomePage.selected_graph_name = "custom_csv"
|
|
31
|
+
custom_csv(HomePage, HomePage.option_manager)
|
|
29
32
|
|
|
30
33
|
image_path = os.path.join(folder, HomePage.selected_graph_name + ".png")
|
|
31
34
|
|
|
@@ -272,4 +275,65 @@ def calibrated_params_by_round(config, list_of_objs, option_manager):
|
|
|
272
275
|
with open(os.path.join(folder, "calibrated_params_by_round.html"), "w") as f:
|
|
273
276
|
f.write(html)
|
|
274
277
|
|
|
275
|
-
return fig
|
|
278
|
+
return fig
|
|
279
|
+
|
|
280
|
+
def custom_csv(homepage, option_manager):
|
|
281
|
+
fig = go.Figure()
|
|
282
|
+
|
|
283
|
+
data = homepage.csv_data
|
|
284
|
+
|
|
285
|
+
x = homepage.csv_x_selector.get()
|
|
286
|
+
val = homepage.csv_y1_selector.get()
|
|
287
|
+
val2 = homepage.csv_y2_selector.get()
|
|
288
|
+
|
|
289
|
+
xx = None
|
|
290
|
+
if x == "time":
|
|
291
|
+
xx = pd.to_datetime(data["time"], format='%Y-%m-%d', errors='coerce').iloc[2:]
|
|
292
|
+
else:
|
|
293
|
+
xx = pd.to_numeric(data[x], errors="coerce").iloc[2:]
|
|
294
|
+
|
|
295
|
+
yy = pd.to_numeric(data[val], errors="coerce").iloc[2:]
|
|
296
|
+
yy2 = pd.to_numeric(data[val2], errors="coerce").iloc[2:]
|
|
297
|
+
|
|
298
|
+
fig.add_trace(go.Scatter(x=xx, y=yy, name=val))
|
|
299
|
+
fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2'))
|
|
300
|
+
|
|
301
|
+
fig.update_layout(
|
|
302
|
+
title="",
|
|
303
|
+
xaxis_title=x,
|
|
304
|
+
yaxis_title=val,
|
|
305
|
+
font=dict(color='white'),
|
|
306
|
+
paper_bgcolor='rgba(42, 42, 42, 0)',
|
|
307
|
+
plot_bgcolor='rgb(62, 62, 62)',
|
|
308
|
+
xaxis=dict(
|
|
309
|
+
gridcolor='rgb(72, 72, 72)',
|
|
310
|
+
gridwidth=1
|
|
311
|
+
),
|
|
312
|
+
yaxis=dict(
|
|
313
|
+
title=val,
|
|
314
|
+
autorange=True,
|
|
315
|
+
gridcolor='rgb(72, 72, 72)',
|
|
316
|
+
gridwidth=0.1
|
|
317
|
+
),
|
|
318
|
+
yaxis2=dict(
|
|
319
|
+
title=val2,
|
|
320
|
+
overlaying='y',
|
|
321
|
+
side='right'
|
|
322
|
+
)
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
info = option_manager.get_project_data()
|
|
326
|
+
folder = os.path.join(info['path'], info['name'])
|
|
327
|
+
|
|
328
|
+
if not os.path.exists(folder):
|
|
329
|
+
os.makedirs(folder)
|
|
330
|
+
|
|
331
|
+
fig.write_image(os.path.join(folder, "custom_csv.png"), width=1280, height=720)
|
|
332
|
+
fig.write_html(os.path.join(folder, "custom_csv.html"), include_plotlyjs='cdn', auto_open=False)
|
|
333
|
+
with open(os.path.join(folder, "custom_csv.html"), "r") as f:
|
|
334
|
+
html = f.read()
|
|
335
|
+
html = html.replace("<body>", "<body bgcolor='#2a2a2a'>")
|
|
336
|
+
with open(os.path.join(folder, "custom_csv.html"), "w") as f:
|
|
337
|
+
f.write(html)
|
|
338
|
+
|
|
339
|
+
return fig
|
|
File without changes
|
|
File without changes
|
|
File without changes
|