mg-pso-gui 0.1.66__tar.gz → 0.1.67__tar.gz
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.66 → mg-pso-gui-0.1.67}/PKG-INFO +1 -1
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mg_pso_gui.egg-info/PKG-INFO +1 -1
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/VisualizeTab/SideBar.py +63 -14
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/GraphGenerator.py +20 -32
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/setup.py +1 -1
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mg_pso_gui.egg-info/SOURCES.txt +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mg_pso_gui.egg-info/dependency_links.txt +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mg_pso_gui.egg-info/entry_points.txt +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mg_pso_gui.egg-info/requires.txt +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mg_pso_gui.egg-info/top_level.txt +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/__init__.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/HomePage.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/OptionManager.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/PlatformTab/PlatformTab.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/PlatformTab/__init__.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/RunTab/RunTab.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/RunTab/__init__.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/SetupTab/BoundsEditorWindow.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/SetupTab/BoundsList.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/SetupTab/CalibrationParametersView.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/SetupTab/FunctionsList.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/SetupTab/ListParametersView.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/SetupTab/OptimalParameterView.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/SetupTab/SetupTab.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/SetupTab/StaticParameterView.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/SetupTab/StepView.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/SetupTab/__init__.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/VisualizeTab/VisualizeTab.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/VisualizeTab/__init__.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/__init__.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/images/IGOW 4 Logo.png +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/images/collapse.png +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/images/down.png +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/images/expand.png +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/images/play.png +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/images/refresh.png +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/images/refresh_hd.png +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/images/stop.png +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/images/test.png +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/images/trash.png +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/gui/images/up.png +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/mgpsogui.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/start.yaml +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/CTkToolTip/__init__.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/CTkToolTip/ctk_tooltip.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/PSORunner.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/__init__.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/recosu/__init__.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/recosu/pso/__init__.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/recosu/pso/csip_access.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/recosu/pso/pso.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/recosu/utils/__init__.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/recosu/utils/plot/__init__.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/recosu/utils/plot/cost_steps.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/recosu/utils/trace_writer.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/mgpsogui/util/recosu/utils/utils.py +0 -0
- {mg-pso-gui-0.1.66 → mg-pso-gui-0.1.67}/setup.cfg +0 -0
|
@@ -85,15 +85,12 @@ class SideBar(CTkScrollableFrame):
|
|
|
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):
|
|
88
|
-
self.home_page.csv_data =
|
|
89
|
-
if (self.home_page.csv_data.columns[0] != "@H"):
|
|
90
|
-
self.home_page.csv_data = pd.read_csv(path_map[selected_file], skiprows=9)
|
|
91
|
-
|
|
88
|
+
self.home_page.csv_data = self.load_csv(path_map[selected_file])
|
|
92
89
|
self.home_page.open_file = selected_file
|
|
93
90
|
|
|
94
91
|
if (self.home_page.csv_data is not None):
|
|
95
92
|
# Get all column names of CSV
|
|
96
|
-
columns = self.home_page.csv_data.columns
|
|
93
|
+
columns = self.home_page.csv_data["data"].columns
|
|
97
94
|
|
|
98
95
|
x_axis_label = CTkLabel(self.containerFrame, text="X Axis:")
|
|
99
96
|
x_axis_label.grid(row=2, column=0, padx=(20, 20), pady=(40, 5), sticky="w")
|
|
@@ -157,22 +154,18 @@ class SideBar(CTkScrollableFrame):
|
|
|
157
154
|
|
|
158
155
|
selected_file = self.home_page.selected_csv.get()
|
|
159
156
|
if (selected_file in path_map and selected_file != self.home_page.open_file):
|
|
160
|
-
self.home_page.csv_data =
|
|
161
|
-
if (self.home_page.csv_data.columns[0] != "@H"):
|
|
162
|
-
self.home_page.csv_data = pd.read_csv(path_map[selected_file], skiprows=9)
|
|
157
|
+
self.home_page.csv_data = self.load_csv(path_map[selected_file])
|
|
163
158
|
self.home_page.open_file = selected_file
|
|
164
159
|
|
|
165
160
|
selected_file2 = self.home_page.selected_csv2.get()
|
|
166
161
|
if (selected_file2 in path_map and selected_file2 != self.home_page.open_file2):
|
|
167
|
-
self.home_page.csv_data2 =
|
|
168
|
-
if (self.home_page.csv_data2.columns[0] != "@H"):
|
|
169
|
-
self.home_page.csv_data2 = pd.read_csv(path_map[selected_file2], skiprows=9)
|
|
162
|
+
self.home_page.csv_data2 = self.load_csv(path_map[selected_file])
|
|
170
163
|
self.home_page.open_file2 = selected_file2
|
|
171
164
|
|
|
172
165
|
if (self.home_page.csv_data is not None and self.home_page.csv_data2 is not None):
|
|
173
166
|
# Get all column names of CSV
|
|
174
|
-
columns = self.home_page.csv_data.columns
|
|
175
|
-
columns2 = self.home_page.csv_data2.columns
|
|
167
|
+
columns = self.home_page.csv_data["data"].columns
|
|
168
|
+
columns2 = self.home_page.csv_data2["data"].columns
|
|
176
169
|
|
|
177
170
|
x_axis_label = CTkLabel(self.containerFrame, text="X Axis:")
|
|
178
171
|
x_axis_label.grid(row=3, column=0, padx=(20, 20), pady=(40, 5), sticky="w")
|
|
@@ -199,4 +192,60 @@ class SideBar(CTkScrollableFrame):
|
|
|
199
192
|
self.home_page.csv_y2_selector.grid(row=8, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
|
200
193
|
|
|
201
194
|
if (self.home_page.csv_y2_selector.get() not in columns2):
|
|
202
|
-
self.home_page.csv_y2_selector.set(columns2[2])
|
|
195
|
+
self.home_page.csv_y2_selector.set(columns2[2])
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
def load_csv(file_path):
|
|
200
|
+
file_metadata = {}
|
|
201
|
+
data_metadata = {}
|
|
202
|
+
mode = "file_metadata"
|
|
203
|
+
columns = []
|
|
204
|
+
data_lines = []
|
|
205
|
+
|
|
206
|
+
with open(file_path, "r") as file:
|
|
207
|
+
lines = file.readlines()
|
|
208
|
+
|
|
209
|
+
for line in lines:
|
|
210
|
+
if (line.startswith("@H,")):
|
|
211
|
+
mode = "data_metadata"
|
|
212
|
+
columns = line.strip().rstrip(",").split(",")[1:]
|
|
213
|
+
continue
|
|
214
|
+
elif (line.startswith("@T,")):
|
|
215
|
+
mode = "file_metadata"
|
|
216
|
+
continue
|
|
217
|
+
elif (line.startswith(",") and mode == "data_metadata"):
|
|
218
|
+
mode = "file_data"
|
|
219
|
+
|
|
220
|
+
if (mode == "file_metadata"):
|
|
221
|
+
try:
|
|
222
|
+
key, value = line.strip().rstrip(",").split(",")
|
|
223
|
+
file_metadata[key] = value
|
|
224
|
+
except:
|
|
225
|
+
pass
|
|
226
|
+
|
|
227
|
+
elif (mode == "data_metadata"):
|
|
228
|
+
try:
|
|
229
|
+
values = line.strip().rstrip(",").split(",")
|
|
230
|
+
key = values[0]
|
|
231
|
+
values = values[1:]
|
|
232
|
+
if len(values) == len(columns):
|
|
233
|
+
data_metadata[key] = {}
|
|
234
|
+
for i in range(len(columns)):
|
|
235
|
+
data_metadata[key][columns[i]] = values[i]
|
|
236
|
+
except:
|
|
237
|
+
pass
|
|
238
|
+
|
|
239
|
+
elif (mode == "file_data"):
|
|
240
|
+
try:
|
|
241
|
+
values = line.strip().rstrip(",").split(",")[1:]
|
|
242
|
+
if len(values) == len(columns):
|
|
243
|
+
data_lines.append(values)
|
|
244
|
+
except:
|
|
245
|
+
pass
|
|
246
|
+
|
|
247
|
+
return {
|
|
248
|
+
"file_attributes": file_metadata,
|
|
249
|
+
"data_attributes": data_metadata,
|
|
250
|
+
"data": pd.DataFrame(data_lines, columns=columns)
|
|
251
|
+
}
|
|
@@ -283,32 +283,27 @@ def calibrated_params_by_round(config, list_of_objs, option_manager):
|
|
|
283
283
|
def custom_csv(homepage, option_manager):
|
|
284
284
|
fig = go.Figure()
|
|
285
285
|
|
|
286
|
-
data = homepage.csv_data
|
|
286
|
+
data = homepage.csv_data["data"]
|
|
287
287
|
|
|
288
288
|
x = homepage.csv_x_selector.get()
|
|
289
289
|
val = homepage.csv_y1_selector.get()
|
|
290
290
|
val2 = homepage.csv_y2_selector.get()
|
|
291
291
|
|
|
292
|
-
data_start_index = 2
|
|
293
|
-
|
|
294
292
|
xx = None
|
|
295
293
|
if x == "time":
|
|
296
|
-
xx = pd.to_datetime(data["time"], format='%Y-%m-%d', errors='coerce')
|
|
294
|
+
xx = pd.to_datetime(data["time"], format='%Y-%m-%d', errors='coerce')
|
|
297
295
|
elif x == "date":
|
|
298
|
-
|
|
299
|
-
xx = pd.to_datetime(data["date"], format='%d-%m-%Y', errors='coerce').iloc[data_start_index:]
|
|
296
|
+
xx = pd.to_datetime(data["date"], format='%d-%m-%Y', errors='coerce')
|
|
300
297
|
else:
|
|
301
|
-
xx = pd.to_numeric(data[x], errors="coerce")
|
|
298
|
+
xx = pd.to_numeric(data[x], errors="coerce")
|
|
302
299
|
|
|
303
|
-
yy = pd.to_numeric(data[val], errors="coerce")
|
|
300
|
+
yy = pd.to_numeric(data[val], errors="coerce")
|
|
304
301
|
|
|
305
|
-
|
|
306
|
-
yy_unit = data[val].iloc[1]
|
|
302
|
+
yy_unit = homepage.csv_data["data_attributes"]["Unit"][val]
|
|
307
303
|
|
|
308
|
-
yy2 = pd.to_numeric(data[val2], errors="coerce")
|
|
304
|
+
yy2 = pd.to_numeric(data[val2], errors="coerce")
|
|
309
305
|
|
|
310
|
-
|
|
311
|
-
yy2_unit = data[val2].iloc[1]
|
|
306
|
+
yy2_unit = homepage.csv_data2["data_attributes"]["Unit"][val2]
|
|
312
307
|
|
|
313
308
|
fig.add_trace(go.Scatter(x=xx, y=yy, name=val))
|
|
314
309
|
fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2'))
|
|
@@ -356,43 +351,36 @@ def custom_csv(homepage, option_manager):
|
|
|
356
351
|
def compare_csv(homepage, option_manager):
|
|
357
352
|
fig = go.Figure()
|
|
358
353
|
|
|
359
|
-
data = homepage.csv_data
|
|
360
|
-
data2 = homepage.csv_data2
|
|
354
|
+
data = homepage.csv_data["data"]
|
|
355
|
+
data2 = homepage.csv_data2["data"]
|
|
361
356
|
|
|
362
357
|
x = homepage.csv_x_selector.get()
|
|
363
358
|
val = homepage.csv_y1_selector.get()
|
|
364
359
|
val2 = homepage.csv_y2_selector.get()
|
|
365
360
|
|
|
366
|
-
data_start_index = 2
|
|
367
|
-
data_start_index2 = 2
|
|
368
|
-
|
|
369
361
|
xx = None
|
|
370
362
|
if x == "time":
|
|
371
|
-
xx = pd.to_datetime(data["time"], format='%Y-%m-%d', errors='coerce')
|
|
363
|
+
xx = pd.to_datetime(data["time"], format='%Y-%m-%d', errors='coerce')
|
|
372
364
|
elif x == "date":
|
|
373
|
-
|
|
374
|
-
xx = pd.to_datetime(data["date"], format='%d-%m-%Y', errors='coerce').iloc[data_start_index:]
|
|
365
|
+
xx = pd.to_datetime(data["date"], format='%d-%m-%Y', errors='coerce')
|
|
375
366
|
else:
|
|
376
|
-
xx = pd.to_numeric(data[x], errors="coerce")
|
|
367
|
+
xx = pd.to_numeric(data[x], errors="coerce")
|
|
377
368
|
|
|
378
|
-
yy = pd.to_numeric(data[val], errors="coerce")
|
|
369
|
+
yy = pd.to_numeric(data[val], errors="coerce")
|
|
379
370
|
|
|
380
371
|
xx2 = None
|
|
381
372
|
if x == "time":
|
|
382
|
-
xx2 = pd.to_datetime(data2["time"], format='%Y-%m-%d', errors='coerce')
|
|
373
|
+
xx2 = pd.to_datetime(data2["time"], format='%Y-%m-%d', errors='coerce')
|
|
383
374
|
elif x == "date":
|
|
384
375
|
data_start_index2 = 5
|
|
385
|
-
xx2 = pd.to_datetime(data2["date"], format='%d-%m-%Y', errors='coerce')
|
|
376
|
+
xx2 = pd.to_datetime(data2["date"], format='%d-%m-%Y', errors='coerce')
|
|
386
377
|
else:
|
|
387
|
-
xx2 = pd.to_numeric(data2[x], errors="coerce")
|
|
388
|
-
|
|
389
|
-
#yy_unit = "N/A"
|
|
390
|
-
yy_unit = data[val].iloc[1]
|
|
378
|
+
xx2 = pd.to_numeric(data2[x], errors="coerce")
|
|
391
379
|
|
|
392
|
-
|
|
380
|
+
yy_unit = homepage.csv_data["data_attributes"]["Unit"][val]
|
|
393
381
|
|
|
394
|
-
|
|
395
|
-
yy2_unit =
|
|
382
|
+
yy2 = pd.to_numeric(data2[val2], errors="coerce")
|
|
383
|
+
yy2_unit = homepage.csv_data2["data_attributes"]["Unit"][val2]
|
|
396
384
|
|
|
397
385
|
fig.add_trace(go.Scatter(x=xx, y=yy, name=val))
|
|
398
386
|
fig.add_trace(go.Scatter(x=xx2, y=yy2, name=val2, yaxis='y2'))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|