diff --git a/qspace.py b/qspace.py index 81086fa..e3410aa 100644 --- a/qspace.py +++ b/qspace.py @@ -9,6 +9,7 @@ from slic.core.adjustable import Adjustable, PVAdjustable from slic.devices.general.motor import Motor from slic.devices.device import Device from slic.devices.simpledevice import SimpleDevice +from slic.utils.printing import printable_table INDICES = { @@ -220,6 +221,19 @@ class HistoryDummy(Adjustable): return False +def print_history(*adjs, enumerate_lines=True, make_legend=True): + labels = [] + histories = [] + for a in adjs: + try: + h = a.history + except AttributeError: + continue + labels.append(repr(a)) + histories.append(h) + print(printable_table(histories, labels, enumerate_lines=enumerate_lines, make_legend=make_legend)) + + # these point to the different motors mu = Motor("SATES30-RIXS:MOT_SRY.VAL")