Bec figure
Description
Provide matplotlib-like enviroment to add subplots (sub widgets) to figure.
Related Issues
closes #87 (closed), #86 (closed), #85 (closed), #75 (closed), #21 (closed), #32 (closed)
Type of Change
-
NEW
BECConnector
→ mixin class for creating connection with client and getting shortcuts for bec services, can be inherited by other widgets. Provides also basic config withwidget_class
andgui_id
. -
NEW
BECFigure
→ container forBECPlotBase
widgets -
NEW
BECPlotBase
→ base class for plotting widgets -
NEW
BECWaveform1D
→ replacement ofBECMonitor
, serves to plot 1Dscan_segment
data -
NEW
CLI
→ CLI client/server for RPC access thought terminal
Potential side effects
None
Screenshots / GIFs (if applicable)
[Include any relevant screenshots or GIFs to showcase the changes made.]
Additional Comments
How to test:
1) Terminal with CLI
This version has limited API defined by USER_ACCESS of the widget class. To test in terminal start ipython
, then you can import CLI version of BECFigure
:
from bec_widgets.cli.client import BECFigure
# Create instance of BECFigure with gui_id 'test'
fig = BECFigure('test')
# Popup figure
fig.show()
# Add Waveform widget
w1 = fig.add_plot()
# Add curve to w1 which will tack scan_segment
w1.add_curve_scan('samx','bpm4i',validate_bec=True) # this will ATM trigger ValueError: Unknown type, however functionality is not affected
2) Debug jupyter console UI
For accessing the whole API, including references from inherited object you can run:
python -m bec_widgets.widgets.figure.figure
Definition of Done
-
[ ] Documentation is up-to-date.→ will be done later #93 (closed) -
Unit Tests - widgets -
[ ] Unit Tests - RPC→ postponed, there is some bug with testing RPC with BECDispatcher not connecting signals forscan_segment
#94 (closed) -
[ ] Figure reconstruction by configs→ not priority ATM #95 (closed) -
Fix RPC access to BECCurve
items.
Edited by wyzula_j