Warn on gotocen
Closes #1880 (closed)
This PR display a warning in case of discrepancy between the display in Flint and the plotselect.
Notice that the selected counter have actually nothing to do with Flint. It only depend on plotselect
. If you select something else in Flint in between, it is not used by goto_cen
.
Here is the kind of warning you can have:
DEMO_SESSION [8]: flint(); umv(slit_vertical_gap,.1);ascan(slit_vertical_offset,-1,1,30,.1,beamviewer)
WARNING 2023-02-08 14:24:52,608 flint: Flint starting...
Current Flint PID: 18869
Moving slit_vertical_gap from 0.1000 to 0.1000
slit_vertical_gap slit_top slit_bottom
user 0.100 1.050 -0.950
dial 0.100 1.050 -0.950
DEMO_SESSION [9]:
DEMO_SESSION [9]:
DEMO_SESSION [9]: plotselect("beamviewer:roi_counters:roi1_sum")
Plotted counter(s) last selected with plotselect (could be different from the current display):
- beamviewer:roi_counters:roi1_sum
DEMO_SESSION [10]: goto_cen()
Moving slit_vertical_offset from 1.0000 to -0.2331
Moving slit_top from 1.0500 to -0.1831
Moving slit_bottom from -0.9500 to 0.2831
DEMO_SESSION [11]: goto_cen()
WARNING: The used counter name 'beamviewer:roi_counters:roi1_sum' is not the only one displayed in Flint
Moving slit_vertical_offset from -0.2330 to -0.2331
DEMO_SESSION [12]: goto_cen()
WARNING: The used counter name 'beamviewer:roi_counters:roi1_sum' is not actually displayed in Flint
Moving slit_vertical_offset from -0.2330 to -0.2331
Edited by Valentin Valls