From a7441ea4bce4c74c39f7b8a07c0ec63a70f5af4f Mon Sep 17 00:00:00 2001 From: x03daop Date: Mon, 1 Aug 2016 17:09:58 +0200 Subject: [PATCH] Script execution --- script/RefocusYRotScan.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 script/RefocusYRotScan.py diff --git a/script/RefocusYRotScan.py b/script/RefocusYRotScan.py new file mode 100644 index 00000000..e62b98eb --- /dev/null +++ b/script/RefocusYRotScan.py @@ -0,0 +1,29 @@ +""" +Refocusing mirror Ry scan + +set scan parameters below, move the mirror to the center position. +set analyser parameters separately! +""" + +import math + +# adjust the following parameters +DISTANCE = 0.2 +STEPS = 20 +LATENCY = 0.5 +ENDSCAN = True + +MOTOR = (RefocusYRot) +SENSORS = (Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution) +STARTPOS = (-DISTANCE / 2.0) +ENDPOS = (DISTANCE / 2.0) +RELATIVE = True + +adjust_sensors() +set_adc_averaging() + +try: + lscan(MOTOR, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout) +finally: + if ENDSCAN: + after_scan()