bec-widgets 0.55.0__py3-none-any.whl → 0.56.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 (44) hide show
  1. .gitlab-ci.yml +113 -8
  2. CHANGELOG.md +34 -28
  3. PKG-INFO +3 -1
  4. bec_widgets/examples/jupyter_console/jupyter_console_window.py +28 -38
  5. bec_widgets/examples/motor_movement/motor_control_compilations.py +1 -7
  6. bec_widgets/utils/__init__.py +1 -0
  7. bec_widgets/utils/crosshair.py +13 -9
  8. bec_widgets/utils/ui_loader.py +58 -0
  9. bec_widgets/widgets/motor_control/motor_table/motor_table.py +44 -43
  10. bec_widgets/widgets/motor_control/movement_absolute/movement_absolute.py +25 -23
  11. bec_widgets/widgets/motor_control/movement_relative/movement_relative.py +51 -48
  12. bec_widgets/widgets/spiral_progress_bar/ring.py +5 -5
  13. {bec_widgets-0.55.0.dist-info → bec_widgets-0.56.1.dist-info}/METADATA +3 -1
  14. {bec_widgets-0.55.0.dist-info → bec_widgets-0.56.1.dist-info}/RECORD +22 -43
  15. docs/user/apps.md +1 -26
  16. pyproject.toml +2 -1
  17. tests/end-2-end/test_bec_dock_rpc_e2e.py +1 -1
  18. tests/unit_tests/test_client_utils.py +2 -2
  19. tests/unit_tests/test_crosshair.py +5 -5
  20. tests/unit_tests/test_motor_control.py +49 -45
  21. bec_widgets/examples/eiger_plot/__init__.py +0 -0
  22. bec_widgets/examples/eiger_plot/eiger_plot.py +0 -307
  23. bec_widgets/examples/eiger_plot/eiger_plot.ui +0 -207
  24. bec_widgets/examples/mca_readout/__init__.py +0 -0
  25. bec_widgets/examples/mca_readout/mca_plot.py +0 -159
  26. bec_widgets/examples/mca_readout/mca_sim.py +0 -28
  27. bec_widgets/examples/modular_app/___init__.py +0 -0
  28. bec_widgets/examples/modular_app/modular.ui +0 -92
  29. bec_widgets/examples/modular_app/modular_app.py +0 -197
  30. bec_widgets/examples/motor_movement/config_example.yaml +0 -17
  31. bec_widgets/examples/motor_movement/csax_bec_config.yaml +0 -10
  32. bec_widgets/examples/motor_movement/csaxs_config.yaml +0 -17
  33. bec_widgets/examples/motor_movement/motor_example.py +0 -1344
  34. bec_widgets/examples/stream_plot/__init__.py +0 -0
  35. bec_widgets/examples/stream_plot/line_plot.ui +0 -155
  36. bec_widgets/examples/stream_plot/stream_plot.py +0 -337
  37. docs/user/apps/modular_app.md +0 -6
  38. docs/user/apps/motor_app.md +0 -34
  39. docs/user/apps/motor_app_10fps.gif +0 -0
  40. docs/user/apps/plot_app.md +0 -6
  41. tests/unit_tests/test_eiger_plot.py +0 -115
  42. tests/unit_tests/test_stream_plot.py +0 -158
  43. {bec_widgets-0.55.0.dist-info → bec_widgets-0.56.1.dist-info}/WHEEL +0 -0
  44. {bec_widgets-0.55.0.dist-info → bec_widgets-0.56.1.dist-info}/licenses/LICENSE +0 -0
File without changes
@@ -1,92 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <ui version="4.0">
3
- <class>MainWindow</class>
4
- <widget class="QMainWindow" name="MainWindow">
5
- <property name="geometry">
6
- <rect>
7
- <x>0</x>
8
- <y>0</y>
9
- <width>1433</width>
10
- <height>689</height>
11
- </rect>
12
- </property>
13
- <property name="windowTitle">
14
- <string>MainWindow</string>
15
- </property>
16
- <widget class="QWidget" name="centralwidget">
17
- <layout class="QGridLayout" name="gridLayout">
18
- <item row="1" column="2">
19
- <widget class="QLabel" name="label_3">
20
- <property name="text">
21
- <string>Plot Config 2</string>
22
- </property>
23
- </widget>
24
- </item>
25
- <item row="3" column="0" colspan="2">
26
- <widget class="BECMonitor" name="plot_1"/>
27
- </item>
28
- <item row="1" column="3">
29
- <widget class="QPushButton" name="pushButton_setting_2">
30
- <property name="text">
31
- <string>Setting Plot 2</string>
32
- </property>
33
- </widget>
34
- </item>
35
- <item row="3" column="2" colspan="2">
36
- <widget class="BECMonitor" name="plot_2"/>
37
- </item>
38
- <item row="1" column="4">
39
- <widget class="QLabel" name="label_2">
40
- <property name="text">
41
- <string>Plot Scan Types = True</string>
42
- </property>
43
- </widget>
44
- </item>
45
- <item row="1" column="1">
46
- <widget class="QPushButton" name="pushButton_setting_1">
47
- <property name="text">
48
- <string>Setting Plot 1</string>
49
- </property>
50
- </widget>
51
- </item>
52
- <item row="1" column="0">
53
- <widget class="QLabel" name="label">
54
- <property name="text">
55
- <string>Plot Config 1</string>
56
- </property>
57
- </widget>
58
- </item>
59
- <item row="1" column="5">
60
- <widget class="QPushButton" name="pushButton_setting_3">
61
- <property name="text">
62
- <string>Setting Plot 3</string>
63
- </property>
64
- </widget>
65
- </item>
66
- <item row="3" column="4" colspan="2">
67
- <widget class="BECMonitor" name="plot_3"/>
68
- </item>
69
- </layout>
70
- </widget>
71
- <widget class="QMenuBar" name="menubar">
72
- <property name="geometry">
73
- <rect>
74
- <x>0</x>
75
- <y>0</y>
76
- <width>1433</width>
77
- <height>37</height>
78
- </rect>
79
- </property>
80
- </widget>
81
- <widget class="QStatusBar" name="statusbar"/>
82
- </widget>
83
- <customwidgets>
84
- <customwidget>
85
- <class>BECMonitor</class>
86
- <extends>QGraphicsView</extends>
87
- <header location="global">bec_widgets.widgets.h</header>
88
- </customwidget>
89
- </customwidgets>
90
- <resources/>
91
- <connections/>
92
- </ui>
@@ -1,197 +0,0 @@
1
- import os
2
-
3
- from qtpy import uic
4
- from qtpy.QtWidgets import QApplication, QMainWindow
5
-
6
- from bec_widgets.utils.bec_dispatcher import BECDispatcher
7
- from bec_widgets.widgets import BECMonitor
8
-
9
- # some default configs for demonstration purposes
10
- CONFIG_SIMPLE = {
11
- "plot_settings": {
12
- "background_color": "black",
13
- "num_columns": 2,
14
- "colormap": "plasma",
15
- "scan_types": False,
16
- },
17
- "plot_data": [
18
- {
19
- "plot_name": "BPM4i plots vs samx",
20
- "x_label": "Motor X",
21
- "y_label": "bpm4i",
22
- "sources": [
23
- {
24
- "type": "scan_segment",
25
- "signals": {
26
- "x": [{"name": "samx"}],
27
- "y": [{"name": "bpm4i", "entry": "bpm4i"}],
28
- },
29
- },
30
- # {
31
- # "type": "history",
32
- # "signals": {
33
- # "x": [{"name": "samx"}],
34
- # "y": [{"name": "bpm4i", "entry": "bpm4i"}],
35
- # },
36
- # },
37
- # {
38
- # "type": "dap",
39
- # 'worker':'some_worker',
40
- # "signals": {
41
- # "x": [{"name": "samx"}],
42
- # "y": [{"name": "bpm4i", "entry": "bpm4i"}],
43
- # },
44
- # },
45
- ],
46
- },
47
- {
48
- "plot_name": "Gauss plots vs samx",
49
- "x_label": "Motor X",
50
- "y_label": "Gauss",
51
- "sources": [
52
- {
53
- "type": "scan_segment",
54
- "signals": {
55
- "x": [{"name": "samx", "entry": "samx"}],
56
- "y": [{"name": "gauss_bpm"}, {"name": "gauss_adc1"}],
57
- },
58
- }
59
- ],
60
- },
61
- ],
62
- }
63
-
64
-
65
- CONFIG_SCAN_MODE = {
66
- "plot_settings": {
67
- "background_color": "white",
68
- "num_columns": 3,
69
- "colormap": "plasma",
70
- "scan_types": True,
71
- },
72
- "plot_data": {
73
- "grid_scan": [
74
- {
75
- "plot_name": "Grid plot 1",
76
- "x_label": "Motor X",
77
- "y_label": "BPM",
78
- "sources": [
79
- {
80
- "type": "scan_segment",
81
- "signals": {
82
- "x": [{"name": "samx", "entry": "samx"}],
83
- "y": [{"name": "gauss_bpm"}],
84
- },
85
- }
86
- ],
87
- },
88
- {
89
- "plot_name": "Grid plot 2",
90
- "x_label": "Motor X",
91
- "y_label": "BPM",
92
- "sources": [
93
- {
94
- "type": "scan_segment",
95
- "signals": {
96
- "x": [{"name": "samx", "entry": "samx"}],
97
- "y": [{"name": "gauss_adc1"}],
98
- },
99
- }
100
- ],
101
- },
102
- {
103
- "plot_name": "Grid plot 3",
104
- "x_label": "Motor X",
105
- "y_label": "BPM",
106
- "sources": [
107
- {
108
- "type": "scan_segment",
109
- "signals": {"x": [{"name": "samy"}], "y": [{"name": "gauss_adc2"}]},
110
- }
111
- ],
112
- },
113
- {
114
- "plot_name": "Grid plot 4",
115
- "x_label": "Motor X",
116
- "y_label": "BPM",
117
- "sources": [
118
- {
119
- "type": "scan_segment",
120
- "signals": {
121
- "x": [{"name": "samy", "entry": "samy"}],
122
- "y": [{"name": "gauss_adc3"}],
123
- },
124
- }
125
- ],
126
- },
127
- ],
128
- "line_scan": [
129
- {
130
- "plot_name": "BPM plots vs samx",
131
- "x_label": "Motor X",
132
- "y_label": "Gauss",
133
- "sources": [
134
- {
135
- "type": "scan_segment",
136
- "signals": {
137
- "x": [{"name": "samx", "entry": "samx"}],
138
- "y": [{"name": "bpm4i"}],
139
- },
140
- }
141
- ],
142
- },
143
- {
144
- "plot_name": "Gauss plots vs samx",
145
- "x_label": "Motor X",
146
- "y_label": "Gauss",
147
- "sources": [
148
- {
149
- "type": "scan_segment",
150
- "signals": {
151
- "x": [{"name": "samx", "entry": "samx"}],
152
- "y": [{"name": "gauss_bpm"}, {"name": "gauss_adc1"}],
153
- },
154
- }
155
- ],
156
- },
157
- ],
158
- },
159
- }
160
-
161
-
162
- class ModularApp(QMainWindow):
163
- def __init__(self, client=None, parent=None):
164
- super(ModularApp, self).__init__(parent)
165
-
166
- # Client and device manager from BEC
167
- self.client = BECDispatcher().client if client is None else client
168
-
169
- # Loading UI
170
- current_path = os.path.dirname(__file__)
171
- uic.loadUi(os.path.join(current_path, "modular.ui"), self)
172
-
173
- self._init_plots()
174
-
175
- def _init_plots(self):
176
- """Initialize plots and connect the buttons to the config dialogs"""
177
- plots = [self.plot_1, self.plot_2, self.plot_3]
178
- configs = [CONFIG_SIMPLE, CONFIG_SCAN_MODE, CONFIG_SCAN_MODE]
179
- buttons = [self.pushButton_setting_1, self.pushButton_setting_2, self.pushButton_setting_3]
180
-
181
- # hook plots, configs and buttons together
182
- for plot, config, button in zip(plots, configs, buttons):
183
- plot.on_config_update(config)
184
- button.clicked.connect(plot.show_config_dialog)
185
-
186
-
187
- if __name__ == "__main__":
188
- # BECclient global variables
189
- client = BECDispatcher().client
190
- client.start()
191
-
192
- app = QApplication([])
193
- modularApp = ModularApp(client=client)
194
-
195
- window = modularApp
196
- window.show()
197
- app.exec()
@@ -1,17 +0,0 @@
1
- selected_motors:
2
- motor_x: "samx"
3
- motor_y: "samy"
4
-
5
- plot_motors:
6
- max_points: 1000
7
- num_dim_points: 100
8
- scatter_size: 5
9
- precision: 3
10
- mode_lock: False # "Individual" or "Start/Stop". False to unlock
11
- extra_columns:
12
- - sample name: "sample 1"
13
- - step_x [mu]: 25
14
- - step_y [mu]: 25
15
- - exp_time [s]: 1
16
- - start: 1
17
- - tilt [deg]: 0
@@ -1,10 +0,0 @@
1
- redis:
2
- host: pc15543
3
- port: 6379
4
- mongodb:
5
- host: localhost
6
- port: 27017
7
- scibec:
8
- host: http://localhost
9
- port: 3030
10
- beamline: MyBeamline
@@ -1,17 +0,0 @@
1
- selected_motors:
2
- motor_x: "samx"
3
- motor_y: "samy"
4
-
5
- plot_motors:
6
- max_points: 1000
7
- num_dim_points: 100
8
- scatter_size: 5
9
- precision: 3
10
- mode_lock: Start/Stop # "Individual" or "Start/Stop"
11
- extra_columns:
12
- - sample name: "sample 1"
13
- - step_x [mu]: 25
14
- - step_y [mu]: 25
15
- - exp_time [s]: 1
16
- - start: 1
17
- - tilt [deg]: 0