From bddbb1de9976382248aacba18962915ba6eb66ac Mon Sep 17 00:00:00 2001 From: x03daop Date: Wed, 3 Aug 2016 11:21:07 +0200 Subject: [PATCH] Script execution --- script/RefocusYRotScan.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/script/RefocusYRotScan.py b/script/RefocusYRotScan.py index e8981118..de3d413b 100644 --- a/script/RefocusYRotScan.py +++ b/script/RefocusYRotScan.py @@ -13,8 +13,8 @@ STEPS = 20 LATENCY = 0.5 ENDSCAN = True -global MOTORS = (RefocusYRot) -global SENSORS = (Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution) +MOTORS = (RefocusYRot) +SENSORS = (Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution) STARTPOS = (-DISTANCE / 2.0) ENDPOS = (DISTANCE / 2.0) RELATIVE = True @@ -22,8 +22,13 @@ RELATIVE = True adjust_sensors() set_adc_averaging() +def trig_sensors(): + wait_beam() + trig_scienta() + caput("X03DA-OP-10ADC:TRG.PROC", 1) + try: - lscan(MOTORS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout) + lscan(MOTORS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=trig_sensors, after_read = after_readout) finally: if ENDSCAN: after_scan()