Script execution
This commit is contained in:
@@ -8,64 +8,85 @@ AuxCurrent: not connected
|
||||
|
||||
import time
|
||||
|
||||
# G600 full spectrum
|
||||
#STARTPOS = (50.0)
|
||||
#ENDPOS = (1100.0)
|
||||
#STEPS = 10.0
|
||||
#LATENCY = 5.0
|
||||
#DWELL = 1.0
|
||||
RANGE = "G1200 full"
|
||||
BEAM = "G1200 1x1"
|
||||
|
||||
# G1200 full spectrum
|
||||
#STARTPOS = (100.0)
|
||||
#ENDPOS = (2000.0)
|
||||
#STEPS = 25.0
|
||||
#LATENCY = 5.0
|
||||
#DWELL = 1.0
|
||||
if RANGE == "G600 full":
|
||||
# G600 full spectrum
|
||||
STARTPOS = (50.0)
|
||||
ENDPOS = (1100.0)
|
||||
STEPS = 10.0
|
||||
LATENCY = 5.0
|
||||
DWELL = 1.0
|
||||
elif RANGE == "G1200 full":
|
||||
# G1200 full spectrum
|
||||
STARTPOS = (100.0)
|
||||
ENDPOS = (2000.0)
|
||||
STEPS = 25.0
|
||||
LATENCY = 5.0
|
||||
DWELL = 1.0
|
||||
elif RANGE == "carbon edge":
|
||||
# carbon edge
|
||||
STARTPOS = (270.0)
|
||||
ENDPOS = (310.0)
|
||||
STEPS = 0.5
|
||||
LATENCY = 1.0
|
||||
DWELL = 1.0
|
||||
|
||||
# carbon edge
|
||||
STARTPOS = (270.0)
|
||||
ENDPOS = (310.0)
|
||||
STEPS = 0.5
|
||||
LATENCY = 1.0
|
||||
DWELL = 1.0
|
||||
|
||||
# G600 1x1 reference sscan_2268 (elog:119)
|
||||
#SampleCurrentGain.write("L, 10^7")
|
||||
#RefCurrentGain.write("L, 10^9")
|
||||
#FrontendHSize.write(1.5)
|
||||
#FrontendVSize.write(1.4)
|
||||
#ExitSlit.write(100.0)
|
||||
|
||||
# G600 1x1 reference sscan_2268 (elog:119)
|
||||
SampleCurrentGain.write("L, 10^5")
|
||||
RefCurrentGain.write("L, 10^7")
|
||||
FrontendHSize.write(6.5)
|
||||
FrontendVSize.write(10.4)
|
||||
ExitSlit.write(100.0)
|
||||
|
||||
# G1200 1x1 reference sscan_2264 (elog:114)
|
||||
#SampleCurrentGain.write("L, 10^8")
|
||||
#RefCurrentGain.write("L, 10^9")
|
||||
#FrontendHSize.write(1.5)
|
||||
#FrontendVSize.write(1.4)
|
||||
#ExitSlit.write(100.0)
|
||||
|
||||
# G1200 6x10 reference sscan_2266 (elog:116)
|
||||
#SampleCurrentGain.write("L, 10^6")
|
||||
#RefCurrentGain.write("L, 10^8")
|
||||
#FrontendHSize.write(6.5)
|
||||
#FrontendVSize.write(10.4)
|
||||
#ExitSlit.write(100.0)
|
||||
if BEAM == "G600 1x1":
|
||||
# G600 1x1 reference sscan_2268 (elog:119)
|
||||
SampleCurrentGain.write("L, 10^7")
|
||||
RefCurrentGain.write("L, 10^9")
|
||||
FrontendHSize.write(1.5)
|
||||
FrontendVSize.write(1.4)
|
||||
ExitSlit.write(100.0)
|
||||
elif BEAM == "G600 6x10":
|
||||
# G600 6x10 reference sscan_2268 (elog:119)
|
||||
SampleCurrentGain.write("L, 10^5")
|
||||
RefCurrentGain.write("L, 10^7")
|
||||
FrontendHSize.write(6.5)
|
||||
FrontendVSize.write(10.4)
|
||||
ExitSlit.write(100.0)
|
||||
elif BEAM == "G1200 1x1":
|
||||
# G1200 1x1 reference sscan_2264 (elog:114)
|
||||
SampleCurrentGain.write("L, 10^8")
|
||||
RefCurrentGain.write("L, 10^9")
|
||||
caput(KEI_DIODE + "RANGE", 7) # 20 nA
|
||||
caput(KEI_RMU + "RANGE", 8) # 2 nA
|
||||
FrontendHSize.write(1.5)
|
||||
FrontendVSize.write(1.4)
|
||||
ExitSlit.write(100.0)
|
||||
elif BEAM == "G1200 6x10":
|
||||
# G1200 6x10 reference sscan_2266 (elog:116)
|
||||
SampleCurrentGain.write("L, 10^6")
|
||||
RefCurrentGain.write("L, 10^8")
|
||||
FrontendHSize.write(6.5)
|
||||
FrontendVSize.write(10.4)
|
||||
ExitSlit.write(100.0)
|
||||
else:
|
||||
# use current settings
|
||||
pass
|
||||
|
||||
KEI_DIODE = "X03DA-KEITHLEY-1:"
|
||||
KEI_RMU = "X03DA-KEITHLEY-2:"
|
||||
|
||||
def trig():
|
||||
wait_beam()
|
||||
caput(KEI_DIODE + "DOINIT", 1)
|
||||
caput(KEI_RMU + "DOINIT", 1)
|
||||
time.sleep(0.1)
|
||||
caput(KEI_DIODE + "DOTRIGGER", 1)
|
||||
caput(KEI_RMU + "DOTRIGGER", 1)
|
||||
caput("X03DA-OP-10ADC:TRG.PROC", 1)
|
||||
time.sleep(DWELL * 1.1)
|
||||
caput(KEI_DIODE + "DOFETCH", 1)
|
||||
caput(KEI_RMU + "DOFETCH", 1)
|
||||
|
||||
value = DWELL * 10.0
|
||||
SampleCurrentAveraging.write(value)
|
||||
RefCurrentAveraging.write(value)
|
||||
|
||||
POSITIONERS = (Eph)
|
||||
SENSORS = (SampleCurrent, RefCurrent, MachineCurrent)
|
||||
SENSORS = (Keithley1, Keithley2, SampleCurrent, RefCurrent, MachineCurrent)
|
||||
|
||||
lscan(POSITIONERS, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, before_read=trig, after_read=after_readout)
|
||||
|
||||
Reference in New Issue
Block a user