Files
x03da/script/test/TestManipulatorScan.py
gac-x03da bb28c15a39 Closedown
2019-02-19 09:55:33 +01:00

33 lines
716 B
Python

"""
Arguments:
MOTOR (device)
SENSORS (list)
RANGE (tuple (min, max))
STEPS (int or tuple)
LATENCY (double)
RELATIVE (BOOLEAN)
"""
MOTOR = dummy
SENSORS = (Counts, Scienta.spectrum, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution)
RANGE = (0.0, 1.0)
STEPS = 10
LATENCY=0.0
RELATIVE = True
adjust_sensors()
set_preference(Preference.PLOT_TYPES, {'Scienta spectrum':1})
def _before():
trig_scienta()
def _after(rec):
if get_exec_pars().save:
if rec.index == 0:
create_diag_datasets()
append_diag_datasets()
lscan(MOTOR, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, RELATIVE, before_read=_before, after_read = _after, name="test")