From 38f1bf3dc1331f7d813c5be0dcd698e7188d8ea7 Mon Sep 17 00:00:00 2001 From: X11MA Date: Sat, 5 Dec 2015 02:20:21 +0100 Subject: [PATCH] Script execution --- script/SetOffsets.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 script/SetOffsets.py diff --git a/script/SetOffsets.py b/script/SetOffsets.py new file mode 100644 index 0000000..e915e80 --- /dev/null +++ b/script/SetOffsets.py @@ -0,0 +1,24 @@ +import os +import traceback + + +print "Setting offsets", + +############################PGM+ID1+ID2################################################### +if RUNTYPE in ["+/-", "+" , "-"]: + caput(OTF_MODE1,1) # circ + in ID1 + caput(OTF_MODE2,2) # circ - in ID2 + elif RUNTYPE in ["LH/LV", "LH", "LV"]: + caput(OTF_MODE1,0) + caput(OTF_MODE2,0) + wait_channel(OTF_DONE, 1, type = 'i') + caput(OTF_ALPHA1, 0.0) # LH in ID1 + caput(OTF_ALPHA2, 90.0) # LV in ID2 + wait_channel(OTF_DONE, 1, type = 'i') + else: + raise Exception("Invalid run type: " + RUNTYPE) + +caput(OTF_OFF1,OFFSET1) +caput(OTF_OFF2,OFFSET2-40) #detune ID2 +wait_channel(OTF_DONE, 1, type = 'i') +print "Offsets are set" \ No newline at end of file