From 6d84362b107eccb334609a50f71b444ea468b83f Mon Sep 17 00:00:00 2001 From: X11MA Date: Tue, 9 Feb 2016 13:44:05 +0100 Subject: [PATCH] Closedown --- script/DelayScan.py | 49 +++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/script/DelayScan.py b/script/DelayScan.py index d6615ae..91aa757 100644 --- a/script/DelayScan.py +++ b/script/DelayScan.py @@ -15,7 +15,29 @@ elif ID2 == 1: caput ("X11PHS-E:OPT","PGM+ID2") else: caput ("X11PHS-E:OPT","PGM+ID1+ID2")''' - + +def switchpol(activeID, runtype): + global pol_str + if activeID == 1: + caput(OTF_OFF1,OFFSET1) + caput(OTF_OFF2,OFFSET2-40) #detune ID2 + if runtype in ["+/-", "+"]: + pol_str = "circ +" + elif runtype in ["LH/LV", "LH"]: + pol_str = "Lin. Horizontal" + elif activeID == 2: + caput(OTF_OFF1,OFFSET1-40) #detune ID1 + caput(OTF_OFF2,OFFSET2) + if runtype in ["+/-", "-"]: + pol_str = "circ -" + elif runtype in ["LH/LV", "LV"]: + pol_str = "Lin. Vertical" + else: + raise Exception("Invalid parameter") + + +pol_str = None +polswitch = 1 number_of_scans = 1 if RUNTYPE in ["+/-", "+", "-"]: caput(OTF_MODE1,1) # circ + in ID1 @@ -46,31 +68,10 @@ elif RUNTYPE in ["+/-", "+", "LH/LV", "LH"]: switchpol(1, RUNTYPE) # tune ID1 --> polarization: C+ or LH time.sleep(1.0) -def switchpol(activeID, runtype): - global pol_str - if activeID == 1: - caput(OTF_OFF1,OFFSET1) - caput(OTF_OFF2,OFFSET2-40) #detune ID2 - if runtype in ["+/-", "+"]: - pol_str = "circ +" - elif runtype in ["LH/LV", "LH"]: - pol_str = "Lin. Horizontal" - elif activeID == 2: - caput(OTF_OFF1,OFFSET1-40) #detune ID1 - caput(OTF_OFF2,OFFSET2) - if runtype in ["+/-", "-"]: - pol_str = "circ -" - elif runtype in ["LH/LV", "LV"]: - pol_str = "Lin. Vertical" - else: - raise Exception("Invalid parameter") - - -pol_str = None -polswitch = 1 - caput (TIME_DELAY_SET, START) caput (TIME_DELAY_START, 1) +wait_channel(TIME_DELAY_COMPLETE, 'SCAN Complete') + ############################################################################### # Plotting ###############################################################################