mg-pso-gui 0.1.207__py3-none-any.whl → 0.1.209__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mg-pso-gui
3
- Version: 0.1.207
3
+ Version: 0.1.209
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -34,7 +34,7 @@ mgpsogui/gui/images/stop.png,sha256=JPuxXQerCGpLikcp7cAj3iLCOjULMYYZ2sZe0lArh68,
34
34
  mgpsogui/gui/images/test.png,sha256=MUnVpRK-isxhEHzx4Q6Yh0M6FRZD1qvgCHH2XmiSBbk,3642
35
35
  mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ,2958
36
36
  mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
37
- mgpsogui/util/GraphGenerator.py,sha256=yv66Hz9BIZsg_tRQDHcUAFBurOuc4tWpjwVWDsMiHMg,24380
37
+ mgpsogui/util/GraphGenerator.py,sha256=t2SS3dXyhYVZkeu1RskZlOjq85NYBXK6cdD0NbaMYTo,26310
38
38
  mgpsogui/util/PSORunner.py,sha256=ELpRgEpUiLV4hW-A-y4yzfkFN1BXgH7LZ0qlwWBRz3s,11012
39
39
  mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  mgpsogui/util/debug.py,sha256=Swzny9_1S-CCONWGssj9iDoSpbwu5Vr4f95g_9L8bec,19759
@@ -60,8 +60,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
60
60
  mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
61
61
  mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
62
62
  mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
63
- mg_pso_gui-0.1.207.dist-info/METADATA,sha256=PemyAcGXj9BwATFdgVpjAF5tqWSb0DBM_PEAyQrgcuY,9456
64
- mg_pso_gui-0.1.207.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
65
- mg_pso_gui-0.1.207.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
66
- mg_pso_gui-0.1.207.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
67
- mg_pso_gui-0.1.207.dist-info/RECORD,,
63
+ mg_pso_gui-0.1.209.dist-info/METADATA,sha256=2kJji5mcHBn5t1pjIoQzJ9zfz0UiDUlYSL1hbJGBHTg,9456
64
+ mg_pso_gui-0.1.209.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
65
+ mg_pso_gui-0.1.209.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
66
+ mg_pso_gui-0.1.209.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
67
+ mg_pso_gui-0.1.209.dist-info/RECORD,,
@@ -23,14 +23,14 @@ theme_background_color_html = {
23
23
 
24
24
  theme_plot_color = {
25
25
  "Dark": 'rgb(62, 62, 62)',
26
- "Light": 'rgb(242, 242, 242)',
27
- "Publication": 'rgb(242, 242, 242)'
26
+ "Light": 'rgba(245,245,255,255)',
27
+ "Publication": 'rgba(245,245,255,255)'
28
28
  }
29
29
 
30
30
  theme_grid_color = {
31
31
  "Dark": 'rgb(72, 72, 72)',
32
- "Light": 'rgb(242, 242, 242)',
33
- "Publication": 'rgb(242, 242, 242)'
32
+ "Light": 'rgb(255, 255, 255)',
33
+ "Publication": 'rgb(255, 255, 255)'
34
34
  }
35
35
 
36
36
  theme_line_color = {
@@ -45,6 +45,20 @@ theme_font_color = {
45
45
  "Publication": 'black'
46
46
  }
47
47
 
48
+ theme_plot_color_pallet = [
49
+ "rgba(151, 209, 233, 255)",
50
+ "rgba(0, 120, 179, 255)",
51
+ "rgba(179, 223, 146, 255)",
52
+ "rgba(49, 169, 90, 255)",
53
+ "rgba(227, 136, 220, 255)",
54
+ "rgba(127, 0, 255, 255)",
55
+ "rgba(255, 128, 0, 255)",
56
+ "rgba(255, 99, 71, 255)",
57
+ "rgba(102, 205, 170, 255)",
58
+ "rgba(255, 215, 0, 255)",
59
+ "rgba(70, 130, 180, 255)"
60
+ ]
61
+
48
62
  def generate_graphs(HomePage):
49
63
 
50
64
  try:
@@ -102,8 +116,10 @@ def best_cost_stacked(homepage, config, data, option_manager):
102
116
  total_steps = len(config)
103
117
 
104
118
  # Get unique values from the round_step column of the dataframe
119
+ pp = 0
105
120
  for round_step in data.keys():
106
- fig.add_trace(go.Scatter(x=data[round_step]["percent"], y=data[round_step]["best_cost"], name=round_step))
121
+ fig.add_trace(go.Scatter(x=data[round_step]["percent"], y=data[round_step]["best_cost"], name=round_step, marker_color=theme_plot_color_pallet[pp]))
122
+ pp += 1
107
123
 
108
124
  fig.update_layout(
109
125
  title="",
@@ -132,6 +148,7 @@ def best_cost_stacked(homepage, config, data, option_manager):
132
148
 
133
149
  fig.write_image(os.path.join(folder, "best_cost_stacked.png"), width=1280, height=720)
134
150
  fig.write_html(os.path.join(folder, "best_cost_stacked.html"), include_plotlyjs='cdn', auto_open=False)
151
+ fig.write_json(os.path.join(folder, "best_cost_stacked.json"))
135
152
  with open(os.path.join(folder, "best_cost_stacked.html"), "r") as f:
136
153
  html = f.read()
137
154
  html = html.replace("<body>", "<body bgcolor='#2a2a2a'>")
@@ -184,6 +201,7 @@ def table(homepage, config, dataframe, option_manager):
184
201
 
185
202
  fig.write_image(os.path.join(folder, "table.png"), width=1280, height=720)
186
203
  fig.write_html(os.path.join(folder, "table.html"), include_plotlyjs='cdn', auto_open=False)
204
+ fig.write_json(os.path.join(folder, "table.json"))
187
205
  with open(os.path.join(folder, "table.html"), "r") as f:
188
206
  html = f.read()
189
207
  html = html.replace("<body>", "<body bgcolor='#2a2a2a'>")
@@ -199,6 +217,7 @@ def best_cost_by_round(homepage, config, data, option_manager):
199
217
 
200
218
  total_steps = len(config)
201
219
 
220
+ pp = 0
202
221
  # Get unique values from the round_step column of the dataframe
203
222
  for round_step in data.keys():
204
223
  #for iteration in dataframe['round_step'].unique():
@@ -211,8 +230,9 @@ def best_cost_by_round(homepage, config, data, option_manager):
211
230
  #step_index = ((iteration) % total_steps)
212
231
  #round_index = ((iteration) // total_steps)
213
232
 
214
- fig.add_trace(go.Scatter(x=np.array(data[round_step]['percent']) + (100 * round_index), y=data[round_step]['best_cost'], name=round_step))
215
-
233
+ fig.add_trace(go.Scatter(x=np.array(data[round_step]['percent']) + (100 * round_index), y=data[round_step]['best_cost'], name=round_step, marker_color=theme_plot_color_pallet[pp]))
234
+ pp += 1
235
+
216
236
  #fig.add_trace(go.Scatter(x=df['completed_rounds'] + (df['total_rounds'] * round_index), y=df['best_cost'], name='Group ' + str(step_index + 1)))
217
237
 
218
238
 
@@ -266,6 +286,7 @@ def best_cost_by_round(homepage, config, data, option_manager):
266
286
 
267
287
  fig.write_image(os.path.join(folder, "best_cost_by_round.png"), width=1280, height=720)
268
288
  fig.write_html(os.path.join(folder, "best_cost_by_round.html"), include_plotlyjs='cdn', auto_open=False)
289
+ fig.write_json(os.path.join(folder, "best_cost_by_round.json"))
269
290
  with open(os.path.join(folder, "best_cost_by_round.html"), "r") as f:
270
291
  html = f.read()
271
292
  html = html.replace("<body>", "<body bgcolor='#2a2a2a'>")
@@ -299,12 +320,14 @@ def calibrated_params_by_round(homepage, config, list_of_objs, option_manager):
299
320
  round += 1
300
321
 
301
322
  # Get unique values from the round_step column of the dataframe
323
+ pp = 0
302
324
  for key in datalines.keys():
303
325
  # Get best_cost and completed rounds rows for this iteration
304
326
  if key == 'step' or key == 'round':
305
327
  continue
306
328
 
307
- fig.add_trace(go.Scatter(x=datalines['round'], y=datalines[key], name=key))
329
+ fig.add_trace(go.Scatter(x=datalines['round'], y=datalines[key], name=key, marker_color=theme_plot_color_pallet[pp]))
330
+ pp += 1
308
331
 
309
332
  fig.update_layout(
310
333
  title="",
@@ -331,6 +354,7 @@ def calibrated_params_by_round(homepage, config, list_of_objs, option_manager):
331
354
 
332
355
  fig.write_image(os.path.join(folder, "calibrated_params_by_round.png"), width=1280, height=720)
333
356
  fig.write_html(os.path.join(folder, "calibrated_params_by_round.html"), include_plotlyjs='cdn', auto_open=False)
357
+ fig.write_json(os.path.join(folder, "calibrated_params_by_round.json"))
334
358
  with open(os.path.join(folder, "calibrated_params_by_round.html"), "r") as f:
335
359
  html = f.read()
336
360
  html = html.replace("<body>", "<body bgcolor='#2a2a2a'>")
@@ -370,8 +394,8 @@ def custom_csv(homepage, option_manager):
370
394
  if "Unit" in homepage.csv_data["data_attributes"]:
371
395
  yy2_unit = homepage.csv_data["data_attributes"]["Unit"][val2]
372
396
 
373
- fig.add_trace(go.Scatter(x=xx, y=yy, name=val))
374
- fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2'))
397
+ fig.add_trace(go.Scatter(x=xx, y=yy, name=val, marker_color=theme_plot_color_pallet[1]))
398
+ fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2', marker_color=theme_plot_color_pallet[3]))
375
399
 
376
400
  fig.update_layout(
377
401
  title="",
@@ -405,6 +429,7 @@ def custom_csv(homepage, option_manager):
405
429
 
406
430
  fig.write_image(os.path.join(folder, "custom_csv.png"), width=1280, height=720)
407
431
  fig.write_html(os.path.join(folder, "custom_csv.html"), include_plotlyjs='cdn', auto_open=False)
432
+ fig.write_json(os.path.join(folder, "custom_csv.json"))
408
433
  with open(os.path.join(folder, "custom_csv.html"), "r") as f:
409
434
  html = f.read()
410
435
  html = html.replace("<body>", "<body bgcolor='#2a2a2a'>")
@@ -453,8 +478,8 @@ def compare_csv(homepage, option_manager):
453
478
  if "Unit" in homepage.csv_data["data_attributes"]:
454
479
  yy2_unit = homepage.csv_data["data_attributes"]["Unit"][val2]
455
480
 
456
- fig.add_trace(go.Scatter(x=xx, y=yy, name=val))
457
- fig.add_trace(go.Scatter(x=xx2, y=yy2, name=val2, yaxis='y2'))
481
+ fig.add_trace(go.Scatter(x=xx, y=yy, name=val, marker_color=theme_plot_color_pallet[1]))
482
+ fig.add_trace(go.Scatter(x=xx2, y=yy2, name=val2, yaxis='y2', marker_color=theme_plot_color_pallet[3]))
458
483
 
459
484
  fig.update_layout(
460
485
  title="",
@@ -488,6 +513,7 @@ def compare_csv(homepage, option_manager):
488
513
 
489
514
  fig.write_image(os.path.join(folder, "compare_csv.png"), width=1280, height=720)
490
515
  fig.write_html(os.path.join(folder, "compare_csv.html"), include_plotlyjs='cdn', auto_open=False)
516
+ fig.write_json(os.path.join(folder, "compare_csv.json"))
491
517
  with open(os.path.join(folder, "compare_csv.html"), "r") as f:
492
518
  html = f.read()
493
519
  html = html.replace("<body>", "<body bgcolor='#2a2a2a'>")
@@ -526,20 +552,20 @@ def sampling_csv(homepage, option_manager):
526
552
  yy2_unit = ""
527
553
 
528
554
  if (style == "Scatter"):
529
- fig.add_trace(go.Scatter(x=xx, y=yy, name=val, mode='markers'))
530
- fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2', mode='markers'))
555
+ fig.add_trace(go.Scatter(x=xx, y=yy, name=val, mode='markers', marker_color=theme_plot_color_pallet[1]))
556
+ fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2', mode='markers', marker_color=theme_plot_color_pallet[3]))
531
557
  elif (style == "Bars"):
532
- fig.add_trace(go.Bar(x=xx, y=yy, name=val))
533
- fig.add_trace(go.Bar(x=xx, y=yy2, name=val2, yaxis='y2'))
558
+ fig.add_trace(go.Bar(x=xx, y=yy, name=val, marker_color=theme_plot_color_pallet[1]))
559
+ fig.add_trace(go.Bar(x=xx, y=yy2, name=val2, yaxis='y2', marker_color=theme_plot_color_pallet[3]))
534
560
  elif (style == "Lines"):
535
- fig.add_trace(go.Scatter(x=xx, y=yy, name=val))
536
- fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2'))
561
+ fig.add_trace(go.Scatter(x=xx, y=yy, name=val, marker_color=theme_plot_color_pallet[1]))
562
+ fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2', marker_color=theme_plot_color_pallet[3]))
537
563
  elif (style == "Area"):
538
- fig.add_trace(go.Scatter(x=xx, y=yy, name=val, fill='tozeroy'))
539
- fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2', fill='tozeroy'))
564
+ fig.add_trace(go.Scatter(x=xx, y=yy, name=val, fill='tozeroy', marker_color=theme_plot_color_pallet[1]))
565
+ fig.add_trace(go.Scatter(x=xx, y=yy2, name=val2, yaxis='y2', fill='tozeroy', marker_color=theme_plot_color_pallet[3]))
540
566
  elif (style == "Box"):
541
- fig.add_trace(go.Box(x=xx, y=yy, name=val))
542
- fig.add_trace(go.Box(x=xx, y=yy2, name=val2, yaxis='y2'))
567
+ fig.add_trace(go.Box(x=xx, y=yy, name=val, marker_color=theme_plot_color_pallet[1]))
568
+ fig.add_trace(go.Box(x=xx, y=yy2, name=val2, yaxis='y2', marker_color=theme_plot_color_pallet[3]))
543
569
 
544
570
  fig.update_layout(
545
571
  title="",
@@ -573,6 +599,7 @@ def sampling_csv(homepage, option_manager):
573
599
 
574
600
  fig.write_image(os.path.join(folder, "sampling_csv.png"), width=1280, height=720)
575
601
  fig.write_html(os.path.join(folder, "sampling_csv.html"), include_plotlyjs='cdn', auto_open=False)
602
+ fig.write_json(os.path.join(folder, "sampling_csv.json"))
576
603
  with open(os.path.join(folder, "sampling_csv.html"), "r") as f:
577
604
  html = f.read()
578
605
  html = html.replace("<body>", "<body bgcolor='#2a2a2a'>")
@@ -613,11 +640,14 @@ def matrix_editor(homepage, option_manager):
613
640
  figures_per_row = 3
614
641
  elif (total_figures == 7 or total_figures == 8):
615
642
  figures_per_row = 4
616
- elif (total_figures == 9 or total_figures == 10):
617
- figures_per_row = 5
643
+ elif (total_figures == 9):
644
+ figures_per_row = 3
645
+ else:
646
+ figures_per_row = 4
618
647
 
619
648
  fig_combined = make_subplots(rows=(math.ceil(total_figures / figures_per_row)), cols=figures_per_row, shared_xaxes=False, shared_yaxes=False)
620
649
 
650
+ pp = 0
621
651
  for parameter in figure_parameters:
622
652
  name = parameter['name'].get()
623
653
 
@@ -639,15 +669,17 @@ def matrix_editor(homepage, option_manager):
639
669
  yy_unit = ""
640
670
 
641
671
  if (style == "Scatter"):
642
- fig.add_trace(go.Scatter(x=yy, y=xx, name=val, mode='markers'))
672
+ fig.add_trace(go.Scatter(x=yy, y=xx, name=val, mode='markers', marker_color=theme_plot_color_pallet[pp]))
643
673
  elif (style == "Bars"):
644
- fig.add_trace(go.Bar(x=yy, y=xx, name=val))
674
+ fig.add_trace(go.Bar(x=yy, y=xx, name=val, marker_color=theme_plot_color_pallet[pp]))
645
675
  elif (style == "Lines"):
646
- fig.add_trace(go.Scatter(x=yy, y=xx, name=val))
676
+ fig.add_trace(go.Scatter(x=yy, y=xx, name=val, marker_color=theme_plot_color_pallet[pp]))
647
677
  elif (style == "Area"):
648
- fig.add_trace(go.Scatter(x=yy, y=xx, name=val, fill='tozeroy'))
678
+ fig.add_trace(go.Scatter(x=yy, y=xx, name=val, fill='tozeroy', marker_color=theme_plot_color_pallet[pp]))
649
679
  elif (style == "Box"):
650
- fig.add_trace(go.Box(x=yy, y=xx, name=val))
680
+ fig.add_trace(go.Box(x=yy, y=xx, name=val, marker_color=theme_plot_color_pallet[pp]))
681
+
682
+ pp += 1
651
683
 
652
684
  fig.update_layout(
653
685
  title="",
@@ -713,6 +745,7 @@ def matrix_editor(homepage, option_manager):
713
745
 
714
746
  fig.write_image(os.path.join(folder, "matrix_editor.png"), width=1280, height=720)
715
747
  fig.write_html(os.path.join(folder, "matrix_editor.html"), include_plotlyjs='cdn', auto_open=False)
748
+ fig.write_json(os.path.join(folder, "matrix_editor.json"))
716
749
  with open(os.path.join(folder, "matrix_editor.html"), "r") as f:
717
750
  html = f.read()
718
751
  html = html.replace("<body>", "<body bgcolor='#2a2a2a'>")