From 564560bfca62c1049e628c23f9bc3e63e1143993 Mon Sep 17 00:00:00 2001 From: gac-x03da Date: Thu, 1 Feb 2018 17:31:44 +0100 Subject: [PATCH] Script execution --- script/optics/FocusTemperatureScan.py | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 script/optics/FocusTemperatureScan.py diff --git a/script/optics/FocusTemperatureScan.py b/script/optics/FocusTemperatureScan.py new file mode 100644 index 00000000..5a7606a7 --- /dev/null +++ b/script/optics/FocusTemperatureScan.py @@ -0,0 +1,34 @@ +""" +Focusing mirror temperature scan + +""" + +import math + +FmuTemperatureSet = ch.psi.pshell.epics.ChannelDouble("X03DA-PC-HUBER:TEMP-SP") +FmuTemperatureRbk = ch.psi.pshell.epics.ChannelDouble("X03DA-PC-HUBER:TEMP-I-RBV") + +#MOTORS = ["ca://X03DA-PC-HUBER:TEMP-SP"] +#SENSORS = [OpticsCameraCentroidX, OpticsCameraSigmaX, "ca://X03DA-PC-HUBER:TEMP-I-RBV"] +MOTORS = [FmuTemperatureSet] +SENSORS = [OpticsCameraCentroidX, OpticsCameraSigmaX, FmuTemperatureRbk] +STARTPOS = 21.5 +ENDPOS = 23.0 +STEPS = 0.1 +RELATIVE = False +LATENCY = 60.0 +ENDSCAN = False + +adjust_sensors() +set_adc_averaging() + +def trig_sensors(): + wait_beam() + +try: + #caput("X03DA-PC-HUBER:TEMP-SP", STARTPOS) + #time.sleep(240.0) + lscan(MOTORS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=trig_sensors, after_read = after_readout) +finally: + if ENDSCAN: + after_scan()