added nice print for collected histories
This commit is contained in:
14
qspace.py
14
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")
|
||||
|
Reference in New Issue
Block a user