126 lines
2.4 KiB
Python
Executable File
126 lines
2.4 KiB
Python
Executable File
import os
|
|
import traceback
|
|
import thread
|
|
import time
|
|
import math
|
|
|
|
# E = [Estart, Eend, time, delay]
|
|
E1 = [270, 320, 6, 0] # C K-edge
|
|
E2 = [520, 570, 6, 0] # O K-edge
|
|
E3 = [630, 670, 6, 0] # Mn L-edge
|
|
E4 = [680, 720, 6, 0] # F K-edge
|
|
E5 = [845, 885, 6, 0] # Ni L-edge
|
|
E6 = [772, 805, 6, 0] # Co L-edge
|
|
E7 = [500, 900, 10, 0] # Survey
|
|
E8 = [680, 750, 2, 0] # Fe L-edge
|
|
E9 = [630, 740, 3, 0] # Mn L-edge
|
|
#E = [E5,E6,E4,E2,E1,E7]
|
|
|
|
run('EnergyMultiScan.py',E8)
|
|
|
|
#run('EnergyMultiScan.py',E)
|
|
'''
|
|
caput("X11MA-VME-ES4:TRX", 5.5)
|
|
caput("X11MA-VME-ES4:TRY", -3.7)
|
|
caput("X11MA-VME-ES4:TRZ", 7.5)
|
|
|
|
time.sleep(1.0)
|
|
|
|
Eset = 845
|
|
error = 10.0
|
|
caput("X11MA-PHS:E_SP",Eset)
|
|
while (abs(error)) > 1.2:
|
|
time.sleep(1.0)
|
|
Ecurr = caget("X11MA-PGM:rbkenergy",'i')
|
|
error = Eset-Ecurr
|
|
|
|
run('EnergyMultiScan.py',E5) # Ni
|
|
|
|
caput("X11MA-KEI11:RANGE", 8)
|
|
caput("X11MA-KEI12:RANGE", 7)
|
|
|
|
Eset = 680 #F
|
|
error = 10.0
|
|
caput("X11MA-PHS:E_SP",Eset)
|
|
while (abs(error)) > 1.2:
|
|
time.sleep(1.0)
|
|
Ecurr = caget("X11MA-PGM:rbkenergy",'i')
|
|
error = Eset-Ecurr
|
|
|
|
|
|
run('EnergyMultiScan.py',E4) # F
|
|
|
|
caput("X11MA-KEI11:RANGE", 9)
|
|
caput("X11MA-KEI12:RANGE", 8)
|
|
|
|
|
|
Eset = 630 #Mn
|
|
error = 10.0
|
|
caput("X11MA-PHS:E_SP",Eset)
|
|
while (abs(error)) > 1.2:
|
|
time.sleep(1.0)
|
|
Ecurr = caget("X11MA-PGM:rbkenergy",'i')
|
|
error = Eset-Ecurr
|
|
|
|
run('EnergyMultiScan.py',E3) # Mn
|
|
|
|
|
|
caput("X11MA-KEI11:RANGE", 9)
|
|
caput("X11MA-KEI12:RANGE", 8)
|
|
|
|
Eset = 520
|
|
error = 10.0
|
|
caput("X11MA-PHS:E_SP",Eset)
|
|
while (abs(error)) > 1.2:
|
|
time.sleep(1.0)
|
|
Ecurr = caget("X11MA-PGM:rbkenergy",'i')
|
|
error = Eset-Ecurr
|
|
|
|
run('EnergyMultiScan.py',E2) # O
|
|
|
|
|
|
caput("X11MA-KEI11:RANGE", 10)
|
|
caput("X11MA-KEI12:RANGE", 8)
|
|
|
|
Eset = 270
|
|
error = 10.0
|
|
caput("X11MA-PHS:E_SP",Eset)
|
|
while (abs(error)) > 1.2:
|
|
time.sleep(1.0)
|
|
Ecurr = caget("X11MA-PGM:rbkenergy",'i')
|
|
error = Eset-Ecurr
|
|
|
|
run('EnergyMultiScan.py',E1) # C
|
|
|
|
caput("X11MA-KEI11:RANGE", 10)
|
|
caput("X11MA-KEI12:RANGE", 9)
|
|
|
|
Eset = 520
|
|
error = 10.0
|
|
caput("X11MA-PHS:E_SP",Eset)
|
|
while (abs(error)) > 1.2:
|
|
time.sleep(1.0)
|
|
Ecurr = caget("X11MA-PGM:rbkenergy",'i')
|
|
error = Eset-Ecurr
|
|
|
|
run('EnergyMultiScan.py',E2) # O
|
|
|
|
caput("X11MA-KEI11:RANGE", 9)
|
|
caput("X11MA-KEI12:RANGE", 8)
|
|
|
|
Eset = 500
|
|
error = 10.0
|
|
caput("X11MA-PHS:E_SP",Eset)
|
|
while (abs(error)) > 1.2:
|
|
time.sleep(1.0)
|
|
Ecurr = caget("X11MA-PGM:rbkenergy",'i')
|
|
error = Eset-Ecurr
|
|
|
|
run('EnergyMultiScan.py',E7) # Survey
|
|
'''
|
|
#n_scans=6
|
|
|
|
#for i in range(0,n_scans):
|
|
# run('EnergyMultiScan.py',E[i])
|
|
|
|
close_vg13() |