bec-widgets 0.89.0__py3-none-any.whl → 0.91.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.
Files changed (116) hide show
  1. CHANGELOG.md +50 -52
  2. PKG-INFO +1 -1
  3. bec_widgets/assets/designer_icons/code.png +0 -0
  4. bec_widgets/assets/designer_icons/color_button.png +0 -0
  5. bec_widgets/assets/designer_icons/device_box.png +0 -0
  6. bec_widgets/assets/designer_icons/device_combo_box.png +0 -0
  7. bec_widgets/assets/designer_icons/device_line_edit.png +0 -0
  8. bec_widgets/assets/designer_icons/dock_area.png +0 -0
  9. bec_widgets/assets/designer_icons/games.png +0 -0
  10. bec_widgets/assets/designer_icons/image.png +0 -0
  11. bec_widgets/assets/designer_icons/position_indicator.png +0 -0
  12. bec_widgets/assets/designer_icons/queue.png +0 -0
  13. bec_widgets/assets/designer_icons/ring_progress.png +0 -0
  14. bec_widgets/assets/designer_icons/scan_control.png +0 -0
  15. bec_widgets/assets/designer_icons/spinner.png +0 -0
  16. bec_widgets/assets/designer_icons/status.png +0 -0
  17. bec_widgets/assets/designer_icons/stop.png +0 -0
  18. bec_widgets/assets/designer_icons/text.png +0 -0
  19. bec_widgets/assets/designer_icons/toggle.png +0 -0
  20. bec_widgets/assets/designer_icons/web.png +0 -0
  21. bec_widgets/assets/status_icons/error.svg +3 -0
  22. bec_widgets/assets/status_icons/not_connected.svg +3 -0
  23. bec_widgets/assets/status_icons/refresh.svg +3 -0
  24. bec_widgets/assets/status_icons/running.svg +3 -0
  25. bec_widgets/assets/status_icons/warning.svg +3 -0
  26. bec_widgets/assets/toolbar_icons/attach_all.svg +3 -0
  27. bec_widgets/assets/toolbar_icons/auto_range.svg +1 -1
  28. bec_widgets/assets/toolbar_icons/compare.svg +3 -0
  29. bec_widgets/assets/toolbar_icons/device_box.svg +3 -0
  30. bec_widgets/assets/toolbar_icons/fft.svg +11 -0
  31. bec_widgets/assets/toolbar_icons/image.svg +3 -0
  32. bec_widgets/assets/toolbar_icons/image_autorange.svg +3 -0
  33. bec_widgets/assets/toolbar_icons/line_curve.svg +3 -0
  34. bec_widgets/assets/toolbar_icons/lock_aspect_ratio.svg +3 -0
  35. bec_widgets/assets/toolbar_icons/log_scale.png +0 -0
  36. bec_widgets/assets/toolbar_icons/motor_map.svg +3 -0
  37. bec_widgets/assets/toolbar_icons/progress.svg +3 -0
  38. bec_widgets/assets/toolbar_icons/queue.svg +3 -0
  39. bec_widgets/assets/toolbar_icons/reset_settings.svg +3 -0
  40. bec_widgets/assets/toolbar_icons/restore_state.svg +3 -0
  41. bec_widgets/assets/toolbar_icons/ring_progress.svg +3 -0
  42. bec_widgets/assets/toolbar_icons/rotate_left.svg +3 -0
  43. bec_widgets/assets/toolbar_icons/rotate_right.svg +3 -0
  44. bec_widgets/assets/toolbar_icons/save_state.svg +3 -0
  45. bec_widgets/assets/toolbar_icons/scan_control.svg +3 -0
  46. bec_widgets/assets/toolbar_icons/status.svg +3 -0
  47. bec_widgets/assets/toolbar_icons/terminal.svg +3 -0
  48. bec_widgets/assets/toolbar_icons/transform.svg +3 -0
  49. bec_widgets/assets/toolbar_icons/waveform.svg +3 -0
  50. bec_widgets/cli/client.py +188 -3
  51. bec_widgets/examples/jupyter_console/jupyter_console_window.py +18 -19
  52. bec_widgets/examples/plugin_example_pyside/tictactoeplugin.py +8 -2
  53. bec_widgets/qt_utils/toolbar.py +52 -2
  54. bec_widgets/utils/generate_designer_plugin.py +1 -1
  55. bec_widgets/widgets/bec_queue/bec_queue_plugin.py +7 -2
  56. bec_widgets/widgets/bec_status_box/bec_status_box_plugin.py +7 -2
  57. bec_widgets/widgets/bec_status_box/status_item.py +14 -8
  58. bec_widgets/widgets/color_button/color_button_plugin.py +3 -2
  59. bec_widgets/widgets/device_box/device_box_plugin.py +6 -1
  60. bec_widgets/widgets/device_combobox/{device_combobox_plugin.py → device_combo_box_plugin.py} +5 -3
  61. bec_widgets/widgets/device_combobox/device_combobox.py +0 -1
  62. bec_widgets/widgets/device_combobox/{register_device_combobox.py → register_device_combo_box.py} +1 -1
  63. bec_widgets/widgets/device_line_edit/device_line_edit_plugin.py +5 -3
  64. bec_widgets/widgets/dock/dock.py +5 -2
  65. bec_widgets/widgets/dock/dock_area.py +139 -29
  66. bec_widgets/widgets/dock/dock_area.pyproject +1 -0
  67. bec_widgets/widgets/dock/dock_area_plugin.py +59 -0
  68. bec_widgets/widgets/dock/register_dock_area.py +15 -0
  69. bec_widgets/widgets/figure/figure.py +1 -3
  70. bec_widgets/widgets/figure/plots/axis_settings.ui +86 -100
  71. bec_widgets/widgets/figure/plots/image/image.py +85 -3
  72. bec_widgets/widgets/figure/plots/image/image_item.py +14 -0
  73. bec_widgets/widgets/image/__init__.py +0 -0
  74. bec_widgets/widgets/image/bec_image_widget.pyproject +1 -0
  75. bec_widgets/widgets/image/bec_image_widget_plugin.py +59 -0
  76. bec_widgets/widgets/image/image_widget.py +475 -0
  77. bec_widgets/widgets/image/register_bec_image_widget.py +15 -0
  78. bec_widgets/widgets/position_indicator/__init__.py +0 -0
  79. bec_widgets/widgets/position_indicator/position_indicator_plugin.py +7 -2
  80. bec_widgets/widgets/ring_progress_bar/register_ring_progress_bar.py +15 -0
  81. bec_widgets/widgets/ring_progress_bar/ring_progress_bar.pyproject +1 -0
  82. bec_widgets/widgets/ring_progress_bar/ring_progress_bar_plugin.py +58 -0
  83. bec_widgets/widgets/scan_control/register_scan_control.py +15 -0
  84. bec_widgets/widgets/scan_control/scan_control.pyproject +1 -0
  85. bec_widgets/widgets/scan_control/scan_control_plugin.py +58 -0
  86. bec_widgets/widgets/spinner/spinner_widget_plugin.py +7 -2
  87. bec_widgets/widgets/stop_button/stop_button_plugin.py +5 -3
  88. bec_widgets/widgets/text_box/register_text_box.py +15 -0
  89. bec_widgets/widgets/text_box/text_box.pyproject +1 -0
  90. bec_widgets/widgets/text_box/text_box_plugin.py +58 -0
  91. bec_widgets/widgets/toggle/toggle_switch_plugin.py +7 -2
  92. bec_widgets/widgets/vscode/register_vs_code_editor.py +15 -0
  93. bec_widgets/widgets/vscode/vs_code_editor.pyproject +1 -0
  94. bec_widgets/widgets/vscode/vs_code_editor_plugin.py +59 -0
  95. bec_widgets/widgets/waveform/bec_waveform_widget_plugin.py +1 -1
  96. bec_widgets/widgets/website/register_website_widget.py +15 -0
  97. bec_widgets/widgets/website/website_widget.pyproject +1 -0
  98. bec_widgets/widgets/website/website_widget_plugin.py +58 -0
  99. {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/METADATA +1 -1
  100. {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/RECORD +112 -45
  101. pyproject.toml +1 -1
  102. tests/unit_tests/client_mocks.py +9 -1
  103. tests/unit_tests/test_bec_dock.py +70 -30
  104. tests/unit_tests/test_bec_image_widget.py +218 -0
  105. tests/unit_tests/test_device_input_base.py +1 -1
  106. tests/unit_tests/test_device_input_widgets.py +2 -0
  107. tests/unit_tests/test_waveform_widget.py +1 -1
  108. bec_widgets/widgets/color_button/assets/color_button.png +0 -0
  109. bec_widgets/widgets/device_combobox/assets/device_combobox_icon.png +0 -0
  110. bec_widgets/widgets/device_line_edit/assets/line_edit_icon.png +0 -0
  111. bec_widgets/widgets/stop_button/assets/stop.png +0 -0
  112. /bec_widgets/assets/designer_icons/{BECWaveformWidget.png → waveform.png} +0 -0
  113. /bec_widgets/widgets/device_combobox/{device_combobox.pyproject → device_combo_box.pyproject} +0 -0
  114. {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/WHEEL +0 -0
  115. {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/entry_points.txt +0 -0
  116. {bec_widgets-0.89.0.dist-info → bec_widgets-0.91.0.dist-info}/licenses/LICENSE +0 -0
CHANGELOG.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.91.0 (2024-07-23)
4
+
5
+ ### Feature
6
+
7
+ * feat(dock_area): plugin added ([`a16b87a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/a16b87ac28d164230dd2e8020f50ff3a63cd407e))
8
+
9
+ * feat(dock_area): Added toolbar to dock area to add widgets without CLI interactions ([`cce1367`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/cce1367a72fca7206d351894bd1831b7bbfa7ec6))
10
+
11
+ * feat(toolbar): expandable menu actions ([`28f26e9`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/28f26e92a46063db1a194be552156a5d3b2c43e7))
12
+
13
+ ### Fix
14
+
15
+ * fix(status_item): icons changed to material design ([`1b9c55a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/1b9c55a46a0dfd8678c8e95ff64dd6e8cfb9233e))
16
+
17
+ * fix(plugins): Qt Designer plugins icons adjusted ([`f4844d2`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/f4844d2e067ce75dc64b89b230d7932b308ddfc2))
18
+
19
+ ### Test
20
+
21
+ * test(dock_area): tests extended ([`06fab0e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/06fab0eab926cef5677d4988fd1fce09da342dd8))
22
+
23
+ ## v0.90.0 (2024-07-23)
24
+
25
+ ### Feature
26
+
27
+ * feat(image_widget): plugin added ([`4371168`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/43711680ba253f81fb0ffe764bcaae701b02bb49))
28
+
29
+ * feat(image_widget): all toolbar actions added ([`501eb92`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/501eb923f12fa6aaa93f5428ca78e57694edfbc0))
30
+
31
+ * feat(image_widget): image_widget added ([`6a9317f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6a9317facda896ee784c7fc1db0cd3d68cdfcf73))
32
+
33
+ ### Fix
34
+
35
+ * fix(axis_setting): fix compatibility for issue with horizontal line for PyQt6 ([`1cf6e32`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/1cf6e32303f82bc7c3f3391d0e96a88bc31f29fc))
36
+
37
+ * fix(image_widget): image_widget autorange fixed ([`7f49893`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/7f49893d2ce3b9d02efa764f7f10442ed6ab8f3c))
38
+
39
+ * fix(image_widget): image widget adjusted ([`3d2ca48`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/3d2ca4855c36fe0af59a4b540caa3c8023a81773))
40
+
41
+ * fix(image): only single monitor image is allowed ([`fe7e542`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/fe7e542b19dc5b401523501acb74ac03edf62ad4))
42
+
43
+ * fix(image): raw data are saved in image item to always have precise processing ([`c15035b`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c15035b6b769a96780a16da9e7f75af3b823654c))
44
+
45
+ ### Refactor
46
+
47
+ * refactor(jupyter_console_example): added examples of standalone widgets ([`ba0d1ea`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/ba0d1ea9031b4ae2e2e73bf269fbfad973b924a5))
48
+
49
+ ### Test
50
+
51
+ * test(image_widget): tests added ([`70fb276`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/70fb276fdf31dffc105435d3dfe7c5caea0b10ce))
52
+
3
53
  ## v0.89.0 (2024-07-22)
4
54
 
5
55
  ### Feature
@@ -92,60 +142,8 @@ curve Dialog colormap WIP ([`33495cf`](https://gitlab.psi.ch/bec/bec_widgets/-/c
92
142
 
93
143
  * fix: add missing close() call, ensure jupyter console client.shutdown() is called in closeEvent ([`e52ee26`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e52ee2604cb35096f1bd833ca9516d8a34197d35))
94
144
 
95
- * fix: BECWidget checks if it is a widget, and implements closeEvent and cleanup ([`d64758f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/d64758f268cad69e6a17bd52dc9913a6367d3cde))
96
-
97
- * fix: add exit handlers for BECConnection objects ([`6202d22`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6202d224fe85c103a4c33bd8c255f18cfd027303))
98
-
99
145
  ### Refactor
100
146
 
101
147
  * refactor: BECWidget is a mixin based on BECConnector, for each QWidget in BEC
102
148
 
103
149
  Handles closeEvent() and RPC registering/unregistering ([`c7feb69`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/c7feb6952d590b569f7b0cba3b019a9af0ce0c93))
104
-
105
- ## v0.87.0 (2024-07-17)
106
-
107
- ### Feature
108
-
109
- * feat(qt_utils): added warning utility with simple API to setup warning message ([`787f749`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/787f74949bac27aaa51cbb43911919071481707c))
110
-
111
- * feat(qt_utils): added error handle utility with popup messageBoxes ([`196ef7a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/196ef7afe11a1b5dcc536f8859dc3b6044ea628e))
112
-
113
- ### Unknown
114
-
115
- * tests: add unit tests for error and warning message boxes ([`8f104cf`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8f104cf4024d3a4516e6aba5daa8fb78c85e2bfd))
116
-
117
- ## v0.86.0 (2024-07-17)
118
-
119
- ### Feature
120
-
121
- * feat(toolbar): added separator action ([`ba69e79`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/ba69e7957cd20df1557ac0c3a9ca43a54493c34d))
122
-
123
- ## v0.85.1 (2024-07-17)
124
-
125
- ### Fix
126
-
127
- * fix(waveform): readout_priority dict fixed, not overwritten to 'baseline' key ([`b5b0aa4`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/b5b0aa4f82a998bb0162dc319591e854204a7354))
128
-
129
- ## v0.85.0 (2024-07-16)
130
-
131
- ### Feature
132
-
133
- * feat(color_map_selector): added colormap selector with plugin ([`b98fd00`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/b98fd00adef97adf57f49b60ade99972b9f5a6bc))
134
-
135
- ## v0.84.0 (2024-07-15)
136
-
137
- ### Fix
138
-
139
- * fix(waveform): timestamp are not converted to human readable format ([`e495fd3`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e495fd30c4c16474689943c7263e3060cb09ffb4))
140
-
141
- * fix(waveform): set_x method various bugs fixed ([`8516a1d`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/8516a1d639925a877f174fa13f427a71131cc918))
142
-
143
- * fix(waveform): x axis switching logic fixed when axis are not compatible ([`e4e1a90`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e4e1a905d19def22f970b364c18c953f00e10389))
144
-
145
- ### Refactor
146
-
147
- * refactor(waveform): plot can be prompted without specifying kwargs ([`48911e9`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/48911e934815923c94edb5ced6042058a11a97f5))
148
-
149
- ### Test
150
-
151
- * test(waveform): tests extended ([`006992e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/006992e43cc56d56261bc4fd3e9cae9abcab2153))
PKG-INFO CHANGED
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bec_widgets
3
- Version: 0.89.0
3
+ Version: 0.91.0
4
4
  Summary: BEC Widgets
5
5
  Project-URL: Bug Tracker, https://gitlab.psi.ch/bec/bec_widgets/issues
6
6
  Project-URL: Homepage, https://gitlab.psi.ch/bec/bec_widgets
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#EA3323">
2
+ <path d="M479.85-265.87q19.8 0 32.69-12.46 12.9-12.46 12.9-32.26 0-19.8-12.75-32.98-12.74-13.17-32.54-13.17-19.8 0-32.69 13.16-12.9 13.15-12.9 32.95 0 19.8 12.75 32.28 12.74 12.48 32.54 12.48Zm-36.46-166.56h79.22v-262.61h-79.22v262.61Zm36.95 366.56q-86.2 0-161.5-32.39-75.3-32.4-131.74-88.84-56.44-56.44-88.84-131.73-32.39-75.3-32.39-161.59t32.39-161.67q32.4-75.37 88.75-131.34t131.69-88.62q75.34-32.65 161.67-32.65 86.34 0 161.78 32.61 75.45 32.6 131.37 88.5 55.93 55.89 88.55 131.45 32.63 75.56 32.63 161.87 0 86.29-32.65 161.58t-88.62 131.48q-55.97 56.18-131.42 88.76-75.46 32.58-161.67 32.58Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#EA3323">
2
+ <path d="m759.04-283.09-63.13-62q49.31-9.43 84.44-46.02 35.13-36.59 35.13-86.14 0-55.49-39.42-95.08-39.43-39.58-94.93-39.58h-153.3v-79.79h152.74q89.28 0 151.7 62.71Q894.7-566.28 894.7-477q0 63.7-38.26 115.96-38.27 52.26-97.4 77.95ZM596.83-443.61l-65.66-66.78h110.05v66.78h-44.39ZM804.96-56 58.48-802.48 106-850l746.48 746.48L804.96-56ZM443.22-265.87H279.43q-89.28 0-151.7-62.42Q65.3-390.72 65.3-480q0-72.57 43.09-129.54 43.09-56.98 112.09-76.07l70.13 70.7h-11.18q-55.73 0-95.32 39.3-39.59 39.31-39.59 95.61t39.66 95.61q39.66 39.3 95.5 39.3h163.54v79.22ZM319.35-446.61v-66.78h77.3l66.78 66.78H319.35Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFF55">
2
+ <path d="M478.3-145.87q-138.65 0-236.39-97.74-97.74-97.74-97.74-236.25t97.74-236.68q97.74-98.16 236.39-98.16 88.4 0 155.45 35.76 67.04 35.76 115.86 98.9V-814.7h66.78v274.92H540.91V-606h165.74q-38.56-57.74-95.3-93.33-56.74-35.58-133.05-35.58-106.88 0-180.89 73.98-74.02 73.99-74.02 180.83 0 106.84 74.02 180.93 74.02 74.08 180.91 74.08 80.16 0 147.74-46.08 67.59-46.09 95.16-121.83H803q-29.56 110.65-119.67 178.89-90.1 68.24-205.03 68.24Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#75FB4C">
2
+ <path d="m419.87-289.52 289.22-289.22-57.31-56.87L419.87-403.7 304.96-518.61l-56.31 56.87 171.22 172.22Zm60.21 223.65q-85.47 0-161.01-32.39-75.53-32.4-131.97-88.84-56.44-56.44-88.84-131.89-32.39-75.46-32.39-160.93 0-86.47 32.39-162.01 32.4-75.53 88.75-131.5t131.85-88.62q75.5-32.65 161.01-32.65 86.52 0 162.12 32.61 75.61 32.6 131.53 88.5 55.93 55.89 88.55 131.45Q894.7-566.58 894.7-480q0 85.55-32.65 161.07-32.65 75.53-88.62 131.9-55.97 56.37-131.42 88.77-75.46 32.39-161.93 32.39Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#F19E39">
2
+ <path d="M27.56-112.65 480-894.7l452.44 782.05H27.56Zm456.62-125.48q13.15 0 22.61-9.64 9.47-9.65 9.47-22.8t-9.64-22.33q-9.65-9.19-22.8-9.19t-22.61 9.36q-9.47 9.36-9.47 22.51 0 13.15 9.64 22.62 9.65 9.47 22.8 9.47ZM454-348h60v-219.48h-60V-348Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="m145.26-88.13-57.13-57.13 137.39-137.39H105.87v-79.22h256v256h-79.22v-119.65L145.26-88.13Zm669.48 0L677.91-225.52v119.65h-79.78v-256H854.7v79.22H734.48l137.39 137.39-57.13 57.13Zm-708.87-510v-79.78h119.65L88.13-814.74l57.13-57.13 137.39 137.39V-854.7h79.22v256.57h-256Zm492.26 0V-854.7h79.78v120.22l137.83-138.39 57.13 57.13-138.39 137.83H854.7v79.78H598.13Z"/>
3
+ </svg>
@@ -1,3 +1,3 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
- <path d="M571.91-279.09h191v-194h-60v134h-131v60ZM198.09-486.91h60v-134h131v-60h-191v194Zm-53 341.04q-32.51 0-55.87-23.35-23.35-23.36-23.35-55.87v-509.82q0-32.74 23.35-56.26 23.36-23.53 55.87-23.53h669.82q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v509.82q0 32.51-23.53 55.87-23.52 23.35-56.26 23.35H145.09Zm0-79.22h669.82v-509.82H145.09v509.82Zm0 0v-509.82 509.82Z"/>
2
+ <path d="M114.02-114.02v-308.13h68.13v192.02l547.72-547.72H537.85v-68.37h308.37v308.37h-68.37v-192.02L230.13-182.15h192.02v68.13H114.02Z"/>
3
3
  </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="m311.5-154.02-47.74-47.74 116.94-116.7H74.02v-68.37H380.7L263.76-503.76l47.74-47.74 198.98 198.74L311.5-154.02Zm337-254.72L449.76-607.48 648.5-806.22l47.74 47.74-116.7 116.94h306.68v68.37H579.54l116.7 116.69-47.74 47.74Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M403.39-158.74 82.13-480l321.26-321.26v642.52Zm153.22 0v-642.52L878.44-480 556.61-158.74Zm81.57-195.74L763.13-480 638.18-605.52v251.04Z"/>
3
+ </svg>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg width="100%" height="100%" viewBox="0 0 100 96" version="1.1" xmlns="http://www.w3.org/2000/svg"
4
+ xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/"
5
+ style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
6
+ <rect id="Artboard1" x="0" y="0" width="100" height="96.486" style="fill:none;"/>
7
+ <g id="Artboard11" serif:id="Artboard1">
8
+ <path d="M11.379,24.832C11.379,24.261 11.843,23.798 12.414,23.798C18.11,23.798 20.117,19.072 22.06,14.503C23.704,10.634 25.403,6.634 29.483,6.634C33.902,6.634 35.376,12.91 36.934,19.555C38.473,26.113 40.065,32.893 44.138,32.893C48.25,32.893 50.78,28.962 53.457,24.8C56.279,20.412 59.198,15.876 64.31,15.876C69.322,15.876 72.165,20.305 74.915,24.588C77.707,28.935 80.343,33.04 84.999,33.04C85.571,33.04 86.034,33.503 86.034,34.075C86.034,34.647 85.571,35.11 84.999,35.11C79.212,35.11 76.004,30.115 73.175,25.708C70.612,21.716 68.192,17.946 64.31,17.946C60.328,17.946 57.835,21.819 55.197,25.92C52.338,30.366 49.381,34.963 44.138,34.963C38.425,34.963 36.643,27.371 34.92,20.028C33.613,14.46 32.262,8.703 29.482,8.703C26.953,8.703 25.71,11.2 23.963,15.311C21.964,20.014 19.479,25.867 12.413,25.867C11.843,25.867 11.379,25.403 11.379,24.832M44.361,44.584C43.504,44.584 42.557,44.882 42.557,45.739L42.586,50.703L39.522,50.703L43.922,61.878L48.807,50.703L45.691,50.703L45.604,46.255C45.602,45.398 45.218,44.584 44.361,44.584ZM6.034,37.487L6.034,6.674L5,6.674L5,38.522L95,38.522L95,37.487L6.034,37.487M77.414,91.881L77.414,63.849C77.414,63.277 76.951,62.814 76.379,62.814C75.808,62.814 75.345,63.277 75.345,63.849L75.345,91.881C75.345,92.045 75.391,92.194 75.458,92.332L61.955,92.332C62.022,92.194 62.068,92.045 62.068,91.881L62.068,82.718C62.068,82.146 61.605,81.683 61.034,81.683C60.462,81.683 59.999,82.146 59.999,82.718L59.999,91.881C59.999,92.045 60.045,92.194 60.112,92.332L45.059,92.332C45.126,92.194 45.172,92.045 45.172,91.881L45.172,75.943C45.172,75.372 44.709,74.909 44.138,74.909C43.567,74.909 43.104,75.372 43.104,75.943L43.104,91.881C43.104,92.045 43.15,92.194 43.217,92.332L23.852,92.332C23.92,92.194 23.966,92.045 23.966,91.881L23.966,63.849C23.966,63.277 23.502,62.814 22.931,62.814C22.36,62.814 21.897,63.277 21.897,63.849L21.897,91.881C21.897,92.045 21.943,92.194 22.011,92.332L6.034,92.332L6.034,62.881L5,62.881L5,93.366L95,93.366L95,92.332L77.301,92.332C77.368,92.194 77.414,92.045 77.414,91.881"
9
+ style="fill:white;fill-rule:nonzero;stroke:white;stroke-width:5px;"/>
10
+ </g>
11
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M185.09-105.87q-32.51 0-55.87-23.35-23.35-23.36-23.35-55.87v-589.82q0-32.74 23.35-56.26 23.36-23.53 55.87-23.53h589.82q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v589.82q0 32.51-23.53 55.87-23.52 23.35-56.26 23.35H185.09Zm43.56-166.04h503.7L578-481.48l-132 171-93-127-124.35 165.57Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M283.85-289.91h67.41l42.32-112.66h172.59l43.33 112.66h68.85l-164-428h-67.5l-163 428Zm127.74-165.72 67.34-182.87H481l68.41 182.87H411.59Zm68.53 381.61q-86.32 0-160.51-31t-128.89-85.7q-54.7-54.7-85.7-128.89-31-74.19-31-160.51 0-85.31 30.94-159.4t85.7-128.9q54.76-54.8 128.95-86.3t160.51-31.5q85.31 0 159.42 31.47 74.1 31.47 128.91 86.27 54.82 54.8 86.29 128.88 31.48 74.08 31.48 159.6 0 86.2-31.5 160.39-31.5 74.19-86.3 128.95-54.81 54.76-128.9 85.7-74.09 30.94-159.4 30.94ZM480-480Zm-.04 337.85q144.08 0 240.99-96.74 96.9-96.74 96.9-241.07 0-144.32-96.86-241.11-96.86-96.78-240.95-96.78-144.08 0-240.99 96.74-96.9 96.74-96.9 241.07 0 144.32 96.86 241.11 96.86 96.78 240.95 96.78Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M725.93-155.93q0-118.18-45-222.09t-122-180.91q-77-77-180.91-122t-222.09-45v-68.14q132.68 0 248.61 50.23 115.92 50.23 202.5 136.75 86.57 86.53 136.8 202.53 50.23 116.01 50.23 248.63h-68.14Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M571.91-279.09h191v-194h-60v134h-131v60ZM198.09-486.91h60v-134h131v-60h-191v194Zm-53 341.04q-32.51 0-55.87-23.35-23.35-23.36-23.35-55.87v-509.82q0-32.74 23.35-56.26 23.36-23.53 55.87-23.53h669.82q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v509.82q0 32.51-23.53 55.87-23.52 23.35-56.26 23.35H145.09Zm0-79.22h669.82v-509.82H145.09v509.82Zm0 0v-509.82 509.82Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M443.78-28.43v-75Q305.65-118 211.54-212.11q-94.11-94.11-108.11-231.67h-75v-72.44h75Q118-654.35 212.11-748.46q94.11-94.11 231.67-108.11v-75h72.44v75q137.56 14 231.67 108.11Q842-654.35 856.57-516.22h75v72.44h-75q-14 137.56-108.11 231.67Q654.35-118 516.22-103.43v75h-72.44Zm36.12-152.66q123.4 0 211.21-87.7 87.8-87.71 87.8-211.11 0-123.4-87.7-211.21-87.71-87.8-211.11-87.8-123.4 0-211.21 87.7-87.8 87.71-87.8 211.11 0 123.4 87.7 211.21 87.71 87.8 211.11 87.8ZM480-330q-63 0-106.5-43.5T330-480q0-63 43.5-106.5T480-630q63 0 106.5 43.5T630-480q0 63-43.5 106.5T480-330Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M480-65.87q-87.51 0-162.97-31.89-75.47-31.89-131.43-87.84-55.95-55.96-87.84-131.43Q65.87-392.49 65.87-480q0-87.47 31.88-162.87 31.89-75.39 87.75-131.51 55.87-56.11 131.41-88.21Q392.44-894.7 480-894.7q15.96 0 27.78 12.16 11.83 12.16 11.83 28.07 0 15.9-11.83 27.73-11.82 11.83-27.78 11.83-139.31 0-237.11 97.8-97.8 97.8-97.8 237.1 0 139.31 97.8 237.12 97.8 97.8 237.1 97.8 139.31 0 237.12-97.8 97.8-97.8 97.8-237.11 0-15.96 11.83-27.78 11.83-11.83 27.73-11.83 15.91 0 28.07 11.83Q894.7-495.96 894.7-480q0 87.56-32.14 163.1-32.14 75.54-88.11 131.44-55.97 55.9-131.44 87.74Q567.55-65.87 480-65.87Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M854.7-105.87H105.87v-209.61H854.7v209.61Zm0-269.61H105.87v-209.04H854.7v209.04Zm0-269.04H105.87V-854.7H854.7v210.18Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M473.54-344.48v-63.59h187.18v63.59H473.54Zm81.92 230.46v-56.15h-81.92v-63.59h81.92v-56.39h63.58v176.13h-63.58Zm103.58-56.15v-63.59h187.18v63.59H659.04Zm41.68-116.92v-177.13h63.58v56.15h81.92v63.59H764.3v57.39h-63.58ZM841.22-540h-68.46q-22.98-101.89-103.94-170.83-80.95-68.93-188.89-68.93-125.29 0-212.37 87.18T180.48-480q0 78.61 36.59 143.32 36.58 64.7 96.95 104.46v-108.26h66.46v226.46H154.02v-66.46h117.41q-71.56-48.72-114.48-127.36-42.93-78.64-42.93-172.16 0-76.22 28.86-142.78 28.86-66.57 78.29-116.04 49.42-49.47 116.01-78.43 66.58-28.97 142.82-28.97 136.52 0 237.87 87.8Q819.22-670.63 841.22-540Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M336.04-487.39 145.09-678.35v156.65H65.87v-293H358.3v79.79H201.22l191.39 190.95-56.57 56.57ZM145.09-145.87q-32.51 0-55.87-23.35-23.35-23.36-23.35-55.87V-451.7h79.22v226.61H493v79.22H145.09Zm669.82-278.3v-310.74H428.3v-79.79h386.61q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v310.74h-79.79Zm79.79 60v218.87H553v-218.87h341.7Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M479.87-54q-87.96 0-165.74-33.42-77.79-33.43-135.53-91.18-57.75-57.74-91.18-135.66Q54-392.17 54-480.13q0-87.96 33.42-165.74 33.43-77.79 91.18-135.53 57.74-57.75 135.62-91.18Q392.09-906 480-906h36.22v340.7q24.82 10.69 40.8 33.52Q573-508.96 573-480.17q0 38.43-27.38 65.8Q518.24-387 479.79-387q-38.44 0-65.62-27.37Q387-441.74 387-480.17q0-28.79 15.98-51.61 15.98-22.83 40.8-33.52v-97.22Q378.22-650.39 336-599.76q-42.22 50.63-42.22 119.5 0 78.19 54.12 132.33 54.12 54.15 132.02 54.15 77.91 0 132.1-54.09 54.2-54.1 54.2-131.79 0-42.47-16.28-77.88-16.29-35.42-45.42-60.98l52.05-52.05q38.18 35.64 60.7 84.75 22.51 49.11 22.51 105.82 0 108.57-75.58 183.9-75.59 75.32-184.13 75.32-108.55 0-183.92-75.32-75.37-75.33-75.37-183.89 0-99.62 63.68-172.01 63.67-72.39 159.32-85.65v-93.22Q309.39-817.61 218.2-717.8 127-617.98 127-480.14q0 147.23 103.1 250.18Q333.19-127 480.14-127t249.9-103.02Q833-333.04 833-479.81q0-76.45-29.58-141.91-29.57-65.46-80.81-114.89l51.48-51.48q61.05 58.34 96.48 137.6Q906-571.23 906-479.73q0 87.82-33.42 165.6-33.43 77.79-91.18 135.53-57.74 57.75-135.66 91.18Q567.83-54 479.87-54Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M435-72.11q-49.67-7-95.99-25.36-46.31-18.36-86.55-49.55l49.21-49.74q31.76 24 65.29 37.26 33.52 13.26 68.04 19.02v68.37Zm90 0v-68.37q109.28-21.24 181.07-102.9 71.78-81.66 71.78-197.71 0-124.37-84.11-210.87t-208.72-86.5h-18.8L540.67-664l-49.74 49.74L332.2-773l158.73-158.74 49.74 49.26-75.41 75.65h19.28q75.48 0 141.34 28.72t114.98 78.56q49.12 49.83 77.24 116.29 28.12 66.46 28.12 142.17 0 142.39-90.8 245.07Q664.63-93.35 525-72.11ZM189.46-209.78q-28.96-38.72-47.82-86.3-18.86-47.57-25.62-100.01h68.89q5 37.76 18.38 72.17 13.38 34.4 36.14 64.16l-49.97 49.98Zm-73.44-276.31q6.52-50.71 25-97.29 18.48-46.58 48.44-87.77l50.21 48.26q-22.76 33-36.14 67.52-13.38 34.52-18.62 69.28h-68.89Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M527-72.11v-68.37q34.52-5.76 68.04-19.02 33.53-13.26 65.29-37.26l49.21 49.74q-40.24 31.19-86.55 49.55Q576.67-79.11 527-72.11Zm-90 0Q297.37-93.35 206.7-196.02q-90.68-102.68-90.68-245.07 0-75.71 28-142.17t77.12-116.29q49.12-49.84 114.98-78.56 65.86-28.72 141.34-28.72h19.28l-75.41-75.65 49.74-49.26L629.8-773 471.07-614.26 421.33-664l74.69-74.46h-19.04q-124.61 0-208.72 86.5t-84.11 210.87q0 116.05 71.78 197.71 71.79 81.66 181.07 102.9v68.37Zm335.54-137.67-49.97-49.98q22.76-29.76 36.14-64.16 13.38-34.41 18.38-72.17h69.13q-7 52.44-25.86 100.01-18.86 47.58-47.82 86.3Zm73.68-276.31h-69.13q-5.24-34.76-18.62-69.28t-36.14-67.52l50.21-48.26q29.96 41.19 48.44 87.77 18.48 46.58 25.24 97.29Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M185.87-98.52v-681.39q0-32.74 23.35-56.26 23.36-23.53 55.87-23.53h429.82q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v681.39L480-224.17 185.87-98.52Zm79.22-120.39L480-309.18l214.91 90.27v-561H265.09v561Zm0-561h429.82-429.82Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M185.09-105.87q-32.93 0-56.08-23.14-23.14-23.15-23.14-56.08v-589.82q0-33.16 23.14-56.47 23.15-23.32 56.08-23.32h589.82q33.16 0 56.47 23.32 23.32 23.31 23.32 56.47v589.82q0 32.93-23.32 56.08-23.31 23.14-56.47 23.14H185.09Zm439.21-79.22h71l79.61-79.61v-40.39H744.3l-120 120ZM281-389.48l141-140 90 90L725.52-654 679-700.52l-167 167-90-90L234.48-436 281-389.48Zm-95.91 204.39h34.56l120-120h-71l-83.56 83.57v36.43Zm350.91 0 120-120h-71l-120 120h71Zm-159.87 0 120-120h-71l-120 120h71Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M286.83-277h60v-205h-60v205Zm326.91 0h60v-420h-60v420ZM450-277h60v-118h-60v118Zm0-205h60v-60h-60v60ZM185.09-105.87q-32.51 0-55.87-23.35-23.35-23.36-23.35-55.87v-589.82q0-32.74 23.35-56.26 23.36-23.53 55.87-23.53h589.82q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v589.82q0 32.51-23.53 55.87-23.52 23.35-56.26 23.35H185.09Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M145.09-145.87q-32.51 0-55.87-23.35-23.35-23.36-23.35-55.87v-509.82q0-32.74 23.35-56.26 23.36-23.53 55.87-23.53h669.82q32.74 0 56.26 23.53 23.53 23.52 23.53 56.26v509.82q0 32.51-23.53 55.87-23.52 23.35-56.26 23.35H145.09Zm0-79.22h669.82v-425.82H145.09v425.82ZM300-292l-42-42 103-104-104-104 43-42 146 146-146 146Zm190 4v-60h220v60H490Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M636.17-32.59 480.35-188.41l45.82-46.07 77.13 77.37v-137.32H356.93q-28.1 0-46.8-18.55-18.7-18.54-18.7-46.95V-600.3H74.02v-65.27h217.41v-137.32l-77.36 77.37-45.59-45.83 155.59-155.82 156.06 155.82-46.06 45.83-77.14-77.37v442.96h529.29v65.5H669.04v137.32l77.13-77.37L792-188.41 636.17-32.59ZM603.3-419.93V-600.3H416.93v-65.27H603.3q28.37 0 47.06 18.56 18.68 18.55 18.68 46.71v180.37H603.3Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#FFFFFF">
2
+ <path d="M126-206.43 66.43-266 380-579.57 539.43-419.7l298-335 56.14 54.57-352.44 399.26L380-460.43l-254 254Z"/>
3
+ </svg>
bec_widgets/cli/client.py CHANGED
@@ -16,6 +16,7 @@ class Widgets(str, enum.Enum):
16
16
  BECDock = "BECDock"
17
17
  BECDockArea = "BECDockArea"
18
18
  BECFigure = "BECFigure"
19
+ BECImageWidget = "BECImageWidget"
19
20
  BECMotorMapWidget = "BECMotorMapWidget"
20
21
  BECQueue = "BECQueue"
21
22
  BECStatusBox = "BECStatusBox"
@@ -350,7 +351,7 @@ class BECDockArea(RPCBase, BECGuiClientMixin):
350
351
  name: "str" = None,
351
352
  position: "Literal['bottom', 'top', 'left', 'right', 'above', 'below']" = None,
352
353
  relative_to: "BECDock | None" = None,
353
- closable: "bool" = False,
354
+ closable: "bool" = True,
354
355
  floating: "bool" = False,
355
356
  prefix: "str" = "dock",
356
357
  widget: "str | QWidget | None" = None,
@@ -822,7 +823,7 @@ class BECImageShow(RPCBase):
822
823
  """
823
824
 
824
825
  @rpc_call
825
- def add_monitor_image(
826
+ def image(
826
827
  self,
827
828
  monitor: "str",
828
829
  color_map: "Optional[str]" = "magma",
@@ -833,7 +834,17 @@ class BECImageShow(RPCBase):
833
834
  **kwargs,
834
835
  ) -> "BECImageItem":
835
836
  """
836
- None
837
+ Add an image to the figure. Always access the first image widget in the figure.
838
+
839
+ Args:
840
+ monitor(str): The name of the monitor to display.
841
+ color_bar(Literal["simple","full"]): The type of color bar to display.
842
+ color_map(str): The color map to use for the image.
843
+ data(np.ndarray): Custom data to display.
844
+ vrange(tuple[float, float]): The range of values to display.
845
+
846
+ Returns:
847
+ BECImageItem: The image item.
837
848
  """
838
849
 
839
850
  @rpc_call
@@ -1125,6 +1136,180 @@ class BECImageShow(RPCBase):
1125
1136
  """
1126
1137
 
1127
1138
 
1139
+ class BECImageWidget(RPCBase):
1140
+ @rpc_call
1141
+ def image(
1142
+ self,
1143
+ monitor: "str",
1144
+ color_map: "Optional[str]" = "magma",
1145
+ color_bar: "Optional[Literal['simple', 'full']]" = "full",
1146
+ downsample: "Optional[bool]" = True,
1147
+ opacity: "Optional[float]" = 1.0,
1148
+ vrange: "Optional[tuple[int, int]]" = None,
1149
+ **kwargs,
1150
+ ) -> "BECImageItem":
1151
+ """
1152
+ None
1153
+ """
1154
+
1155
+ @rpc_call
1156
+ def set(self, **kwargs):
1157
+ """
1158
+ Set the properties of the plot widget.
1159
+
1160
+ Args:
1161
+ **kwargs: Keyword arguments for the properties to be set.
1162
+
1163
+ Possible properties:
1164
+ - title: str
1165
+ - x_label: str
1166
+ - y_label: str
1167
+ - x_scale: Literal["linear", "log"]
1168
+ - y_scale: Literal["linear", "log"]
1169
+ - x_lim: tuple
1170
+ - y_lim: tuple
1171
+ - legend_label_size: int
1172
+ """
1173
+
1174
+ @rpc_call
1175
+ def set_title(self, title: "str"):
1176
+ """
1177
+ Set the title of the plot widget.
1178
+
1179
+ Args:
1180
+ title(str): Title of the plot.
1181
+ """
1182
+
1183
+ @rpc_call
1184
+ def set_x_label(self, x_label: "str"):
1185
+ """
1186
+ Set the x-axis label of the plot widget.
1187
+
1188
+ Args:
1189
+ x_label(str): Label of the x-axis.
1190
+ """
1191
+
1192
+ @rpc_call
1193
+ def set_y_label(self, y_label: "str"):
1194
+ """
1195
+ Set the y-axis label of the plot widget.
1196
+
1197
+ Args:
1198
+ y_label(str): Label of the y-axis.
1199
+ """
1200
+
1201
+ @rpc_call
1202
+ def set_x_scale(self, x_scale: "Literal['linear', 'log']"):
1203
+ """
1204
+ Set the scale of the x-axis of the plot widget.
1205
+
1206
+ Args:
1207
+ x_scale(Literal["linear", "log"]): Scale of the x-axis.
1208
+ """
1209
+
1210
+ @rpc_call
1211
+ def set_y_scale(self, y_scale: "Literal['linear', 'log']"):
1212
+ """
1213
+ Set the scale of the y-axis of the plot widget.
1214
+
1215
+ Args:
1216
+ y_scale(Literal["linear", "log"]): Scale of the y-axis.
1217
+ """
1218
+
1219
+ @rpc_call
1220
+ def set_x_lim(self, x_lim: "tuple"):
1221
+ """
1222
+ Set the limits of the x-axis of the plot widget.
1223
+
1224
+ Args:
1225
+ x_lim(tuple): Limits of the x-axis.
1226
+ """
1227
+
1228
+ @rpc_call
1229
+ def set_y_lim(self, y_lim: "tuple"):
1230
+ """
1231
+ Set the limits of the y-axis of the plot widget.
1232
+
1233
+ Args:
1234
+ y_lim(tuple): Limits of the y-axis.
1235
+ """
1236
+
1237
+ @rpc_call
1238
+ def set_vrange(self, vmin: "float", vmax: "float", name: "str" = None):
1239
+ """
1240
+ Set the range of the color bar.
1241
+ If name is not specified, then set vrange for all images.
1242
+
1243
+ Args:
1244
+ vmin(float): Minimum value of the color bar.
1245
+ vmax(float): Maximum value of the color bar.
1246
+ name(str): The name of the image. If None, apply to all images.
1247
+ """
1248
+
1249
+ @rpc_call
1250
+ def set_fft(self, enable: "bool" = False, name: "str" = None):
1251
+ """
1252
+ Set the FFT of the image.
1253
+ If name is not specified, then set FFT for all images.
1254
+
1255
+ Args:
1256
+ enable(bool): Whether to perform FFT on the monitor data.
1257
+ name(str): The name of the image. If None, apply to all images.
1258
+ """
1259
+
1260
+ @rpc_call
1261
+ def set_transpose(self, enable: "bool" = False, name: "str" = None):
1262
+ """
1263
+ Set the transpose of the image.
1264
+ If name is not specified, then set transpose for all images.
1265
+
1266
+ Args:
1267
+ enable(bool): Whether to transpose the monitor data before displaying.
1268
+ name(str): The name of the image. If None, apply to all images.
1269
+ """
1270
+
1271
+ @rpc_call
1272
+ def set_rotation(self, deg_90: "int" = 0, name: "str" = None):
1273
+ """
1274
+ Set the rotation of the image.
1275
+ If name is not specified, then set rotation for all images.
1276
+
1277
+ Args:
1278
+ deg_90(int): The rotation angle of the monitor data before displaying.
1279
+ name(str): The name of the image. If None, apply to all images.
1280
+ """
1281
+
1282
+ @rpc_call
1283
+ def set_log(self, enable: "bool" = False, name: "str" = None):
1284
+ """
1285
+ Set the log of the image.
1286
+ If name is not specified, then set log for all images.
1287
+
1288
+ Args:
1289
+ enable(bool): Whether to perform log on the monitor data.
1290
+ name(str): The name of the image. If None, apply to all images.
1291
+ """
1292
+
1293
+ @rpc_call
1294
+ def set_grid(self, x_grid: "bool", y_grid: "bool"):
1295
+ """
1296
+ Set the grid visibility of the plot widget.
1297
+
1298
+ Args:
1299
+ x_grid(bool): Visibility of the x-axis grid.
1300
+ y_grid(bool): Visibility of the y-axis grid.
1301
+ """
1302
+
1303
+ @rpc_call
1304
+ def lock_aspect_ratio(self, lock: "bool"):
1305
+ """
1306
+ Lock the aspect ratio of the plot widget.
1307
+
1308
+ Args:
1309
+ lock(bool): Lock the aspect ratio.
1310
+ """
1311
+
1312
+
1128
1313
  class BECMotorMap(RPCBase):
1129
1314
  @property
1130
1315
  @rpc_call
@@ -49,9 +49,11 @@ class JupyterConsoleWindow(QWidget): # pragma: no cover:
49
49
  "d0": self.d0,
50
50
  "d1": self.d1,
51
51
  "d2": self.d2,
52
- "wave": self.wave,
53
- "bar": self.bar,
54
- "cm": self.colormap,
52
+ "wave": self.wf,
53
+ # "bar": self.bar,
54
+ # "cm": self.colormap,
55
+ "im": self.im,
56
+ "mm": self.mm,
55
57
  }
56
58
  )
57
59
 
@@ -155,26 +157,23 @@ class JupyterConsoleWindow(QWidget): # pragma: no cover:
155
157
  def _init_dock(self):
156
158
 
157
159
  self.d0 = self.dock.add_dock(name="dock_0")
158
- self.fig0 = self.d0.add_widget("BECFigure")
159
- data = np.random.rand(10, 2)
160
- self.fig0.plot(data, label="2d Data")
161
- self.fig0.image("eiger", vrange=(0, 100))
160
+ self.mm = self.d0.add_widget("BECMotorMapWidget")
161
+ self.mm.change_motors("samx", "samy")
162
162
 
163
163
  self.d1 = self.dock.add_dock(name="dock_1", position="right")
164
- self.fig1 = self.d1.add_widget("BECFigure")
165
- self.fig1.plot(x_name="samx", y_name="bpm4i")
166
- self.fig1.plot(x_name="samx", y_name="bpm3a")
164
+ self.im = self.d1.add_widget("BECImageWidget")
165
+ self.im.image("eiger")
167
166
 
168
167
  self.d2 = self.dock.add_dock(name="dock_2", position="bottom")
169
- self.wave = self.d2.add_widget("BECWaveformWidget", row=0, col=0)
170
- # self.wave.plot(x_name="samx", y_name="bpm3a")
171
- # self.wave.plot(x_name="samx", y_name="bpm4i", dap="GaussianModel")
172
- self.bar = self.d2.add_widget("RingProgressBar", row=0, col=1)
173
- self.bar.set_diameter(200)
174
-
175
- self.d3 = self.dock.add_dock(name="dock_3", position="bottom")
176
- self.colormap = pg.GradientWidget()
177
- self.d3.add_widget(self.colormap, row=0, col=0)
168
+ self.wf = self.d2.add_widget("BECWaveformWidget", row=0, col=0)
169
+ self.wf.plot(x_name="samx", y_name="bpm3a")
170
+ self.wf.plot(x_name="samx", y_name="bpm4i", dap="GaussianModel")
171
+ # self.bar = self.d2.add_widget("RingProgressBar", row=0, col=1)
172
+ # self.bar.set_diameter(200)
173
+
174
+ # self.d3 = self.dock.add_dock(name="dock_3", position="bottom")
175
+ # self.colormap = pg.GradientWidget()
176
+ # self.d3.add_widget(self.colormap, row=0, col=0)
178
177
 
179
178
  self.dock.save_state()
180
179