bec-widgets 0.87.0__py3-none-any.whl → 0.88.0__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.
- CHANGELOG.md +66 -70
- PKG-INFO +1 -1
- bec_widgets/assets/designer_icons/BECWaveformWidget.png +0 -0
- bec_widgets/assets/designer_icons/colormap_selector.png +0 -0
- bec_widgets/assets/toolbar_icons/add.svg +3 -0
- bec_widgets/assets/toolbar_icons/auto_range.svg +3 -0
- bec_widgets/assets/toolbar_icons/drag_pan_mode.svg +3 -0
- bec_widgets/assets/toolbar_icons/export.svg +9 -0
- bec_widgets/assets/toolbar_icons/fitting_parameters.svg +3 -0
- bec_widgets/assets/toolbar_icons/import.svg +9 -0
- bec_widgets/assets/toolbar_icons/line_axis.svg +3 -0
- bec_widgets/assets/toolbar_icons/photo_library.svg +3 -0
- bec_widgets/assets/toolbar_icons/rectangle_mode.svg +3 -0
- bec_widgets/assets/toolbar_icons/remove.svg +5 -0
- bec_widgets/assets/toolbar_icons/save.svg +3 -0
- bec_widgets/assets/toolbar_icons/settings.svg +4 -0
- bec_widgets/cli/client.py +307 -5
- bec_widgets/cli/server.py +2 -1
- bec_widgets/examples/jupyter_console/jupyter_console_window.py +13 -7
- bec_widgets/examples/plugin_example_pyside/tictactoe.py +1 -0
- bec_widgets/utils/bec_connector.py +19 -18
- bec_widgets/utils/bec_widget.py +19 -4
- bec_widgets/widgets/base_classes/device_input_base.py +3 -5
- bec_widgets/widgets/bec_queue/bec_queue.py +3 -2
- bec_widgets/widgets/bec_status_box/bec_status_box.py +2 -11
- bec_widgets/widgets/{color_map_selector/color_map_selector.py → colormap_selector/colormap_selector.py} +3 -1
- bec_widgets/widgets/colormap_selector/colormap_selector.pyproject +1 -0
- bec_widgets/widgets/{color_map_selector/color_map_selector_plugin.py → colormap_selector/colormap_selector_plugin.py} +8 -6
- bec_widgets/widgets/{color_map_selector/register_color_map_selector.py → colormap_selector/register_colormap_selector.py} +1 -1
- bec_widgets/widgets/device_box/device_box.py +2 -2
- bec_widgets/widgets/device_combobox/device_combobox.py +1 -8
- bec_widgets/widgets/device_line_edit/device_line_edit.py +2 -9
- bec_widgets/widgets/dock/dock.py +8 -6
- bec_widgets/widgets/dock/dock_area.py +4 -2
- bec_widgets/widgets/figure/figure.py +16 -8
- bec_widgets/widgets/figure/plots/axis_settings.py +38 -11
- bec_widgets/widgets/figure/plots/image/image.py +2 -4
- bec_widgets/widgets/figure/plots/motor_map/motor_map.py +1 -1
- bec_widgets/widgets/figure/plots/plot_base.py +7 -8
- bec_widgets/widgets/figure/plots/waveform/waveform.py +49 -53
- bec_widgets/widgets/figure/plots/waveform/waveform_curve.py +10 -1
- bec_widgets/widgets/jupyter_console/jupyter_console.py +6 -0
- bec_widgets/widgets/motor_map/bec_motor_map_widget_plugin.py +1 -1
- bec_widgets/widgets/motor_map/motor_map_widget.py +9 -6
- bec_widgets/widgets/ring_progress_bar/ring.py +0 -4
- bec_widgets/widgets/ring_progress_bar/ring_progress_bar.py +8 -8
- bec_widgets/widgets/scan_control/scan_control.py +2 -6
- bec_widgets/widgets/stop_button/stop_button.py +2 -2
- bec_widgets/widgets/text_box/text_box.py +3 -2
- bec_widgets/widgets/waveform/__init__.py +0 -0
- bec_widgets/widgets/waveform/bec_waveform_widget.pyproject +1 -0
- bec_widgets/widgets/waveform/bec_waveform_widget_plugin.py +59 -0
- bec_widgets/widgets/waveform/register_bec_waveform_widget.py +15 -0
- bec_widgets/widgets/waveform/waveform_toolbar/__init__.py +0 -0
- bec_widgets/widgets/waveform/waveform_toolbar/curve_dialog/__init__.py +0 -0
- bec_widgets/widgets/waveform/waveform_toolbar/curve_dialog/curve_dialog.py +341 -0
- bec_widgets/widgets/waveform/waveform_toolbar/curve_dialog/curve_dialog.ui +358 -0
- bec_widgets/widgets/waveform/waveform_toolbar/dap_summary_dialog/__init__.py +0 -0
- bec_widgets/widgets/waveform/waveform_toolbar/dap_summary_dialog/dap_summary.ui +127 -0
- bec_widgets/widgets/waveform/waveform_toolbar/dap_summary_dialog/dap_summary_dialog.py +69 -0
- bec_widgets/widgets/waveform/waveform_toolbar/waveform_toolbar.py +117 -0
- bec_widgets/widgets/waveform/waveform_widget.py +571 -0
- bec_widgets/widgets/website/website.py +2 -2
- {bec_widgets-0.87.0.dist-info → bec_widgets-0.88.0.dist-info}/METADATA +1 -1
- {bec_widgets-0.87.0.dist-info → bec_widgets-0.88.0.dist-info}/RECORD +75 -48
- pyproject.toml +1 -1
- tests/unit_tests/test_color_map_selector.py +1 -1
- tests/unit_tests/test_device_input_base.py +10 -4
- tests/unit_tests/test_waveform_widget.py +264 -0
- bec_widgets/widgets/color_map_selector/assets/color_map_selector_icon.png +0 -0
- bec_widgets/widgets/color_map_selector/color_map_selector.pyproject +0 -1
- /bec_widgets/assets/{bec_widgets_icon.png → app_icons/bec_widgets_icon.png} +0 -0
- /bec_widgets/assets/{terminal_icon.png → app_icons/terminal_icon.png} +0 -0
- /bec_widgets/widgets/{color_map_selector → colormap_selector}/__init__.py +0 -0
- {bec_widgets-0.87.0.dist-info → bec_widgets-0.88.0.dist-info}/WHEEL +0 -0
- {bec_widgets-0.87.0.dist-info → bec_widgets-0.88.0.dist-info}/entry_points.txt +0 -0
- {bec_widgets-0.87.0.dist-info → bec_widgets-0.88.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,358 @@
|
|
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>720</width>
|
10
|
+
<height>806</height>
|
11
|
+
</rect>
|
12
|
+
</property>
|
13
|
+
<property name="windowTitle">
|
14
|
+
<string>Form</string>
|
15
|
+
</property>
|
16
|
+
<layout class="QVBoxLayout" name="verticalLayout_2">
|
17
|
+
<property name="leftMargin">
|
18
|
+
<number>2</number>
|
19
|
+
</property>
|
20
|
+
<property name="topMargin">
|
21
|
+
<number>2</number>
|
22
|
+
</property>
|
23
|
+
<property name="rightMargin">
|
24
|
+
<number>2</number>
|
25
|
+
</property>
|
26
|
+
<property name="bottomMargin">
|
27
|
+
<number>2</number>
|
28
|
+
</property>
|
29
|
+
<item>
|
30
|
+
<widget class="QGroupBox" name="x_group_box">
|
31
|
+
<property name="title">
|
32
|
+
<string>X Axis</string>
|
33
|
+
</property>
|
34
|
+
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0,1,3,1,3">
|
35
|
+
<item>
|
36
|
+
<widget class="QLabel" name="x_mode_label">
|
37
|
+
<property name="text">
|
38
|
+
<string>X Axis Mode</string>
|
39
|
+
</property>
|
40
|
+
</widget>
|
41
|
+
</item>
|
42
|
+
<item>
|
43
|
+
<widget class="QComboBox" name="x_mode">
|
44
|
+
<property name="minimumSize">
|
45
|
+
<size>
|
46
|
+
<width>150</width>
|
47
|
+
<height>26</height>
|
48
|
+
</size>
|
49
|
+
</property>
|
50
|
+
<item>
|
51
|
+
<property name="text">
|
52
|
+
<string>best_effort</string>
|
53
|
+
</property>
|
54
|
+
</item>
|
55
|
+
<item>
|
56
|
+
<property name="text">
|
57
|
+
<string>device</string>
|
58
|
+
</property>
|
59
|
+
</item>
|
60
|
+
<item>
|
61
|
+
<property name="text">
|
62
|
+
<string>index</string>
|
63
|
+
</property>
|
64
|
+
</item>
|
65
|
+
<item>
|
66
|
+
<property name="text">
|
67
|
+
<string>timestamp</string>
|
68
|
+
</property>
|
69
|
+
</item>
|
70
|
+
</widget>
|
71
|
+
</item>
|
72
|
+
<item>
|
73
|
+
<spacer name="horizontalSpacer_3">
|
74
|
+
<property name="orientation">
|
75
|
+
<enum>Qt::Orientation::Horizontal</enum>
|
76
|
+
</property>
|
77
|
+
<property name="sizeHint" stdset="0">
|
78
|
+
<size>
|
79
|
+
<width>40</width>
|
80
|
+
<height>20</height>
|
81
|
+
</size>
|
82
|
+
</property>
|
83
|
+
</spacer>
|
84
|
+
</item>
|
85
|
+
<item>
|
86
|
+
<spacer name="horizontalSpacer_4">
|
87
|
+
<property name="orientation">
|
88
|
+
<enum>Qt::Orientation::Horizontal</enum>
|
89
|
+
</property>
|
90
|
+
<property name="sizeHint" stdset="0">
|
91
|
+
<size>
|
92
|
+
<width>40</width>
|
93
|
+
<height>20</height>
|
94
|
+
</size>
|
95
|
+
</property>
|
96
|
+
</spacer>
|
97
|
+
</item>
|
98
|
+
<item>
|
99
|
+
<widget class="QLabel" name="x_name_label">
|
100
|
+
<property name="text">
|
101
|
+
<string>Name</string>
|
102
|
+
</property>
|
103
|
+
</widget>
|
104
|
+
</item>
|
105
|
+
<item>
|
106
|
+
<widget class="DeviceLineEdit" name="x_name"/>
|
107
|
+
</item>
|
108
|
+
<item>
|
109
|
+
<widget class="QLabel" name="x_entry_label">
|
110
|
+
<property name="text">
|
111
|
+
<string>Entry</string>
|
112
|
+
</property>
|
113
|
+
</widget>
|
114
|
+
</item>
|
115
|
+
<item>
|
116
|
+
<widget class="QLineEdit" name="x_entry"/>
|
117
|
+
</item>
|
118
|
+
</layout>
|
119
|
+
</widget>
|
120
|
+
</item>
|
121
|
+
<item>
|
122
|
+
<widget class="QGroupBox" name="y_group_box">
|
123
|
+
<property name="title">
|
124
|
+
<string>Y Axis</string>
|
125
|
+
</property>
|
126
|
+
<layout class="QVBoxLayout" name="verticalLayout">
|
127
|
+
<item>
|
128
|
+
<widget class="QTabWidget" name="tabWidget">
|
129
|
+
<property name="currentIndex">
|
130
|
+
<number>0</number>
|
131
|
+
</property>
|
132
|
+
<widget class="QWidget" name="tab_scan">
|
133
|
+
<attribute name="title">
|
134
|
+
<string>Scan</string>
|
135
|
+
</attribute>
|
136
|
+
<layout class="QGridLayout" name="gridLayout">
|
137
|
+
<property name="leftMargin">
|
138
|
+
<number>5</number>
|
139
|
+
</property>
|
140
|
+
<property name="topMargin">
|
141
|
+
<number>5</number>
|
142
|
+
</property>
|
143
|
+
<property name="rightMargin">
|
144
|
+
<number>5</number>
|
145
|
+
</property>
|
146
|
+
<property name="bottomMargin">
|
147
|
+
<number>5</number>
|
148
|
+
</property>
|
149
|
+
<item row="0" column="2">
|
150
|
+
<widget class="QPushButton" name="normalize_colors_scan">
|
151
|
+
<property name="text">
|
152
|
+
<string>Normalize Colors</string>
|
153
|
+
</property>
|
154
|
+
</widget>
|
155
|
+
</item>
|
156
|
+
<item row="1" column="0" colspan="4">
|
157
|
+
<widget class="QTableWidget" name="scan_table">
|
158
|
+
<property name="rowCount">
|
159
|
+
<number>0</number>
|
160
|
+
</property>
|
161
|
+
<attribute name="horizontalHeaderCascadingSectionResizes">
|
162
|
+
<bool>false</bool>
|
163
|
+
</attribute>
|
164
|
+
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
165
|
+
<bool>true</bool>
|
166
|
+
</attribute>
|
167
|
+
<attribute name="horizontalHeaderStretchLastSection">
|
168
|
+
<bool>true</bool>
|
169
|
+
</attribute>
|
170
|
+
<attribute name="verticalHeaderStretchLastSection">
|
171
|
+
<bool>false</bool>
|
172
|
+
</attribute>
|
173
|
+
<column>
|
174
|
+
<property name="text">
|
175
|
+
<string>Name</string>
|
176
|
+
</property>
|
177
|
+
</column>
|
178
|
+
<column>
|
179
|
+
<property name="text">
|
180
|
+
<string>Entry</string>
|
181
|
+
</property>
|
182
|
+
</column>
|
183
|
+
<column>
|
184
|
+
<property name="text">
|
185
|
+
<string>Color</string>
|
186
|
+
</property>
|
187
|
+
</column>
|
188
|
+
<column>
|
189
|
+
<property name="text">
|
190
|
+
<string>Style</string>
|
191
|
+
</property>
|
192
|
+
</column>
|
193
|
+
<column>
|
194
|
+
<property name="text">
|
195
|
+
<string>Width</string>
|
196
|
+
</property>
|
197
|
+
</column>
|
198
|
+
<column>
|
199
|
+
<property name="text">
|
200
|
+
<string>Symbol Size</string>
|
201
|
+
</property>
|
202
|
+
</column>
|
203
|
+
<column>
|
204
|
+
<property name="text">
|
205
|
+
<string>Delete</string>
|
206
|
+
</property>
|
207
|
+
</column>
|
208
|
+
</widget>
|
209
|
+
</item>
|
210
|
+
<item row="0" column="1">
|
211
|
+
<spacer name="horizontalSpacer">
|
212
|
+
<property name="orientation">
|
213
|
+
<enum>Qt::Orientation::Horizontal</enum>
|
214
|
+
</property>
|
215
|
+
<property name="sizeHint" stdset="0">
|
216
|
+
<size>
|
217
|
+
<width>40</width>
|
218
|
+
<height>20</height>
|
219
|
+
</size>
|
220
|
+
</property>
|
221
|
+
</spacer>
|
222
|
+
</item>
|
223
|
+
<item row="0" column="0">
|
224
|
+
<widget class="QPushButton" name="add_curve">
|
225
|
+
<property name="toolTip">
|
226
|
+
<string/>
|
227
|
+
</property>
|
228
|
+
<property name="text">
|
229
|
+
<string/>
|
230
|
+
</property>
|
231
|
+
</widget>
|
232
|
+
</item>
|
233
|
+
<item row="0" column="3">
|
234
|
+
<widget class="ColormapSelector" name="color_map_selector_scan"/>
|
235
|
+
</item>
|
236
|
+
</layout>
|
237
|
+
</widget>
|
238
|
+
<widget class="QWidget" name="tab_DAP">
|
239
|
+
<attribute name="title">
|
240
|
+
<string>DAP</string>
|
241
|
+
</attribute>
|
242
|
+
<layout class="QGridLayout" name="gridLayout_2">
|
243
|
+
<property name="leftMargin">
|
244
|
+
<number>5</number>
|
245
|
+
</property>
|
246
|
+
<property name="topMargin">
|
247
|
+
<number>5</number>
|
248
|
+
</property>
|
249
|
+
<property name="rightMargin">
|
250
|
+
<number>5</number>
|
251
|
+
</property>
|
252
|
+
<property name="bottomMargin">
|
253
|
+
<number>5</number>
|
254
|
+
</property>
|
255
|
+
<item row="1" column="0" colspan="4">
|
256
|
+
<widget class="QTableWidget" name="dap_table">
|
257
|
+
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
258
|
+
<bool>true</bool>
|
259
|
+
</attribute>
|
260
|
+
<attribute name="horizontalHeaderStretchLastSection">
|
261
|
+
<bool>true</bool>
|
262
|
+
</attribute>
|
263
|
+
<column>
|
264
|
+
<property name="text">
|
265
|
+
<string>Name</string>
|
266
|
+
</property>
|
267
|
+
</column>
|
268
|
+
<column>
|
269
|
+
<property name="text">
|
270
|
+
<string>Entry</string>
|
271
|
+
</property>
|
272
|
+
</column>
|
273
|
+
<column>
|
274
|
+
<property name="text">
|
275
|
+
<string>Model</string>
|
276
|
+
</property>
|
277
|
+
</column>
|
278
|
+
<column>
|
279
|
+
<property name="text">
|
280
|
+
<string>Color</string>
|
281
|
+
</property>
|
282
|
+
</column>
|
283
|
+
<column>
|
284
|
+
<property name="text">
|
285
|
+
<string>Style</string>
|
286
|
+
</property>
|
287
|
+
</column>
|
288
|
+
<column>
|
289
|
+
<property name="text">
|
290
|
+
<string>Width</string>
|
291
|
+
</property>
|
292
|
+
</column>
|
293
|
+
<column>
|
294
|
+
<property name="text">
|
295
|
+
<string>Symbol Size</string>
|
296
|
+
</property>
|
297
|
+
</column>
|
298
|
+
<column>
|
299
|
+
<property name="text">
|
300
|
+
<string>Delete</string>
|
301
|
+
</property>
|
302
|
+
</column>
|
303
|
+
</widget>
|
304
|
+
</item>
|
305
|
+
<item row="0" column="2">
|
306
|
+
<widget class="QPushButton" name="normalize_colors_dap">
|
307
|
+
<property name="text">
|
308
|
+
<string>Normalize Colors</string>
|
309
|
+
</property>
|
310
|
+
</widget>
|
311
|
+
</item>
|
312
|
+
<item row="0" column="1">
|
313
|
+
<spacer name="horizontalSpacer_2">
|
314
|
+
<property name="orientation">
|
315
|
+
<enum>Qt::Orientation::Horizontal</enum>
|
316
|
+
</property>
|
317
|
+
<property name="sizeHint" stdset="0">
|
318
|
+
<size>
|
319
|
+
<width>585</width>
|
320
|
+
<height>20</height>
|
321
|
+
</size>
|
322
|
+
</property>
|
323
|
+
</spacer>
|
324
|
+
</item>
|
325
|
+
<item row="0" column="0">
|
326
|
+
<widget class="QPushButton" name="add_dap">
|
327
|
+
<property name="text">
|
328
|
+
<string/>
|
329
|
+
</property>
|
330
|
+
</widget>
|
331
|
+
</item>
|
332
|
+
<item row="0" column="3">
|
333
|
+
<widget class="ColormapSelector" name="color_map_selector_dap"/>
|
334
|
+
</item>
|
335
|
+
</layout>
|
336
|
+
</widget>
|
337
|
+
</widget>
|
338
|
+
</item>
|
339
|
+
</layout>
|
340
|
+
</widget>
|
341
|
+
</item>
|
342
|
+
</layout>
|
343
|
+
</widget>
|
344
|
+
<customwidgets>
|
345
|
+
<customwidget>
|
346
|
+
<class>DeviceLineEdit</class>
|
347
|
+
<extends>QLineEdit</extends>
|
348
|
+
<header>device_line_edit</header>
|
349
|
+
</customwidget>
|
350
|
+
<customwidget>
|
351
|
+
<class>ColormapSelector</class>
|
352
|
+
<extends>QWidget</extends>
|
353
|
+
<header>colormap_selector</header>
|
354
|
+
</customwidget>
|
355
|
+
</customwidgets>
|
356
|
+
<resources/>
|
357
|
+
<connections/>
|
358
|
+
</ui>
|
File without changes
|
@@ -0,0 +1,127 @@
|
|
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>800</width>
|
10
|
+
<height>600</height>
|
11
|
+
</rect>
|
12
|
+
</property>
|
13
|
+
<property name="windowTitle">
|
14
|
+
<string>Form</string>
|
15
|
+
</property>
|
16
|
+
<layout class="QGridLayout" name="gridLayout">
|
17
|
+
<item row="0" column="0">
|
18
|
+
<widget class="QSplitter" name="splitter_2">
|
19
|
+
<property name="sizePolicy">
|
20
|
+
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
21
|
+
<horstretch>1</horstretch>
|
22
|
+
<verstretch>0</verstretch>
|
23
|
+
</sizepolicy>
|
24
|
+
</property>
|
25
|
+
<property name="frameShape">
|
26
|
+
<enum>QFrame::Shape::VLine</enum>
|
27
|
+
</property>
|
28
|
+
<property name="frameShadow">
|
29
|
+
<enum>QFrame::Shadow::Plain</enum>
|
30
|
+
</property>
|
31
|
+
<property name="lineWidth">
|
32
|
+
<number>1</number>
|
33
|
+
</property>
|
34
|
+
<property name="orientation">
|
35
|
+
<enum>Qt::Orientation::Horizontal</enum>
|
36
|
+
</property>
|
37
|
+
<property name="opaqueResize">
|
38
|
+
<bool>true</bool>
|
39
|
+
</property>
|
40
|
+
<property name="childrenCollapsible">
|
41
|
+
<bool>true</bool>
|
42
|
+
</property>
|
43
|
+
<widget class="QGroupBox" name="group_curve_selection">
|
44
|
+
<property name="title">
|
45
|
+
<string>Select Curve</string>
|
46
|
+
</property>
|
47
|
+
<layout class="QVBoxLayout" name="verticalLayout">
|
48
|
+
<item>
|
49
|
+
<widget class="QPushButton" name="refresh_button">
|
50
|
+
<property name="text">
|
51
|
+
<string>Refresh DAP Summary</string>
|
52
|
+
</property>
|
53
|
+
</widget>
|
54
|
+
</item>
|
55
|
+
<item>
|
56
|
+
<widget class="QListWidget" name="curve_list"/>
|
57
|
+
</item>
|
58
|
+
</layout>
|
59
|
+
</widget>
|
60
|
+
<widget class="QSplitter" name="splitter">
|
61
|
+
<property name="sizePolicy">
|
62
|
+
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
63
|
+
<horstretch>2</horstretch>
|
64
|
+
<verstretch>0</verstretch>
|
65
|
+
</sizepolicy>
|
66
|
+
</property>
|
67
|
+
<property name="orientation">
|
68
|
+
<enum>Qt::Orientation::Vertical</enum>
|
69
|
+
</property>
|
70
|
+
<widget class="QGroupBox" name="group_summary">
|
71
|
+
<property name="title">
|
72
|
+
<string>Fit Summary</string>
|
73
|
+
</property>
|
74
|
+
<layout class="QVBoxLayout" name="verticalLayout_2">
|
75
|
+
<item>
|
76
|
+
<widget class="QTreeWidget" name="summary_tree">
|
77
|
+
<property name="uniformRowHeights">
|
78
|
+
<bool>false</bool>
|
79
|
+
</property>
|
80
|
+
<column>
|
81
|
+
<property name="text">
|
82
|
+
<string>Property</string>
|
83
|
+
</property>
|
84
|
+
</column>
|
85
|
+
<column>
|
86
|
+
<property name="text">
|
87
|
+
<string>Value</string>
|
88
|
+
</property>
|
89
|
+
</column>
|
90
|
+
</widget>
|
91
|
+
</item>
|
92
|
+
</layout>
|
93
|
+
</widget>
|
94
|
+
<widget class="QGroupBox" name="group_parameters">
|
95
|
+
<property name="title">
|
96
|
+
<string>Parameter Details</string>
|
97
|
+
</property>
|
98
|
+
<layout class="QVBoxLayout" name="verticalLayout_3">
|
99
|
+
<item>
|
100
|
+
<widget class="QTreeWidget" name="param_tree">
|
101
|
+
<column>
|
102
|
+
<property name="text">
|
103
|
+
<string>Parameter</string>
|
104
|
+
</property>
|
105
|
+
</column>
|
106
|
+
<column>
|
107
|
+
<property name="text">
|
108
|
+
<string>Value</string>
|
109
|
+
</property>
|
110
|
+
</column>
|
111
|
+
<column>
|
112
|
+
<property name="text">
|
113
|
+
<string>Std</string>
|
114
|
+
</property>
|
115
|
+
</column>
|
116
|
+
</widget>
|
117
|
+
</item>
|
118
|
+
</layout>
|
119
|
+
</widget>
|
120
|
+
</widget>
|
121
|
+
</widget>
|
122
|
+
</item>
|
123
|
+
</layout>
|
124
|
+
</widget>
|
125
|
+
<resources/>
|
126
|
+
<connections/>
|
127
|
+
</ui>
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import os
|
2
|
+
|
3
|
+
from qtpy.QtCore import Slot
|
4
|
+
from qtpy.QtWidgets import QDialog, QTreeWidgetItem, QVBoxLayout
|
5
|
+
|
6
|
+
from bec_widgets.utils import UILoader
|
7
|
+
|
8
|
+
|
9
|
+
class FitSummaryWidget(QDialog):
|
10
|
+
def __init__(self, parent=None, target_widget=None):
|
11
|
+
super().__init__(parent=parent)
|
12
|
+
|
13
|
+
self.target_widget = target_widget
|
14
|
+
self.summary_data = self.target_widget.get_dap_summary()
|
15
|
+
|
16
|
+
self.setModal(True)
|
17
|
+
|
18
|
+
current_path = os.path.dirname(__file__)
|
19
|
+
self.ui = UILoader(self).loader(os.path.join(current_path, "dap_summary.ui"))
|
20
|
+
self.layout = QVBoxLayout(self)
|
21
|
+
self.layout.addWidget(self.ui)
|
22
|
+
|
23
|
+
self.ui.curve_list.currentItemChanged.connect(self.display_fit_details)
|
24
|
+
self.ui.refresh_button.clicked.connect(self.refresh_dap)
|
25
|
+
|
26
|
+
self.populate_curve_list()
|
27
|
+
|
28
|
+
def populate_curve_list(self):
|
29
|
+
for curve_name in self.summary_data.keys():
|
30
|
+
self.ui.curve_list.addItem(curve_name)
|
31
|
+
|
32
|
+
def display_fit_details(self, current):
|
33
|
+
if current:
|
34
|
+
curve_name = current.text()
|
35
|
+
data = self.summary_data[curve_name]
|
36
|
+
if data is None:
|
37
|
+
return
|
38
|
+
self.refresh_trees(data)
|
39
|
+
|
40
|
+
@Slot()
|
41
|
+
def refresh_dap(self):
|
42
|
+
self.ui.curve_list.clear()
|
43
|
+
self.summary_data = self.target_widget.get_dap_summary()
|
44
|
+
self.populate_curve_list()
|
45
|
+
|
46
|
+
def refresh_trees(self, data):
|
47
|
+
self.update_summary_tree(data)
|
48
|
+
self.update_param_tree(data["params"])
|
49
|
+
|
50
|
+
def update_summary_tree(self, data):
|
51
|
+
self.ui.summary_tree.clear()
|
52
|
+
properties = [
|
53
|
+
("Model", data.get("model", "")),
|
54
|
+
("Method", data.get("method", "")),
|
55
|
+
("Chi-Squared", str(data.get("chisqr", ""))),
|
56
|
+
("Reduced Chi-Squared", str(data.get("redchi", ""))),
|
57
|
+
("AIC", str(data.get("aic", ""))),
|
58
|
+
("BIC", str(data.get("bic", ""))),
|
59
|
+
("R-Squared", str(data.get("rsquared", ""))),
|
60
|
+
("Message", data.get("message", "")),
|
61
|
+
]
|
62
|
+
for prop, val in properties:
|
63
|
+
QTreeWidgetItem(self.ui.summary_tree, [prop, val])
|
64
|
+
|
65
|
+
def update_param_tree(self, params):
|
66
|
+
self.ui.param_tree.clear()
|
67
|
+
for param in params:
|
68
|
+
param_name, param_value, param_std = param[0], str(param[1]), str(param[7])
|
69
|
+
QTreeWidgetItem(self.ui.param_tree, [param_name, param_value, param_std])
|
@@ -0,0 +1,117 @@
|
|
1
|
+
import os
|
2
|
+
|
3
|
+
from qtpy.QtCore import QSize
|
4
|
+
from qtpy.QtGui import QAction, QIcon
|
5
|
+
|
6
|
+
import bec_widgets
|
7
|
+
from bec_widgets.qt_utils.toolbar import ToolBarAction
|
8
|
+
|
9
|
+
MODULE_PATH = os.path.dirname(bec_widgets.__file__)
|
10
|
+
|
11
|
+
|
12
|
+
class SaveAction(ToolBarAction):
|
13
|
+
def add_to_toolbar(self, toolbar, target):
|
14
|
+
icon = QIcon()
|
15
|
+
icon.addFile(
|
16
|
+
os.path.join(MODULE_PATH, "assets", "toolbar_icons", "save.svg"), size=QSize(20, 20)
|
17
|
+
)
|
18
|
+
self.action = QAction(icon, "Open Export Dialog", target)
|
19
|
+
toolbar.addAction(self.action)
|
20
|
+
|
21
|
+
|
22
|
+
class MatplotlibAction(ToolBarAction):
|
23
|
+
def add_to_toolbar(self, toolbar, target):
|
24
|
+
icon = QIcon()
|
25
|
+
icon.addFile(
|
26
|
+
os.path.join(MODULE_PATH, "assets", "toolbar_icons", "photo_library.svg"),
|
27
|
+
size=QSize(20, 20),
|
28
|
+
)
|
29
|
+
self.action = QAction(icon, "Open Matplotlib Plot", target)
|
30
|
+
toolbar.addAction(self.action)
|
31
|
+
|
32
|
+
|
33
|
+
class DragModeAction(ToolBarAction):
|
34
|
+
def add_to_toolbar(self, toolbar, target):
|
35
|
+
icon = QIcon()
|
36
|
+
icon.addFile(
|
37
|
+
os.path.join(MODULE_PATH, "assets", "toolbar_icons", "drag_pan_mode.svg"),
|
38
|
+
size=QSize(20, 20),
|
39
|
+
)
|
40
|
+
self.action = QAction(icon, "Drag Mouse Mode", target)
|
41
|
+
self.action.setCheckable(True)
|
42
|
+
toolbar.addAction(self.action)
|
43
|
+
|
44
|
+
|
45
|
+
class RectangeModeAction(ToolBarAction):
|
46
|
+
def add_to_toolbar(self, toolbar, target):
|
47
|
+
icon = QIcon()
|
48
|
+
icon.addFile(
|
49
|
+
os.path.join(MODULE_PATH, "assets", "toolbar_icons", "rectangle_mode.svg"),
|
50
|
+
size=QSize(20, 20),
|
51
|
+
)
|
52
|
+
self.action = QAction(icon, "Rectangle Zoom Mode", target)
|
53
|
+
self.action.setCheckable(True)
|
54
|
+
toolbar.addAction(self.action)
|
55
|
+
|
56
|
+
|
57
|
+
class AutoRangeAction(ToolBarAction):
|
58
|
+
def add_to_toolbar(self, toolbar, target):
|
59
|
+
icon = QIcon()
|
60
|
+
icon.addFile(
|
61
|
+
os.path.join(MODULE_PATH, "assets", "toolbar_icons", "auto_range.svg"),
|
62
|
+
size=QSize(20, 20),
|
63
|
+
)
|
64
|
+
self.action = QAction(icon, "Autorange Plot", target)
|
65
|
+
toolbar.addAction(self.action)
|
66
|
+
|
67
|
+
|
68
|
+
class CurveAction(ToolBarAction):
|
69
|
+
def add_to_toolbar(self, toolbar, target):
|
70
|
+
icon = QIcon()
|
71
|
+
icon.addFile(
|
72
|
+
os.path.join(MODULE_PATH, "assets", "toolbar_icons", "line_axis.svg"),
|
73
|
+
size=QSize(20, 20),
|
74
|
+
)
|
75
|
+
self.action = QAction(icon, "Open Curves Configuration", target)
|
76
|
+
toolbar.addAction(self.action)
|
77
|
+
|
78
|
+
|
79
|
+
class FitParamsAction(ToolBarAction):
|
80
|
+
def add_to_toolbar(self, toolbar, target):
|
81
|
+
icon = QIcon()
|
82
|
+
icon.addFile(
|
83
|
+
os.path.join(MODULE_PATH, "assets", "toolbar_icons", "fitting_parameters.svg"),
|
84
|
+
size=QSize(20, 20),
|
85
|
+
)
|
86
|
+
self.action = QAction(icon, "Open Fitting Parameters", target)
|
87
|
+
toolbar.addAction(self.action)
|
88
|
+
|
89
|
+
|
90
|
+
class SettingsAction(ToolBarAction):
|
91
|
+
def add_to_toolbar(self, toolbar, target):
|
92
|
+
icon = QIcon()
|
93
|
+
icon.addFile(
|
94
|
+
os.path.join(MODULE_PATH, "assets", "toolbar_icons", "settings.svg"), size=QSize(20, 20)
|
95
|
+
)
|
96
|
+
self.action = QAction(icon, "Open Configuration Dialog", target)
|
97
|
+
toolbar.addAction(self.action)
|
98
|
+
|
99
|
+
|
100
|
+
class ImportAction(ToolBarAction):
|
101
|
+
def add_to_toolbar(self, toolbar, target):
|
102
|
+
icon = QIcon()
|
103
|
+
icon.addFile(
|
104
|
+
os.path.join(MODULE_PATH, "assets", "toolbar_icons", "import.svg"), size=QSize(20, 20)
|
105
|
+
)
|
106
|
+
self.action = QAction(icon, "Import Configuration from YAML", target)
|
107
|
+
toolbar.addAction(self.action)
|
108
|
+
|
109
|
+
|
110
|
+
class ExportAction(ToolBarAction):
|
111
|
+
def add_to_toolbar(self, toolbar, target):
|
112
|
+
icon = QIcon()
|
113
|
+
icon.addFile(
|
114
|
+
os.path.join(MODULE_PATH, "assets", "toolbar_icons", "export.svg"), size=QSize(20, 20)
|
115
|
+
)
|
116
|
+
self.action = QAction(icon, "Export Current Configuration to YAML", target)
|
117
|
+
toolbar.addAction(self.action)
|