dcscope 2.22.1__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.
Files changed (267) hide show
  1. dcscope/__init__.py +17 -0
  2. dcscope/__main__.py +44 -0
  3. dcscope/_version.py +21 -0
  4. dcscope/extensions.py +250 -0
  5. dcscope/gui/__init__.py +2 -0
  6. dcscope/gui/analysis/__init__.py +10 -0
  7. dcscope/gui/analysis/ana_basins.py +110 -0
  8. dcscope/gui/analysis/ana_basins.ui +143 -0
  9. dcscope/gui/analysis/ana_filter.py +341 -0
  10. dcscope/gui/analysis/ana_filter.ui +364 -0
  11. dcscope/gui/analysis/ana_log.py +122 -0
  12. dcscope/gui/analysis/ana_log.ui +100 -0
  13. dcscope/gui/analysis/ana_meta.py +207 -0
  14. dcscope/gui/analysis/ana_meta.ui +141 -0
  15. dcscope/gui/analysis/ana_plot.py +638 -0
  16. dcscope/gui/analysis/ana_plot.ui +1060 -0
  17. dcscope/gui/analysis/ana_slot.py +504 -0
  18. dcscope/gui/analysis/ana_slot.ui +684 -0
  19. dcscope/gui/analysis/ana_tables.py +227 -0
  20. dcscope/gui/analysis/ana_tables.ui +195 -0
  21. dcscope/gui/analysis/ana_view.py +69 -0
  22. dcscope/gui/analysis/ana_view.ui +269 -0
  23. dcscope/gui/analysis/dlg_slot_reorder.py +55 -0
  24. dcscope/gui/analysis/dlg_slot_reorder.ui +138 -0
  25. dcscope/gui/bulk/__init__.py +2 -0
  26. dcscope/gui/bulk/bulk_emodulus.py +200 -0
  27. dcscope/gui/bulk/bulk_emodulus.ui +245 -0
  28. dcscope/gui/compute/__init__.py +3 -0
  29. dcscope/gui/compute/comp_lme4.py +115 -0
  30. dcscope/gui/compute/comp_lme4.ui +194 -0
  31. dcscope/gui/compute/comp_lme4_dataset.py +51 -0
  32. dcscope/gui/compute/comp_lme4_dataset.ui +92 -0
  33. dcscope/gui/compute/comp_lme4_results.py +120 -0
  34. dcscope/gui/compute/comp_lme4_results.ui +268 -0
  35. dcscope/gui/compute/comp_stats.py +223 -0
  36. dcscope/gui/compute/comp_stats.ui +187 -0
  37. dcscope/gui/dcor/__init__.py +304 -0
  38. dcscope/gui/dcor/dcor.ui +118 -0
  39. dcscope/gui/export/__init__.py +3 -0
  40. dcscope/gui/export/e2data.py +394 -0
  41. dcscope/gui/export/e2data.ui +367 -0
  42. dcscope/gui/export/e2filter.py +76 -0
  43. dcscope/gui/export/e2filter.ui +111 -0
  44. dcscope/gui/export/e2plot.py +94 -0
  45. dcscope/gui/export/e2plot.ui +175 -0
  46. dcscope/gui/main.py +1089 -0
  47. dcscope/gui/main.ui +579 -0
  48. dcscope/gui/matrix/__init__.py +4 -0
  49. dcscope/gui/matrix/block_matrix.py +141 -0
  50. dcscope/gui/matrix/block_matrix.ui +207 -0
  51. dcscope/gui/matrix/data_matrix.py +574 -0
  52. dcscope/gui/matrix/dm_dataset.py +116 -0
  53. dcscope/gui/matrix/dm_dataset.ui +348 -0
  54. dcscope/gui/matrix/dm_element.py +111 -0
  55. dcscope/gui/matrix/dm_element.ui +169 -0
  56. dcscope/gui/matrix/dm_filter.py +115 -0
  57. dcscope/gui/matrix/dm_filter.ui +287 -0
  58. dcscope/gui/matrix/plot_matrix.py +316 -0
  59. dcscope/gui/matrix/pm_element.py +39 -0
  60. dcscope/gui/matrix/pm_plot.py +86 -0
  61. dcscope/gui/matrix/pm_plot.ui +249 -0
  62. dcscope/gui/pipeline_plot.py +797 -0
  63. dcscope/gui/pipeline_plot.ui +66 -0
  64. dcscope/gui/preferences.py +380 -0
  65. dcscope/gui/preferences.ui +554 -0
  66. dcscope/gui/quick_view/__init__.py +1 -0
  67. dcscope/gui/quick_view/qv_main.py +1072 -0
  68. dcscope/gui/quick_view/qv_main.ui +1297 -0
  69. dcscope/gui/quick_view/qv_scatter.py +284 -0
  70. dcscope/gui/quick_view/qv_style.css +10 -0
  71. dcscope/gui/update.py +90 -0
  72. dcscope/gui/widgets/__init__.py +15 -0
  73. dcscope/gui/widgets/bg_thread.py +29 -0
  74. dcscope/gui/widgets/bulk_list.py +79 -0
  75. dcscope/gui/widgets/bulk_list.ui +95 -0
  76. dcscope/gui/widgets/double_spin_box_nan.py +75 -0
  77. dcscope/gui/widgets/feature_combobox.py +140 -0
  78. dcscope/gui/widgets/get_path.py +42 -0
  79. dcscope/gui/widgets/key_value_table_widget.css +12 -0
  80. dcscope/gui/widgets/key_value_table_widget.py +75 -0
  81. dcscope/gui/widgets/mdi_subwindow_wo_close.py +12 -0
  82. dcscope/gui/widgets/qrangeslider.py +262 -0
  83. dcscope/gui/widgets/rangecontrol.py +308 -0
  84. dcscope/gui/widgets/rangecontrol.ui +136 -0
  85. dcscope/gui/widgets/simple_image_view.py +55 -0
  86. dcscope/gui/widgets/simple_plot_widget.py +113 -0
  87. dcscope/gui/widgets/so_colorbaritem.py +29 -0
  88. dcscope/gui/widgets/wait_cursor.py +33 -0
  89. dcscope/idiom.py +26 -0
  90. dcscope/img/__init__.py +2 -0
  91. dcscope/img/icon-theme/breeze/COPYING-ICONS +209 -0
  92. dcscope/img/icon-theme/breeze/COPYING.LIB +510 -0
  93. dcscope/img/icon-theme/breeze/README +5 -0
  94. dcscope/img/icon-theme/breeze/actions/16/application-exit.svg +17 -0
  95. dcscope/img/icon-theme/breeze/actions/16/code-context.svg +13 -0
  96. dcscope/img/icon-theme/breeze/actions/16/dialog-cancel.svg +13 -0
  97. dcscope/img/icon-theme/breeze/actions/16/dialog-close.svg +17 -0
  98. dcscope/img/icon-theme/breeze/actions/16/dialog-messages.svg +13 -0
  99. dcscope/img/icon-theme/breeze/actions/16/dialog-ok-apply.svg +13 -0
  100. dcscope/img/icon-theme/breeze/actions/16/dialog-ok.svg +13 -0
  101. dcscope/img/icon-theme/breeze/actions/16/document-open-folder.svg +13 -0
  102. dcscope/img/icon-theme/breeze/actions/16/document-open.svg +13 -0
  103. dcscope/img/icon-theme/breeze/actions/16/document-save.svg +13 -0
  104. dcscope/img/icon-theme/breeze/actions/16/documentinfo.svg +12 -0
  105. dcscope/img/icon-theme/breeze/actions/16/draw-watercolor.svg +13 -0
  106. dcscope/img/icon-theme/breeze/actions/16/edit-clear-all.svg +13 -0
  107. dcscope/img/icon-theme/breeze/actions/16/edit-clear.svg +13 -0
  108. dcscope/img/icon-theme/breeze/actions/16/edit-paste.svg +13 -0
  109. dcscope/img/icon-theme/breeze/actions/16/globe.svg +16 -0
  110. dcscope/img/icon-theme/breeze/actions/16/gtk-preferences.svg +13 -0
  111. dcscope/img/icon-theme/breeze/actions/16/list-add.svg +13 -0
  112. dcscope/img/icon-theme/breeze/actions/16/messagebox_warning.svg +20 -0
  113. dcscope/img/icon-theme/breeze/actions/16/object-columns.svg +13 -0
  114. dcscope/img/icon-theme/breeze/actions/16/object-order-lower.svg +13 -0
  115. dcscope/img/icon-theme/breeze/actions/16/object-rows.svg +13 -0
  116. dcscope/img/icon-theme/breeze/actions/16/office-chart-line-stacked.svg +13 -0
  117. dcscope/img/icon-theme/breeze/actions/16/office-chart-ring.svg +13 -0
  118. dcscope/img/icon-theme/breeze/actions/16/office-chart-scatter.svg +13 -0
  119. dcscope/img/icon-theme/breeze/actions/16/path-mode-polyline.svg +13 -0
  120. dcscope/img/icon-theme/breeze/actions/16/preferences-activities.svg +13 -0
  121. dcscope/img/icon-theme/breeze/actions/16/remove.svg +10 -0
  122. dcscope/img/icon-theme/breeze/actions/16/search.svg +13 -0
  123. dcscope/img/icon-theme/breeze/actions/16/show-grid.svg +13 -0
  124. dcscope/img/icon-theme/breeze/actions/16/special_paste.svg +13 -0
  125. dcscope/img/icon-theme/breeze/actions/16/tools-wizard.svg +13 -0
  126. dcscope/img/icon-theme/breeze/actions/16/view-calendar-list.svg +13 -0
  127. dcscope/img/icon-theme/breeze/actions/16/view-filter.svg +13 -0
  128. dcscope/img/icon-theme/breeze/actions/16/view-list-tree.svg +13 -0
  129. dcscope/img/icon-theme/breeze/actions/16/view-statistics.svg +13 -0
  130. dcscope/img/icon-theme/breeze/actions/16/visibility.svg +21 -0
  131. dcscope/img/icon-theme/breeze/actions/22/application-exit.svg +13 -0
  132. dcscope/img/icon-theme/breeze/actions/22/code-context.svg +14 -0
  133. dcscope/img/icon-theme/breeze/actions/22/dialog-cancel.svg +14 -0
  134. dcscope/img/icon-theme/breeze/actions/22/dialog-close.svg +10 -0
  135. dcscope/img/icon-theme/breeze/actions/22/dialog-messages.svg +14 -0
  136. dcscope/img/icon-theme/breeze/actions/22/dialog-ok-apply.svg +14 -0
  137. dcscope/img/icon-theme/breeze/actions/22/dialog-ok.svg +14 -0
  138. dcscope/img/icon-theme/breeze/actions/22/document-open-folder.svg +14 -0
  139. dcscope/img/icon-theme/breeze/actions/22/document-open.svg +14 -0
  140. dcscope/img/icon-theme/breeze/actions/22/document-save.svg +14 -0
  141. dcscope/img/icon-theme/breeze/actions/22/documentinfo.svg +14 -0
  142. dcscope/img/icon-theme/breeze/actions/22/draw-watercolor.svg +14 -0
  143. dcscope/img/icon-theme/breeze/actions/22/edit-clear-all.svg +14 -0
  144. dcscope/img/icon-theme/breeze/actions/22/edit-clear.svg +14 -0
  145. dcscope/img/icon-theme/breeze/actions/22/edit-paste.svg +14 -0
  146. dcscope/img/icon-theme/breeze/actions/22/globe.svg +12 -0
  147. dcscope/img/icon-theme/breeze/actions/22/gtk-preferences.svg +13 -0
  148. dcscope/img/icon-theme/breeze/actions/22/list-add.svg +14 -0
  149. dcscope/img/icon-theme/breeze/actions/22/messagebox_warning.svg +17 -0
  150. dcscope/img/icon-theme/breeze/actions/22/object-columns.svg +14 -0
  151. dcscope/img/icon-theme/breeze/actions/22/object-order-lower.svg +17 -0
  152. dcscope/img/icon-theme/breeze/actions/22/object-rows.svg +17 -0
  153. dcscope/img/icon-theme/breeze/actions/22/office-chart-line-stacked.svg +17 -0
  154. dcscope/img/icon-theme/breeze/actions/22/office-chart-ring.svg +17 -0
  155. dcscope/img/icon-theme/breeze/actions/22/office-chart-scatter.svg +17 -0
  156. dcscope/img/icon-theme/breeze/actions/22/path-mode-polyline.svg +17 -0
  157. dcscope/img/icon-theme/breeze/actions/22/preferences-activities.svg +14 -0
  158. dcscope/img/icon-theme/breeze/actions/22/remove.svg +10 -0
  159. dcscope/img/icon-theme/breeze/actions/22/special_paste.svg +14 -0
  160. dcscope/img/icon-theme/breeze/actions/22/tools-wizard.svg +14 -0
  161. dcscope/img/icon-theme/breeze/actions/22/view-calendar-list.svg +14 -0
  162. dcscope/img/icon-theme/breeze/actions/22/view-filter.svg +14 -0
  163. dcscope/img/icon-theme/breeze/actions/22/view-list-tree.svg +14 -0
  164. dcscope/img/icon-theme/breeze/actions/22/view-statistics.svg +14 -0
  165. dcscope/img/icon-theme/breeze/actions/22/visibility.svg +14 -0
  166. dcscope/img/icon-theme/breeze/actions/24/application-exit.svg +12 -0
  167. dcscope/img/icon-theme/breeze/actions/24/code-context.svg +12 -0
  168. dcscope/img/icon-theme/breeze/actions/24/dialog-cancel.svg +12 -0
  169. dcscope/img/icon-theme/breeze/actions/24/dialog-close.svg +10 -0
  170. dcscope/img/icon-theme/breeze/actions/24/dialog-messages.svg +12 -0
  171. dcscope/img/icon-theme/breeze/actions/24/dialog-ok-apply.svg +12 -0
  172. dcscope/img/icon-theme/breeze/actions/24/dialog-ok.svg +14 -0
  173. dcscope/img/icon-theme/breeze/actions/24/document-open-folder.svg +12 -0
  174. dcscope/img/icon-theme/breeze/actions/24/document-open.svg +12 -0
  175. dcscope/img/icon-theme/breeze/actions/24/document-save.svg +12 -0
  176. dcscope/img/icon-theme/breeze/actions/24/documentinfo.svg +14 -0
  177. dcscope/img/icon-theme/breeze/actions/24/draw-watercolor.svg +12 -0
  178. dcscope/img/icon-theme/breeze/actions/24/edit-clear-all.svg +14 -0
  179. dcscope/img/icon-theme/breeze/actions/24/edit-clear.svg +12 -0
  180. dcscope/img/icon-theme/breeze/actions/24/edit-paste.svg +12 -0
  181. dcscope/img/icon-theme/breeze/actions/24/globe.svg +14 -0
  182. dcscope/img/icon-theme/breeze/actions/24/gtk-preferences.svg +13 -0
  183. dcscope/img/icon-theme/breeze/actions/24/list-add.svg +12 -0
  184. dcscope/img/icon-theme/breeze/actions/24/messagebox_warning.svg +13 -0
  185. dcscope/img/icon-theme/breeze/actions/24/object-columns.svg +12 -0
  186. dcscope/img/icon-theme/breeze/actions/24/object-order-lower.svg +15 -0
  187. dcscope/img/icon-theme/breeze/actions/24/object-rows.svg +15 -0
  188. dcscope/img/icon-theme/breeze/actions/24/office-chart-line-stacked.svg +15 -0
  189. dcscope/img/icon-theme/breeze/actions/24/office-chart-ring.svg +15 -0
  190. dcscope/img/icon-theme/breeze/actions/24/office-chart-scatter.svg +15 -0
  191. dcscope/img/icon-theme/breeze/actions/24/path-mode-polyline.svg +15 -0
  192. dcscope/img/icon-theme/breeze/actions/24/preferences-activities.svg +13 -0
  193. dcscope/img/icon-theme/breeze/actions/24/remove.svg +10 -0
  194. dcscope/img/icon-theme/breeze/actions/24/special_paste.svg +12 -0
  195. dcscope/img/icon-theme/breeze/actions/24/tools-wizard.svg +12 -0
  196. dcscope/img/icon-theme/breeze/actions/24/view-calendar-list.svg +12 -0
  197. dcscope/img/icon-theme/breeze/actions/24/view-filter.svg +12 -0
  198. dcscope/img/icon-theme/breeze/actions/24/view-list-tree.svg +12 -0
  199. dcscope/img/icon-theme/breeze/actions/24/view-statistics.svg +12 -0
  200. dcscope/img/icon-theme/breeze/actions/24/visibility.svg +14 -0
  201. dcscope/img/icon-theme/breeze/actions/32/application-exit.svg +8 -0
  202. dcscope/img/icon-theme/breeze/actions/32/dialog-cancel.svg +13 -0
  203. dcscope/img/icon-theme/breeze/actions/32/dialog-messages.svg +13 -0
  204. dcscope/img/icon-theme/breeze/actions/32/dialog-ok-apply.svg +1 -0
  205. dcscope/img/icon-theme/breeze/actions/32/dialog-ok.svg +1 -0
  206. dcscope/img/icon-theme/breeze/actions/32/document-open-folder.svg +13 -0
  207. dcscope/img/icon-theme/breeze/actions/32/document-open.svg +13 -0
  208. dcscope/img/icon-theme/breeze/actions/32/document-save.svg +18 -0
  209. dcscope/img/icon-theme/breeze/actions/32/gtk-preferences.svg +17 -0
  210. dcscope/img/icon-theme/breeze/actions/32/object-order-lower.svg +18 -0
  211. dcscope/img/icon-theme/breeze/actions/32/view-filter.svg +18 -0
  212. dcscope/img/icon-theme/breeze/actions/32/view-list-tree.svg +18 -0
  213. dcscope/img/icon-theme/breeze/places/16/folder-cloud.svg +13 -0
  214. dcscope/img/icon-theme/breeze/places/16/folder.svg +13 -0
  215. dcscope/img/icon-theme/breeze/places/22/folder-cloud.svg +13 -0
  216. dcscope/img/icon-theme/breeze/places/22/folder.svg +13 -0
  217. dcscope/img/icon-theme/breeze/places/24/folder-cloud.svg +12 -0
  218. dcscope/img/icon-theme/breeze/places/24/folder.svg +12 -0
  219. dcscope/img/icon-theme/breeze/places/32/folder-cloud.svg +35 -0
  220. dcscope/img/icon-theme/breeze/places/32/folder.svg +30 -0
  221. dcscope/img/icon-theme/breeze/places/64/folder-cloud.svg +35 -0
  222. dcscope/img/icon-theme/breeze/places/64/folder.svg +30 -0
  223. dcscope/img/icon-theme/breeze/status/16/dialog-error.svg +9 -0
  224. dcscope/img/icon-theme/breeze/status/16/dialog-information.svg +9 -0
  225. dcscope/img/icon-theme/breeze/status/16/dialog-question.svg +7 -0
  226. dcscope/img/icon-theme/breeze/status/16/dialog-warning.svg +9 -0
  227. dcscope/img/icon-theme/breeze/status/22/dialog-error.svg +9 -0
  228. dcscope/img/icon-theme/breeze/status/22/dialog-information.svg +9 -0
  229. dcscope/img/icon-theme/breeze/status/22/dialog-question.svg +7 -0
  230. dcscope/img/icon-theme/breeze/status/22/dialog-warning.svg +9 -0
  231. dcscope/img/icon-theme/breeze/status/24/dialog-error.svg +13 -0
  232. dcscope/img/icon-theme/breeze/status/24/dialog-information.svg +13 -0
  233. dcscope/img/icon-theme/breeze/status/24/dialog-question.svg +9 -0
  234. dcscope/img/icon-theme/breeze/status/24/dialog-warning.svg +1 -0
  235. dcscope/img/icon-theme/breeze/status/64/dialog-error.svg +25 -0
  236. dcscope/img/icon-theme/breeze/status/64/dialog-information.svg +25 -0
  237. dcscope/img/icon-theme/breeze/status/64/dialog-question.svg +25 -0
  238. dcscope/img/icon-theme/breeze/status/64/dialog-warning.svg +25 -0
  239. dcscope/img/icon-theme/collect_icons.py +124 -0
  240. dcscope/img/icon-theme/dcscope/dcor.png +0 -0
  241. dcscope/img/icon-theme/dcscope/edit-copy-anew.svg +13 -0
  242. dcscope/img/icon-theme/dcscope/emodulus.svg +69 -0
  243. dcscope/img/icon-theme/dcscope/filter_ray.svg +54 -0
  244. dcscope/img/icon-theme/dcscope/region_channel.svg +86 -0
  245. dcscope/img/icon-theme/dcscope/region_reservoir.svg +89 -0
  246. dcscope/img/icon-theme/dcscope/rlang.svg +108 -0
  247. dcscope/img/icon-theme/dcscope/statistical_significance.svg +106 -0
  248. dcscope/img/icon-theme/index.theme +81 -0
  249. dcscope/img/icon.png +0 -0
  250. dcscope/img/icon.svg +73 -0
  251. dcscope/img/splash.png +0 -0
  252. dcscope/meta_tool.py +143 -0
  253. dcscope/pipeline/__init__.py +5 -0
  254. dcscope/pipeline/core.py +632 -0
  255. dcscope/pipeline/dataslot.py +270 -0
  256. dcscope/pipeline/filter.py +161 -0
  257. dcscope/pipeline/filter_ray.py +170 -0
  258. dcscope/pipeline/plot.py +187 -0
  259. dcscope/plot_cache.py +79 -0
  260. dcscope/session.py +379 -0
  261. dcscope/util.py +34 -0
  262. dcscope-2.22.1.dist-info/METADATA +95 -0
  263. dcscope-2.22.1.dist-info/RECORD +267 -0
  264. dcscope-2.22.1.dist-info/WHEEL +5 -0
  265. dcscope-2.22.1.dist-info/entry_points.txt +2 -0
  266. dcscope-2.22.1.dist-info/licenses/LICENSE +621 -0
  267. dcscope-2.22.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,364 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>Form</class>
4
+ <widget class="QWidget" name="Form">
5
+ <property name="geometry">
6
+ <rect>
7
+ <x>0</x>
8
+ <y>0</y>
9
+ <width>701</width>
10
+ <height>538</height>
11
+ </rect>
12
+ </property>
13
+ <property name="windowTitle">
14
+ <string>Form</string>
15
+ </property>
16
+ <layout class="QVBoxLayout" name="verticalLayout">
17
+ <item>
18
+ <layout class="QHBoxLayout" name="horizontalLayout">
19
+ <item>
20
+ <widget class="QLabel" name="label">
21
+ <property name="text">
22
+ <string>Filter set</string>
23
+ </property>
24
+ </widget>
25
+ </item>
26
+ <item>
27
+ <widget class="QComboBox" name="comboBox_filters">
28
+ <property name="sizeAdjustPolicy">
29
+ <enum>QComboBox::AdjustToContents</enum>
30
+ </property>
31
+ </widget>
32
+ </item>
33
+ <item>
34
+ <spacer name="horizontalSpacer_2">
35
+ <property name="orientation">
36
+ <enum>Qt::Horizontal</enum>
37
+ </property>
38
+ <property name="sizeType">
39
+ <enum>QSizePolicy::Expanding</enum>
40
+ </property>
41
+ <property name="sizeHint" stdset="0">
42
+ <size>
43
+ <width>0</width>
44
+ <height>20</height>
45
+ </size>
46
+ </property>
47
+ </spacer>
48
+ </item>
49
+ <item>
50
+ <widget class="QToolButton" name="toolButton_duplicate">
51
+ <property name="toolTip">
52
+ <string>Duplicate this filter</string>
53
+ </property>
54
+ <property name="text">
55
+ <string>Duplicate</string>
56
+ </property>
57
+ <property name="icon">
58
+ <iconset theme="edit-paste">
59
+ <normaloff>.</normaloff>.</iconset>
60
+ </property>
61
+ </widget>
62
+ </item>
63
+ <item>
64
+ <widget class="QToolButton" name="toolButton_remove">
65
+ <property name="toolTip">
66
+ <string>Remove this filter</string>
67
+ </property>
68
+ <property name="text">
69
+ <string>Remove</string>
70
+ </property>
71
+ <property name="icon">
72
+ <iconset theme="remove">
73
+ <normaloff>.</normaloff>.</iconset>
74
+ </property>
75
+ </widget>
76
+ </item>
77
+ </layout>
78
+ </item>
79
+ <item>
80
+ <widget class="Line" name="line">
81
+ <property name="orientation">
82
+ <enum>Qt::Horizontal</enum>
83
+ </property>
84
+ </widget>
85
+ </item>
86
+ <item>
87
+ <layout class="QVBoxLayout" name="verticalLayout_5">
88
+ <property name="leftMargin">
89
+ <number>9</number>
90
+ </property>
91
+ <property name="topMargin">
92
+ <number>0</number>
93
+ </property>
94
+ <item>
95
+ <layout class="QVBoxLayout" name="verticalLayout_2">
96
+ <property name="sizeConstraint">
97
+ <enum>QLayout::SetMinimumSize</enum>
98
+ </property>
99
+ <item>
100
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
101
+ <property name="topMargin">
102
+ <number>0</number>
103
+ </property>
104
+ <item>
105
+ <widget class="QLabel" name="label_2">
106
+ <property name="text">
107
+ <string>Name</string>
108
+ </property>
109
+ </widget>
110
+ </item>
111
+ <item>
112
+ <widget class="QLineEdit" name="lineEdit_name"/>
113
+ </item>
114
+ </layout>
115
+ </item>
116
+ <item>
117
+ <widget class="QCheckBox" name="checkBox_enable">
118
+ <property name="text">
119
+ <string>Use this filter</string>
120
+ </property>
121
+ <property name="checked">
122
+ <bool>true</bool>
123
+ </property>
124
+ </widget>
125
+ </item>
126
+ <item>
127
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
128
+ <property name="topMargin">
129
+ <number>0</number>
130
+ </property>
131
+ <item>
132
+ <widget class="QCheckBox" name="checkBox_limit">
133
+ <property name="toolTip">
134
+ <string>Set an upper limit for the number of events; Surplus events are removed randomly, but in a reproducible manner.</string>
135
+ </property>
136
+ <property name="text">
137
+ <string>Limit number of events to</string>
138
+ </property>
139
+ </widget>
140
+ </item>
141
+ <item>
142
+ <widget class="QSpinBox" name="spinBox_limit">
143
+ <property name="minimum">
144
+ <number>1</number>
145
+ </property>
146
+ <property name="maximum">
147
+ <number>999999999</number>
148
+ </property>
149
+ <property name="singleStep">
150
+ <number>1000</number>
151
+ </property>
152
+ <property name="value">
153
+ <number>5000</number>
154
+ </property>
155
+ </widget>
156
+ </item>
157
+ <item>
158
+ <spacer name="horizontalSpacer_3">
159
+ <property name="orientation">
160
+ <enum>Qt::Horizontal</enum>
161
+ </property>
162
+ <property name="sizeHint" stdset="0">
163
+ <size>
164
+ <width>40</width>
165
+ <height>20</height>
166
+ </size>
167
+ </property>
168
+ </spacer>
169
+ </item>
170
+ </layout>
171
+ </item>
172
+ <item>
173
+ <widget class="QCheckBox" name="checkBox_invalid">
174
+ <property name="toolTip">
175
+ <string>Remove events that are nan- or inf-valued for any feature</string>
176
+ </property>
177
+ <property name="text">
178
+ <string>Remove invalid events</string>
179
+ </property>
180
+ </widget>
181
+ </item>
182
+ </layout>
183
+ </item>
184
+ <item>
185
+ <widget class="QGroupBox" name="groupBox_box">
186
+ <property name="sizePolicy">
187
+ <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
188
+ <horstretch>0</horstretch>
189
+ <verstretch>0</verstretch>
190
+ </sizepolicy>
191
+ </property>
192
+ <property name="title">
193
+ <string>Box filters</string>
194
+ </property>
195
+ <property name="checkable">
196
+ <bool>false</bool>
197
+ </property>
198
+ <layout class="QVBoxLayout" name="verticalLayout_3">
199
+ <property name="sizeConstraint">
200
+ <enum>QLayout::SetMaximumSize</enum>
201
+ </property>
202
+ <property name="leftMargin">
203
+ <number>9</number>
204
+ </property>
205
+ <item>
206
+ <widget class="QScrollArea" name="scrollArea_box">
207
+ <property name="frameShape">
208
+ <enum>QFrame::NoFrame</enum>
209
+ </property>
210
+ <property name="lineWidth">
211
+ <number>0</number>
212
+ </property>
213
+ <property name="horizontalScrollBarPolicy">
214
+ <enum>Qt::ScrollBarAlwaysOff</enum>
215
+ </property>
216
+ <property name="sizeAdjustPolicy">
217
+ <enum>QAbstractScrollArea::AdjustToContents</enum>
218
+ </property>
219
+ <property name="widgetResizable">
220
+ <bool>true</bool>
221
+ </property>
222
+ <widget class="QWidget" name="scrollAreaWidgetContents_box">
223
+ <property name="geometry">
224
+ <rect>
225
+ <x>0</x>
226
+ <y>0</y>
227
+ <width>649</width>
228
+ <height>68</height>
229
+ </rect>
230
+ </property>
231
+ <layout class="QVBoxLayout" name="verticalLayout_6">
232
+ <item>
233
+ <layout class="QVBoxLayout" name="verticalLayout_box"/>
234
+ </item>
235
+ </layout>
236
+ </widget>
237
+ </widget>
238
+ </item>
239
+ <item>
240
+ <widget class="QLabel" name="label_box_edit">
241
+ <property name="text">
242
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#a40000;&quot;&gt;You are currently selecting box filters. Click &amp;quot;&lt;/span&gt;&lt;span style=&quot; font-style:italic; color:#a40000;&quot;&gt;...Finish editing&lt;/span&gt;&lt;span style=&quot; color:#a40000;&quot;&gt;&amp;quot;&lt;br/&gt;below to start using them.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
243
+ </property>
244
+ </widget>
245
+ </item>
246
+ <item>
247
+ <widget class="QToolButton" name="toolButton_moreless">
248
+ <property name="text">
249
+ <string>Select box filters...</string>
250
+ </property>
251
+ </widget>
252
+ </item>
253
+ </layout>
254
+ </widget>
255
+ </item>
256
+ <item>
257
+ <widget class="QGroupBox" name="groupBox">
258
+ <property name="sizePolicy">
259
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
260
+ <horstretch>0</horstretch>
261
+ <verstretch>0</verstretch>
262
+ </sizepolicy>
263
+ </property>
264
+ <property name="title">
265
+ <string>Polygon filters</string>
266
+ </property>
267
+ <property name="alignment">
268
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
269
+ </property>
270
+ <layout class="QVBoxLayout" name="verticalLayout_4">
271
+ <property name="sizeConstraint">
272
+ <enum>QLayout::SetMinimumSize</enum>
273
+ </property>
274
+ <item>
275
+ <widget class="QScrollArea" name="scrollArea_poly">
276
+ <property name="frameShape">
277
+ <enum>QFrame::NoFrame</enum>
278
+ </property>
279
+ <property name="horizontalScrollBarPolicy">
280
+ <enum>Qt::ScrollBarAlwaysOff</enum>
281
+ </property>
282
+ <property name="sizeAdjustPolicy">
283
+ <enum>QAbstractScrollArea::AdjustToContents</enum>
284
+ </property>
285
+ <property name="widgetResizable">
286
+ <bool>true</bool>
287
+ </property>
288
+ <widget class="QWidget" name="scrollAreaWidgetContents_2">
289
+ <property name="geometry">
290
+ <rect>
291
+ <x>0</x>
292
+ <y>0</y>
293
+ <width>649</width>
294
+ <height>116</height>
295
+ </rect>
296
+ </property>
297
+ <layout class="QVBoxLayout" name="verticalLayout_7">
298
+ <item>
299
+ <layout class="QVBoxLayout" name="verticalLayout_poly"/>
300
+ </item>
301
+ </layout>
302
+ </widget>
303
+ </widget>
304
+ </item>
305
+ </layout>
306
+ </widget>
307
+ </item>
308
+ <item>
309
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
310
+ <property name="topMargin">
311
+ <number>0</number>
312
+ </property>
313
+ <item>
314
+ <spacer name="horizontalSpacer_4">
315
+ <property name="orientation">
316
+ <enum>Qt::Horizontal</enum>
317
+ </property>
318
+ <property name="sizeHint" stdset="0">
319
+ <size>
320
+ <width>40</width>
321
+ <height>20</height>
322
+ </size>
323
+ </property>
324
+ </spacer>
325
+ </item>
326
+ <item>
327
+ <widget class="QPushButton" name="pushButton_reset">
328
+ <property name="text">
329
+ <string>Reset</string>
330
+ </property>
331
+ </widget>
332
+ </item>
333
+ <item>
334
+ <spacer name="horizontalSpacer_5">
335
+ <property name="orientation">
336
+ <enum>Qt::Horizontal</enum>
337
+ </property>
338
+ <property name="sizeType">
339
+ <enum>QSizePolicy::Fixed</enum>
340
+ </property>
341
+ <property name="sizeHint" stdset="0">
342
+ <size>
343
+ <width>40</width>
344
+ <height>20</height>
345
+ </size>
346
+ </property>
347
+ </spacer>
348
+ </item>
349
+ <item>
350
+ <widget class="QPushButton" name="pushButton_apply">
351
+ <property name="text">
352
+ <string>Apply</string>
353
+ </property>
354
+ </widget>
355
+ </item>
356
+ </layout>
357
+ </item>
358
+ </layout>
359
+ </item>
360
+ </layout>
361
+ </widget>
362
+ <resources/>
363
+ <connections/>
364
+ </ui>
@@ -0,0 +1,122 @@
1
+ import importlib.resources
2
+
3
+ from pygments import highlight, lexers, formatters
4
+ from PyQt6 import uic, QtCore, QtWidgets
5
+
6
+
7
+ class LogPanel(QtWidgets.QWidget):
8
+ """Log panel widget
9
+
10
+ Visualizes logs stored in the .rtdc file
11
+ """
12
+
13
+ def __init__(self, *args, **kwargs):
14
+ super(LogPanel, self).__init__(*args, **kwargs)
15
+ ref = importlib.resources.files(
16
+ "dcscope.gui.analysis") / "ana_log.ui"
17
+ with importlib.resources.as_file(ref) as path_ui:
18
+ uic.loadUi(path_ui, self)
19
+ # current DCscope pipeline
20
+ self._pipeline = None
21
+ self._selected_log = None
22
+ self.listWidget_dataset.currentRowChanged.connect(
23
+ self.on_select_dataset)
24
+ self.listWidget_log_name.currentRowChanged.connect(
25
+ self.on_select_log)
26
+ self.update_content()
27
+
28
+ @property
29
+ def pipeline(self):
30
+ return self._pipeline
31
+
32
+ @QtCore.pyqtSlot(int)
33
+ def on_select_dataset(self, ds_idx):
34
+ """Show the logs of the dataset in the right-hand list widget"""
35
+ self.listWidget_log_name.clear()
36
+ if ds_idx >= 0:
37
+ ds = self._pipeline.slots[ds_idx].get_dataset()
38
+ log_names = list(ds.logs.keys())
39
+ for log in log_names:
40
+ self.listWidget_log_name.addItem(log)
41
+
42
+ # Apply previously selected log
43
+ if self._selected_log in log_names:
44
+ log_idx = log_names.index(self._selected_log)
45
+ self.listWidget_log_name.setCurrentRow(log_idx)
46
+ elif len(log_names):
47
+ self.listWidget_log_name.setCurrentRow(0)
48
+
49
+ @QtCore.pyqtSlot(int)
50
+ def on_select_log(self, log_index):
51
+ """Show the logs of the dataset in the right-hand list widget"""
52
+ ds_idx = self.listWidget_dataset.currentRow()
53
+ if ds_idx >= 0:
54
+ ds = self._pipeline.slots[ds_idx].get_dataset()
55
+ lines = ds.logs[list(ds.logs.keys())[log_index]]
56
+
57
+ if lines[0].strip() == "{" and lines[-1].strip() == "}":
58
+ # JSON
59
+ text = highlight("\n".join(lines),
60
+ lexers.JsonLexer(),
61
+ formatters.HtmlFormatter(full=True,
62
+ noclasses=True,
63
+ nobackground=True))
64
+ else:
65
+ # Normal log
66
+ linetypes = ["n"] * len(lines)
67
+ for ii, line in enumerate(lines):
68
+ if line.count("ERROR"):
69
+ linetypes[ii] = "e"
70
+ # consecutive lines are also errors
71
+ for jj in range(ii+1, len(lines)):
72
+ if lines[jj].startswith("..."):
73
+ linetypes[jj] = "e"
74
+ else:
75
+ break
76
+ elif line.count("WARNING"):
77
+ linetypes[ii] = "w"
78
+ # consecutive lines are also errors
79
+ for jj in range(ii+1, len(lines)):
80
+ if lines[jj].startswith("..."):
81
+ linetypes[jj] = "w"
82
+ else:
83
+ break
84
+
85
+ for ii, lt in enumerate(linetypes):
86
+ if lt == "e":
87
+ lines[ii] = \
88
+ f"<div style='color:#A60000'>{lines[ii]}</div>"
89
+ elif lt == "w":
90
+ lines[ii] = \
91
+ f"<div style='color:#7C4B00'>{lines[ii]}</div>"
92
+ else:
93
+ lines[ii] = f"<div>{lines[ii]}</div>"
94
+
95
+ text = "\n".join(lines)
96
+
97
+ self.textEdit.setText(text)
98
+ else:
99
+ self.listWidget_log_name.clear()
100
+ self.textEdit.clear()
101
+
102
+ def set_pipeline(self, pipeline):
103
+ self._pipeline = pipeline
104
+
105
+ def update_content(self, slot_index=None, **kwargs):
106
+ if self._pipeline and self._pipeline.slots:
107
+ self.setEnabled(True)
108
+ self.setUpdatesEnabled(False)
109
+ self.listWidget_dataset.clear()
110
+ self.listWidget_log_name.clear()
111
+ for slot in self._pipeline.slots:
112
+ self.listWidget_dataset.addItem(slot.name)
113
+ self.setUpdatesEnabled(True)
114
+ if slot_index is None or slot_index < 0:
115
+ slot_index = max(0, self.listWidget_dataset.currentRow())
116
+ slot_index = min(slot_index, self._pipeline.num_slots - 1)
117
+ self.listWidget_dataset.setCurrentRow(slot_index)
118
+ else:
119
+ self.setEnabled(False)
120
+ self.listWidget_dataset.clear()
121
+ self.listWidget_log_name.clear()
122
+ self.textEdit.clear()
@@ -0,0 +1,100 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>Form</class>
4
+ <widget class="QWidget" name="Form">
5
+ <property name="geometry">
6
+ <rect>
7
+ <x>0</x>
8
+ <y>0</y>
9
+ <width>701</width>
10
+ <height>538</height>
11
+ </rect>
12
+ </property>
13
+ <property name="windowTitle">
14
+ <string>Form</string>
15
+ </property>
16
+ <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,1">
17
+ <item>
18
+ <layout class="QHBoxLayout" name="horizontalLayout">
19
+ <item>
20
+ <layout class="QVBoxLayout" name="verticalLayout_2">
21
+ <item>
22
+ <widget class="QLabel" name="label">
23
+ <property name="text">
24
+ <string>Dataset</string>
25
+ </property>
26
+ </widget>
27
+ </item>
28
+ <item>
29
+ <widget class="QListWidget" name="listWidget_dataset">
30
+ <property name="minimumSize">
31
+ <size>
32
+ <width>200</width>
33
+ <height>0</height>
34
+ </size>
35
+ </property>
36
+ <property name="showDropIndicator" stdset="0">
37
+ <bool>false</bool>
38
+ </property>
39
+ <property name="alternatingRowColors">
40
+ <bool>true</bool>
41
+ </property>
42
+ <property name="selectionBehavior">
43
+ <enum>QAbstractItemView::SelectionBehavior::SelectRows</enum>
44
+ </property>
45
+ </widget>
46
+ </item>
47
+ </layout>
48
+ </item>
49
+ <item>
50
+ <layout class="QVBoxLayout" name="verticalLayout_3">
51
+ <item>
52
+ <widget class="QLabel" name="label_2">
53
+ <property name="text">
54
+ <string>Log Name</string>
55
+ </property>
56
+ </widget>
57
+ </item>
58
+ <item>
59
+ <widget class="QListWidget" name="listWidget_log_name">
60
+ <property name="showDropIndicator" stdset="0">
61
+ <bool>false</bool>
62
+ </property>
63
+ <property name="alternatingRowColors">
64
+ <bool>true</bool>
65
+ </property>
66
+ <property name="selectionBehavior">
67
+ <enum>QAbstractItemView::SelectionBehavior::SelectRows</enum>
68
+ </property>
69
+ </widget>
70
+ </item>
71
+ </layout>
72
+ </item>
73
+ </layout>
74
+ </item>
75
+ <item>
76
+ <widget class="Line" name="line">
77
+ <property name="orientation">
78
+ <enum>Qt::Orientation::Horizontal</enum>
79
+ </property>
80
+ </widget>
81
+ </item>
82
+ <item>
83
+ <widget class="QLabel" name="label_3">
84
+ <property name="text">
85
+ <string>Log</string>
86
+ </property>
87
+ </widget>
88
+ </item>
89
+ <item>
90
+ <widget class="QTextEdit" name="textEdit">
91
+ <property name="readOnly">
92
+ <bool>true</bool>
93
+ </property>
94
+ </widget>
95
+ </item>
96
+ </layout>
97
+ </widget>
98
+ <resources/>
99
+ <connections/>
100
+ </ui>