mg-pso-gui 0.2.75__py3-none-any.whl → 0.2.76__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {mg_pso_gui-0.2.75.dist-info → mg_pso_gui-0.2.76.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.2.75.dist-info → mg_pso_gui-0.2.76.dist-info}/RECORD +6 -6
- mgpsogui/gui/VisualizeTab/SideBar.py +292 -286
- {mg_pso_gui-0.2.75.dist-info → mg_pso_gui-0.2.76.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.2.75.dist-info → mg_pso_gui-0.2.76.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.2.75.dist-info → mg_pso_gui-0.2.76.dist-info}/top_level.txt +0 -0
@@ -25,7 +25,7 @@ mgpsogui/gui/SetupTab/SetupTab.py,sha256=3V8LYvg5ulTll1hhguB_XpSoOR-w72vHh_Z3gw3
|
|
25
25
|
mgpsogui/gui/SetupTab/StepView.py,sha256=M_7gj3TqszMs0pVBnGmZZDr96NWZg5mfKyX1Ne1MIrc,9018
|
26
26
|
mgpsogui/gui/SetupTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
27
|
mgpsogui/gui/VisualizeTab/MatrixEditor.py,sha256=Gzyl2hRgjIfO5n0bCZZoXp_vOFvfsJPaGXDUMeRQg10,3171
|
28
|
-
mgpsogui/gui/VisualizeTab/SideBar.py,sha256=
|
28
|
+
mgpsogui/gui/VisualizeTab/SideBar.py,sha256=GaQiha5lwEseonfsW5nYBlFAJZV3rdDj53LyocuWibk,23432
|
29
29
|
mgpsogui/gui/VisualizeTab/VisualizeTab.py,sha256=Ro-K-P7aIcDM5GF-4QkUSo-HeLZANapybU07BRicwVw,6589
|
30
30
|
mgpsogui/gui/VisualizeTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
31
|
mgpsogui/gui/defaults/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -69,8 +69,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
69
69
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
70
70
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
71
71
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
72
|
-
mg_pso_gui-0.2.
|
73
|
-
mg_pso_gui-0.2.
|
74
|
-
mg_pso_gui-0.2.
|
75
|
-
mg_pso_gui-0.2.
|
76
|
-
mg_pso_gui-0.2.
|
72
|
+
mg_pso_gui-0.2.76.dist-info/METADATA,sha256=OAir1c1RT13M0LyJv7fMmEbeeBH8rjCuFjEGuq8z7Mk,9455
|
73
|
+
mg_pso_gui-0.2.76.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
74
|
+
mg_pso_gui-0.2.76.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
75
|
+
mg_pso_gui-0.2.76.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
76
|
+
mg_pso_gui-0.2.76.dist-info/RECORD,,
|
@@ -39,303 +39,309 @@ class SideBar(CTkScrollableFrame):
|
|
39
39
|
0, 0), pady=(0, 0), sticky="ew")
|
40
40
|
self.containerFrame.grid_columnconfigure(0, weight=1)
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
#self.graph_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
47
|
-
pass
|
48
|
-
elif (selected_graph == "Best Cost by Round"):
|
49
|
-
#self.graph_label = CTkLabel(self.containerFrame, text="Best Cost by Round")
|
50
|
-
#self.graph_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
51
|
-
pass
|
52
|
-
elif (selected_graph == "Iteration Table"):
|
53
|
-
#self.graph_label = CTkLabel(self.containerFrame, text="Iteration Table")
|
54
|
-
#self.graph_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
55
|
-
pass
|
56
|
-
elif (selected_graph == "Calibrated Parameters"):
|
57
|
-
#self.graph_label = CTkLabel(self.containerFrame, text="Calibrated Parameters")
|
58
|
-
#self.graph_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
59
|
-
pass
|
60
|
-
elif (selected_graph == "Custom CSV"):
|
61
|
-
|
62
|
-
folder = self.option_manager.get_project_folder()
|
63
|
-
if not os.path.exists(folder):
|
64
|
-
os.makedirs(folder)
|
65
|
-
|
66
|
-
# Get all CSV files in the folder and add their paths to a list
|
67
|
-
path_map = {}
|
68
|
-
name_list = []
|
69
|
-
for root, dirs, files in os.walk(folder):
|
70
|
-
for file in files:
|
71
|
-
if file.endswith(".csv"):
|
72
|
-
name = file.replace(".csv", "")
|
73
|
-
name_list.append(name)
|
74
|
-
path_map[name] = os.path.join(root, file)
|
75
|
-
|
76
|
-
if (len(name_list) == 0):
|
77
|
-
name_list.append("No files found...")
|
78
|
-
else:
|
79
|
-
if (self.option_manager.get("selected_csv").get() not in name_list):
|
80
|
-
self.option_manager.get("selected_csv").set(name_list[0])
|
81
|
-
|
82
|
-
file_label = CTkLabel(self.containerFrame, text="CSV File:")
|
83
|
-
file_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
84
|
-
|
85
|
-
self.home_page.csv_file_selector = CTkOptionMenu(self.containerFrame, values=name_list, variable=self.option_manager.get("selected_csv"), command=self.home_page.update_graph)
|
86
|
-
self.home_page.csv_file_selector.grid(row=1, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
42
|
+
try:
|
43
|
+
self.option_manager.get("selected_graph").set("Best Cost Stacked")
|
44
|
+
|
45
|
+
selected_graph = self.option_manager.get("selected_graph").get()
|
87
46
|
|
88
|
-
|
89
|
-
|
90
|
-
self.
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
self.
|
102
|
-
self.
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
self.home_page.csv_y1_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_y1"), command=self.home_page.update_graph)
|
111
|
-
self.home_page.csv_y1_selector.grid(row=5, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
112
|
-
|
113
|
-
if (self.home_page.csv_y1_selector.get() not in columns):
|
114
|
-
self.home_page.csv_y1_selector.set(columns[2])
|
115
|
-
|
116
|
-
y2_axis_label = CTkLabel(self.containerFrame, text="Secondary Y Axis:")
|
117
|
-
y2_axis_label.grid(row=6, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
118
|
-
|
119
|
-
self.home_page.csv_y2_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_y2"), command=self.home_page.update_graph)
|
120
|
-
self.home_page.csv_y2_selector.grid(row=7, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
121
|
-
|
122
|
-
if (self.home_page.csv_y2_selector.get() not in columns):
|
123
|
-
self.home_page.csv_y2_selector.set(columns[3])
|
47
|
+
if (selected_graph == "Best Cost Stacked"):
|
48
|
+
#self.graph_label = CTkLabel(self.containerFrame, text="Best Cost Stacked")
|
49
|
+
#self.graph_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
50
|
+
pass
|
51
|
+
elif (selected_graph == "Best Cost by Round"):
|
52
|
+
#self.graph_label = CTkLabel(self.containerFrame, text="Best Cost by Round")
|
53
|
+
#self.graph_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
54
|
+
pass
|
55
|
+
elif (selected_graph == "Iteration Table"):
|
56
|
+
#self.graph_label = CTkLabel(self.containerFrame, text="Iteration Table")
|
57
|
+
#self.graph_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
58
|
+
pass
|
59
|
+
elif (selected_graph == "Calibrated Parameters"):
|
60
|
+
#self.graph_label = CTkLabel(self.containerFrame, text="Calibrated Parameters")
|
61
|
+
#self.graph_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
62
|
+
pass
|
63
|
+
elif (selected_graph == "Custom CSV"):
|
64
|
+
|
65
|
+
folder = self.option_manager.get_project_folder()
|
66
|
+
if not os.path.exists(folder):
|
67
|
+
os.makedirs(folder)
|
124
68
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
os.
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
self.home_page.csv_file_selector.grid(row=1, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
153
|
-
|
154
|
-
self.home_page.csv_file_selector2 = CTkOptionMenu(self.containerFrame, values=name_list, variable=self.option_manager.get("selected_csv2"), command=self.home_page.update_graph)
|
155
|
-
self.home_page.csv_file_selector2.grid(row=2, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
156
|
-
|
157
|
-
selected_file = self.option_manager.get("selected_csv").get()
|
158
|
-
if (selected_file in path_map and selected_file != self.home_page.open_file):
|
159
|
-
self.home_page.csv_data = self.load_special_csv(path_map[selected_file])
|
160
|
-
print(self.home_page.csv_data)
|
161
|
-
self.home_page.open_file = selected_file
|
162
|
-
|
163
|
-
selected_file2 = self.option_manager.get("selected_csv2").get()
|
164
|
-
if (selected_file2 in path_map and selected_file2 != self.home_page.open_file2):
|
165
|
-
self.home_page.csv_data2 = self.load_special_csv(path_map[selected_file2])
|
166
|
-
print(self.home_page.csv_data2)
|
167
|
-
self.home_page.open_file2 = selected_file2
|
168
|
-
|
169
|
-
if (self.home_page.csv_data is not None and self.home_page.csv_data2 is not None):
|
170
|
-
# Get all column names of CSV
|
171
|
-
columns = self.home_page.csv_data["data"].columns
|
172
|
-
columns2 = self.home_page.csv_data2["data"].columns
|
173
|
-
|
174
|
-
x_axis_label = CTkLabel(self.containerFrame, text="X Axis:")
|
175
|
-
x_axis_label.grid(row=3, column=0, padx=(20, 20), pady=(40, 5), sticky="w")
|
176
|
-
|
177
|
-
self.home_page.csv_x_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_x"), command=self.home_page.update_graph)
|
178
|
-
self.home_page.csv_x_selector.grid(row=4, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
179
|
-
|
180
|
-
if (self.home_page.csv_x_selector.get() not in columns):
|
181
|
-
self.home_page.csv_x_selector.set(columns[1])
|
182
|
-
|
183
|
-
y1_axis_label = CTkLabel(self.containerFrame, text="Y Axis:")
|
184
|
-
y1_axis_label.grid(row=5, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
185
|
-
|
186
|
-
self.home_page.csv_y1_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_y1"), command=self.home_page.update_graph)
|
187
|
-
self.home_page.csv_y1_selector.grid(row=6, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
188
|
-
|
189
|
-
if (self.home_page.csv_y1_selector.get() not in columns):
|
190
|
-
self.home_page.csv_y1_selector.set(columns[2])
|
191
|
-
|
192
|
-
y2_axis_label = CTkLabel(self.containerFrame, text="Secondary Y Axis:")
|
193
|
-
y2_axis_label.grid(row=7, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
194
|
-
|
195
|
-
self.home_page.csv_y2_selector = CTkOptionMenu(self.containerFrame, values=columns2, variable=self.option_manager.get("selected_y2"), command=self.home_page.update_graph)
|
196
|
-
self.home_page.csv_y2_selector.grid(row=8, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
197
|
-
|
198
|
-
if (self.home_page.csv_y2_selector.get() not in columns2):
|
199
|
-
self.home_page.csv_y2_selector.set(columns2[2])
|
69
|
+
# Get all CSV files in the folder and add their paths to a list
|
70
|
+
path_map = {}
|
71
|
+
name_list = []
|
72
|
+
for root, dirs, files in os.walk(folder):
|
73
|
+
for file in files:
|
74
|
+
if file.endswith(".csv"):
|
75
|
+
name = file.replace(".csv", "")
|
76
|
+
name_list.append(name)
|
77
|
+
path_map[name] = os.path.join(root, file)
|
78
|
+
|
79
|
+
if (len(name_list) == 0):
|
80
|
+
name_list.append("No files found...")
|
81
|
+
else:
|
82
|
+
if (self.option_manager.get("selected_csv").get() not in name_list):
|
83
|
+
self.option_manager.get("selected_csv").set(name_list[0])
|
84
|
+
|
85
|
+
file_label = CTkLabel(self.containerFrame, text="CSV File:")
|
86
|
+
file_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
87
|
+
|
88
|
+
self.home_page.csv_file_selector = CTkOptionMenu(self.containerFrame, values=name_list, variable=self.option_manager.get("selected_csv"), command=self.home_page.update_graph)
|
89
|
+
self.home_page.csv_file_selector.grid(row=1, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
90
|
+
|
91
|
+
selected_file = self.option_manager.get("selected_csv").get()
|
92
|
+
if (selected_file in path_map and selected_file != self.home_page.open_file):
|
93
|
+
self.home_page.csv_data = self.load_special_csv(path_map[selected_file])
|
94
|
+
print(self.home_page.csv_data)
|
95
|
+
self.home_page.open_file = selected_file
|
200
96
|
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
self.
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
self.home_page.
|
97
|
+
if (self.home_page.csv_data is not None):
|
98
|
+
# Get all column names of CSV
|
99
|
+
columns = self.home_page.csv_data["data"].columns
|
100
|
+
|
101
|
+
x_axis_label = CTkLabel(self.containerFrame, text="X Axis:")
|
102
|
+
x_axis_label.grid(row=2, column=0, padx=(20, 20), pady=(40, 5), sticky="w")
|
103
|
+
|
104
|
+
self.home_page.csv_x_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_x"), command=self.home_page.update_graph)
|
105
|
+
self.home_page.csv_x_selector.grid(row=3, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
106
|
+
|
107
|
+
if (self.home_page.csv_x_selector.get() not in columns):
|
108
|
+
self.home_page.csv_x_selector.set(columns[1])
|
109
|
+
|
110
|
+
y1_axis_label = CTkLabel(self.containerFrame, text="Y Axis:")
|
111
|
+
y1_axis_label.grid(row=4, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
112
|
+
|
113
|
+
self.home_page.csv_y1_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_y1"), command=self.home_page.update_graph)
|
114
|
+
self.home_page.csv_y1_selector.grid(row=5, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
115
|
+
|
116
|
+
if (self.home_page.csv_y1_selector.get() not in columns):
|
117
|
+
self.home_page.csv_y1_selector.set(columns[2])
|
118
|
+
|
119
|
+
y2_axis_label = CTkLabel(self.containerFrame, text="Secondary Y Axis:")
|
120
|
+
y2_axis_label.grid(row=6, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
121
|
+
|
122
|
+
self.home_page.csv_y2_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_y2"), command=self.home_page.update_graph)
|
123
|
+
self.home_page.csv_y2_selector.grid(row=7, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
124
|
+
|
125
|
+
if (self.home_page.csv_y2_selector.get() not in columns):
|
126
|
+
self.home_page.csv_y2_selector.set(columns[3])
|
127
|
+
|
128
|
+
elif (selected_graph == "Compare CSV"):
|
129
|
+
folder = self.option_manager.get_project_folder()
|
130
|
+
if not os.path.exists(folder):
|
131
|
+
os.makedirs(folder)
|
132
|
+
|
133
|
+
# Get all CSV files in the folder and add their paths to a list
|
134
|
+
path_map = {}
|
135
|
+
name_list = []
|
136
|
+
for root, dirs, files in os.walk(folder):
|
137
|
+
for file in files:
|
138
|
+
if file.endswith(".csv"):
|
139
|
+
name = file.replace(".csv", "")
|
140
|
+
name_list.append(name)
|
141
|
+
path_map[name] = os.path.join(root, file)
|
142
|
+
|
143
|
+
if (len(name_list) == 0):
|
144
|
+
name_list.append("No files found...")
|
145
|
+
else:
|
146
|
+
if (self.option_manager.get("selected_csv").get() not in name_list):
|
147
|
+
self.option_manager.get("selected_csv").set(name_list[0])
|
148
|
+
if (self.option_manager.get("selected_csv2").get() not in name_list):
|
149
|
+
self.option_manager.get("selected_csv2").set(name_list[0])
|
150
|
+
|
151
|
+
file_label = CTkLabel(self.containerFrame, text="CSV Files:")
|
152
|
+
file_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
153
|
+
|
154
|
+
self.home_page.csv_file_selector = CTkOptionMenu(self.containerFrame, values=name_list, variable=self.option_manager.get("selected_csv"), command=self.home_page.update_graph)
|
155
|
+
self.home_page.csv_file_selector.grid(row=1, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
156
|
+
|
157
|
+
self.home_page.csv_file_selector2 = CTkOptionMenu(self.containerFrame, values=name_list, variable=self.option_manager.get("selected_csv2"), command=self.home_page.update_graph)
|
158
|
+
self.home_page.csv_file_selector2.grid(row=2, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
159
|
+
|
160
|
+
selected_file = self.option_manager.get("selected_csv").get()
|
161
|
+
if (selected_file in path_map and selected_file != self.home_page.open_file):
|
162
|
+
self.home_page.csv_data = self.load_special_csv(path_map[selected_file])
|
163
|
+
print(self.home_page.csv_data)
|
164
|
+
self.home_page.open_file = selected_file
|
165
|
+
|
166
|
+
selected_file2 = self.option_manager.get("selected_csv2").get()
|
167
|
+
if (selected_file2 in path_map and selected_file2 != self.home_page.open_file2):
|
168
|
+
self.home_page.csv_data2 = self.load_special_csv(path_map[selected_file2])
|
169
|
+
print(self.home_page.csv_data2)
|
170
|
+
self.home_page.open_file2 = selected_file2
|
171
|
+
|
172
|
+
if (self.home_page.csv_data is not None and self.home_page.csv_data2 is not None):
|
173
|
+
# Get all column names of CSV
|
174
|
+
columns = self.home_page.csv_data["data"].columns
|
175
|
+
columns2 = self.home_page.csv_data2["data"].columns
|
176
|
+
|
177
|
+
x_axis_label = CTkLabel(self.containerFrame, text="X Axis:")
|
178
|
+
x_axis_label.grid(row=3, column=0, padx=(20, 20), pady=(40, 5), sticky="w")
|
179
|
+
|
180
|
+
self.home_page.csv_x_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_x"), command=self.home_page.update_graph)
|
181
|
+
self.home_page.csv_x_selector.grid(row=4, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
182
|
+
|
183
|
+
if (self.home_page.csv_x_selector.get() not in columns):
|
184
|
+
self.home_page.csv_x_selector.set(columns[1])
|
185
|
+
|
186
|
+
y1_axis_label = CTkLabel(self.containerFrame, text="Y Axis:")
|
187
|
+
y1_axis_label.grid(row=5, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
188
|
+
|
189
|
+
self.home_page.csv_y1_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_y1"), command=self.home_page.update_graph)
|
190
|
+
self.home_page.csv_y1_selector.grid(row=6, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
191
|
+
|
192
|
+
if (self.home_page.csv_y1_selector.get() not in columns):
|
193
|
+
self.home_page.csv_y1_selector.set(columns[2])
|
194
|
+
|
195
|
+
y2_axis_label = CTkLabel(self.containerFrame, text="Secondary Y Axis:")
|
196
|
+
y2_axis_label.grid(row=7, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
197
|
+
|
198
|
+
self.home_page.csv_y2_selector = CTkOptionMenu(self.containerFrame, values=columns2, variable=self.option_manager.get("selected_y2"), command=self.home_page.update_graph)
|
199
|
+
self.home_page.csv_y2_selector.grid(row=8, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
200
|
+
|
201
|
+
if (self.home_page.csv_y2_selector.get() not in columns2):
|
202
|
+
self.home_page.csv_y2_selector.set(columns2[2])
|
203
|
+
|
204
|
+
elif (selected_graph == "Sampling CSV"):
|
262
205
|
|
263
|
-
|
264
|
-
|
206
|
+
folder = self.option_manager.get_project_folder()
|
207
|
+
if not os.path.exists(folder):
|
208
|
+
os.makedirs(folder)
|
209
|
+
|
210
|
+
# Get all CSV files in the folder and add their paths to a list
|
211
|
+
path_map = {}
|
212
|
+
name_list = []
|
213
|
+
for root, dirs, files in os.walk(folder):
|
214
|
+
for file in files:
|
215
|
+
if file.endswith(".csv"):
|
216
|
+
name = file.replace(".csv", "")
|
217
|
+
name_list.append(name)
|
218
|
+
path_map[name] = os.path.join(root, file)
|
219
|
+
|
220
|
+
if (len(name_list) == 0):
|
221
|
+
name_list.append("No files found...")
|
222
|
+
else:
|
223
|
+
if (self.option_manager.get("selected_csv").get() not in name_list):
|
224
|
+
self.option_manager.get("selected_csv").set(name_list[0])
|
225
|
+
|
226
|
+
file_label = CTkLabel(self.containerFrame, text="CSV File:")
|
227
|
+
file_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
228
|
+
|
229
|
+
self.home_page.csv_file_selector = CTkOptionMenu(self.containerFrame, values=name_list, variable=self.option_manager.get("selected_csv"), command=self.home_page.update_graph)
|
230
|
+
self.home_page.csv_file_selector.grid(row=1, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
231
|
+
|
232
|
+
selected_file = self.option_manager.get("selected_csv").get()
|
233
|
+
if (selected_file in path_map and selected_file != self.home_page.open_file):
|
234
|
+
self.home_page.csv_data = pd.read_csv(path_map[selected_file])
|
235
|
+
print(self.home_page.csv_data)
|
236
|
+
self.home_page.open_file = selected_file
|
237
|
+
|
238
|
+
if (self.home_page.csv_data is not None):
|
239
|
+
# Get all column names of CSV
|
240
|
+
columns = self.home_page.csv_data.columns
|
241
|
+
|
242
|
+
x_axis_label = CTkLabel(self.containerFrame, text="X Axis:")
|
243
|
+
x_axis_label.grid(row=2, column=0, padx=(20, 20), pady=(40, 5), sticky="w")
|
244
|
+
|
245
|
+
self.home_page.csv_x_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_x"), command=self.home_page.update_graph)
|
246
|
+
self.home_page.csv_x_selector.grid(row=3, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
247
|
+
|
248
|
+
if (self.home_page.csv_x_selector.get() not in columns):
|
249
|
+
self.home_page.csv_x_selector.set(columns[1])
|
250
|
+
|
251
|
+
y1_axis_label = CTkLabel(self.containerFrame, text="Y Axis:")
|
252
|
+
y1_axis_label.grid(row=4, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
253
|
+
|
254
|
+
self.home_page.csv_y1_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_y1"), command=self.home_page.update_graph)
|
255
|
+
self.home_page.csv_y1_selector.grid(row=5, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
256
|
+
|
257
|
+
if (self.home_page.csv_y1_selector.get() not in columns):
|
258
|
+
self.home_page.csv_y1_selector.set(columns[2])
|
259
|
+
|
260
|
+
y2_axis_label = CTkLabel(self.containerFrame, text="Secondary Y Axis:")
|
261
|
+
y2_axis_label.grid(row=6, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
262
|
+
|
263
|
+
self.home_page.csv_y2_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_y2"), command=self.home_page.update_graph)
|
264
|
+
self.home_page.csv_y2_selector.grid(row=7, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
265
|
+
|
266
|
+
if (self.home_page.csv_y2_selector.get() not in columns):
|
267
|
+
self.home_page.csv_y2_selector.set(columns[3])
|
265
268
|
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
269
|
+
style_label = CTkLabel(self.containerFrame, text="Figure Style:")
|
270
|
+
style_label.grid(row=8, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
271
|
+
|
272
|
+
self.home_page.figure_style_selector = CTkOptionMenu(self.containerFrame, values=["Scatter", "Bars", "Lines", "Area", "Box"], variable=self.option_manager.get("figure_style"), command=self.home_page.update_graph)
|
273
|
+
self.home_page.figure_style_selector.grid(row=9, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
271
274
|
|
272
|
-
|
273
|
-
|
274
|
-
folder = self.option_manager.get_project_folder()
|
275
|
-
if not os.path.exists(folder):
|
276
|
-
os.makedirs(folder)
|
277
|
-
|
278
|
-
# Get all CSV files in the folder and add their paths to a list
|
279
|
-
path_map = {}
|
280
|
-
name_list = []
|
281
|
-
for root, dirs, files in os.walk(folder):
|
282
|
-
for file in files:
|
283
|
-
if file.endswith(".csv"):
|
284
|
-
name = file.replace(".csv", "")
|
285
|
-
name_list.append(name)
|
286
|
-
path_map[name] = os.path.join(root, file)
|
287
|
-
|
288
|
-
if (len(name_list) == 0):
|
289
|
-
name_list.append("No files found...")
|
290
|
-
else:
|
291
|
-
if (self.option_manager.get("selected_csv").get() not in name_list):
|
292
|
-
self.option_manager.get("selected_csv").set(name_list[0])
|
293
|
-
|
294
|
-
file_label = CTkLabel(self.containerFrame, text="CSV File:")
|
295
|
-
file_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
296
|
-
|
297
|
-
self.home_page.csv_file_selector = CTkOptionMenu(self.containerFrame, values=name_list, variable=self.option_manager.get("selected_csv"), command=self.home_page.update_graph)
|
298
|
-
self.home_page.csv_file_selector.grid(row=1, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
299
|
-
|
300
|
-
selected_file = self.option_manager.get("selected_csv").get()
|
301
|
-
if (selected_file in path_map and selected_file != self.home_page.open_file):
|
302
|
-
self.home_page.csv_data = pd.read_csv(path_map[selected_file])
|
303
|
-
print(self.home_page.csv_data)
|
304
|
-
self.home_page.open_file = selected_file
|
305
|
-
|
306
|
-
if (self.home_page.csv_data is not None):
|
307
|
-
# Get all column names of CSV
|
308
|
-
columns = self.home_page.csv_data.columns
|
309
|
-
|
310
|
-
style_label = CTkLabel(self.containerFrame, text="Figure Style:")
|
311
|
-
style_label.grid(row=2, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
275
|
+
elif (selected_graph == "Matrix Editor"):
|
312
276
|
|
313
|
-
|
314
|
-
|
277
|
+
folder = self.option_manager.get_project_folder()
|
278
|
+
if not os.path.exists(folder):
|
279
|
+
os.makedirs(folder)
|
280
|
+
|
281
|
+
# Get all CSV files in the folder and add their paths to a list
|
282
|
+
path_map = {}
|
283
|
+
name_list = []
|
284
|
+
for root, dirs, files in os.walk(folder):
|
285
|
+
for file in files:
|
286
|
+
if file.endswith(".csv"):
|
287
|
+
name = file.replace(".csv", "")
|
288
|
+
name_list.append(name)
|
289
|
+
path_map[name] = os.path.join(root, file)
|
290
|
+
|
291
|
+
if (len(name_list) == 0):
|
292
|
+
name_list.append("No files found...")
|
293
|
+
else:
|
294
|
+
if (self.option_manager.get("selected_csv").get() not in name_list):
|
295
|
+
self.option_manager.get("selected_csv").set(name_list[0])
|
296
|
+
|
297
|
+
file_label = CTkLabel(self.containerFrame, text="CSV File:")
|
298
|
+
file_label.grid(row=0, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
299
|
+
|
300
|
+
self.home_page.csv_file_selector = CTkOptionMenu(self.containerFrame, values=name_list, variable=self.option_manager.get("selected_csv"), command=self.home_page.update_graph)
|
301
|
+
self.home_page.csv_file_selector.grid(row=1, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
302
|
+
|
303
|
+
selected_file = self.option_manager.get("selected_csv").get()
|
304
|
+
if (selected_file in path_map and selected_file != self.home_page.open_file):
|
305
|
+
self.home_page.csv_data = pd.read_csv(path_map[selected_file])
|
306
|
+
print(self.home_page.csv_data)
|
307
|
+
self.home_page.open_file = selected_file
|
308
|
+
|
309
|
+
if (self.home_page.csv_data is not None):
|
310
|
+
# Get all column names of CSV
|
311
|
+
columns = self.home_page.csv_data.columns
|
312
|
+
|
313
|
+
style_label = CTkLabel(self.containerFrame, text="Figure Style:")
|
314
|
+
style_label.grid(row=2, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
315
|
+
|
316
|
+
self.home_page.figure_style_selector = CTkOptionMenu(self.containerFrame, values=["Scatter", "Bars", "Lines", "Area", "Box"], variable=self.option_manager.get("figure_style"), command=self.home_page.update_graph)
|
317
|
+
self.home_page.figure_style_selector.grid(row=3, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
315
318
|
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
319
|
+
x_axis_label = CTkLabel(self.containerFrame, text="Y Axis:")
|
320
|
+
x_axis_label.grid(row=4, column=0, padx=(20, 20), pady=(40, 5), sticky="w")
|
321
|
+
|
322
|
+
self.home_page.csv_x_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_x"), command=self.home_page.update_graph)
|
323
|
+
self.home_page.csv_x_selector.grid(row=5, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
324
|
+
|
325
|
+
if (self.home_page.csv_x_selector.get() not in columns):
|
326
|
+
self.home_page.csv_x_selector.set(columns[1])
|
327
|
+
|
328
|
+
self.matrix_editor = me.MatrixEditor(self.containerFrame, width=280, option_manager=self.option_manager, home_page=self.home_page, columns=columns)
|
329
|
+
self.matrix_editor.grid(row=6, column=0, padx=(10, 10), pady=(10, 0), sticky="nsew")
|
330
|
+
self.matrix_editor.grid_columnconfigure(0, weight=1)
|
331
|
+
self.matrix_editor.grid_rowconfigure(0, weight=1)
|
329
332
|
|
330
333
|
|
331
|
-
|
332
|
-
|
334
|
+
#y1_axis_label = CTkLabel(self.containerFrame, text="Y Axis:")
|
335
|
+
#y1_axis_label.grid(row=6, column=0, padx=(20, 20), pady=(20, 5), sticky="w")
|
333
336
|
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
337
|
+
#self.home_page.csv_y1_selector = CTkOptionMenu(self.containerFrame, values=columns, variable=self.option_manager.get("selected_y1"), command=self.home_page.update_graph)
|
338
|
+
#self.home_page.csv_y1_selector.grid(row=7, column=0, padx=(20, 20), pady=(5, 5), sticky="ew")
|
339
|
+
|
340
|
+
#if (self.home_page.csv_y1_selector.get() not in columns):
|
341
|
+
# self.home_page.csv_y1_selector.set(columns[2])
|
342
|
+
except Exception as e:
|
343
|
+
print(e)
|
344
|
+
pass
|
339
345
|
|
340
346
|
def load_special_csv(self, file_path):
|
341
347
|
file_metadata = {}
|
File without changes
|
File without changes
|
File without changes
|