Closedown

This commit is contained in:
X11MA
2016-02-09 13:44:05 +01:00
parent 40a751eee2
commit 6d84362b10

View File

@@ -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
###############################################################################