Becplotter new config fix
Description
The new config hierarchy introduced in bec-widgets!31 is not compatible with the previous version of BECPlotter
to launch plotting from CLI.
Related Issues
- closes #154 (closed)
Type of Change
-
BECPlotter
default config changed to new style -
BECPlotter
set_xsource, set_ysource and label changes adapted to new configs -
BECPlotter
allredis
related methods refactored to include tags which can be picked up byBECMonitror
during database creating
Potential side effects
The changes to sourceredis
are to working, I would like to discuss how theBECMonitor
should be adapted.Changes of source and labels are not refreshed withBECPlotter.refresh()
, to change configuration one has to close and show the plotter window to see the changes.ATMBECMonitor
can access the msg fromredis
with data send, however ATM no plotting logic
Screenshots / GIFs (if applicable)
Additional Comments
Old vs new style of config:
OLD_CONFIG = {
"plot_settings": {
"background_color": "white",
"axis_width": 2,
"num_columns": 5,
"colormap": "plasma",
"scan_types": False,
},
"plot_data": [
{
"plot_name": "BPM4i plots vs samx",
"x": {"label": "Motor Y", "signals": [{"name": "samx"}]},
"y": {"label": "bpm4i", "signals": [{"name": "bpm4i"}]},
}
],
}
NEW_CONFIG = {
"plot_settings": {
"background_color": "white",
"axis_width": 2,
"num_columns": 5,
"colormap": "plasma",
"scan_types": False,
},
"plot_data": [
{
"plot_name": "BPM4i plots vs samx",
"x_label": "Motor Y",
"y_label": "bpm4i",
"sources": [
{
"type": "scan_segment",
"signals": {
"x": [{"name": "samx"}],
"y": [{"name": "bpm4i"}],
},
},
],
},
],
}
Definition of Done
-
Documentation is up-to-date. -
Fix redis source flag. -
Fix live update for config without reopening the plotting window. -
Check compatibility with BECMonitor
-
!388 (merged) has to be merged before this one
Edited by wyzula_j