Commit 4d1b88f7 authored by Wout De Nolf's avatar Wout De Nolf
Browse files

fixup

parent 1cfaf047
Pipeline #30560 passed with stages
in 108 minutes and 46 seconds
......@@ -649,8 +649,6 @@ class NexusScanWriterBase(base_subscriber.BaseSubscriber):
items = display_extra.get("displayed_channels", None)
if items is None:
items = display_extra.get("plotselect", None)
if items is None:
items = []
if items:
return {"plotselect": {"items": items, "grid": True}}
else:
......
......@@ -6,6 +6,7 @@
# Distributed under the GNU LGPLv3. See LICENSE for more info.
from bliss.common import scans
from bliss.common.plot import plotselect, plotinit
import nxw_test_utils
import nxw_test_data
......@@ -20,15 +21,31 @@ def _test_nxw_plotselect(
):
scan_saving = session.scan_saving
env_dict = session.env_dict
scan_display = session.scan_display
scan_saving.technique = ""
detectors = [env_dict[name] for name in ["diode3", "diode4", "diode5"]]
names = [env_dict[name].fullname for name in ["diode3", "diode4"]]
scan_display.displayed_channels = names
plots = {}
plots["plotselect"] = {"ndim": 0, "type": "grid", "signals": ["diode3", "diode4"]}
scan_shape = (10,)
plotselect("diode4", "diode5")
# Overwrite plotselect for one scan
plotinit("diode3", "diode4")
plots = {"plotselect": {"ndim": 0, "type": "grid", "signals": ["diode3", "diode4"]}}
scan = scans.loopscan(
scan_shape[0], .1, *detectors, run=False, save_images=save_images
)
nxw_test_utils.run_scan(scan)
nxw_test_utils.wait_scan_data_finished([scan], writer=writer)
nxw_test_data.assert_scan_nxdata(
scan,
plots,
scan_shape=scan_shape,
positioners=[["elapsed_time", "epoch"]],
save_images=save_images,
**kwargs
)
# Fall back to plotselect
plots = {"plotselect": {"ndim": 0, "type": "grid", "signals": ["diode4", "diode5"]}}
scan = scans.loopscan(
scan_shape[0], .1, *detectors, run=False, save_images=save_images
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment