From bf767e3ba3044b815d33a5d0cd14636ec341b813 Mon Sep 17 00:00:00 2001 From: gac-x03da Date: Wed, 26 Apr 2023 15:53:57 +0200 Subject: [PATCH] Script execution --- script/optics/RefocusTRYScan.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 script/optics/RefocusTRYScan.py diff --git a/script/optics/RefocusTRYScan.py b/script/optics/RefocusTRYScan.py new file mode 100644 index 00000000..eb0c615b --- /dev/null +++ b/script/optics/RefocusTRYScan.py @@ -0,0 +1,27 @@ +""" +Refocusing mirror TRY axis scan + +set scan parameters below, move the mirror to the center position. +set analyser parameters separately! +""" + +import math + +STEPS = 0.1 +LATENCY = 0.0 +ENDSCAN = False + +MOTORS = ('ca://X03DA-OP-RMU:TRY') +SENSORS = (Counts, SampleCurrent, RefCurrent, MachineCurrent, EnergyDistribution, AngleDistribution) +STARTPOS = (-50.) +ENDPOS = (-40.) +RELATIVE = False + +adjust_sensors() +set_adc_averaging() + +try: + lscan(MOTORS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=before_readout, after_read = after_readout) +finally: + if ENDSCAN: + after_scan()