Script execution

This commit is contained in:
gac-x03da
2018-10-04 10:46:06 +02:00
parent 5cd61dba76
commit 17f4aaac45
+18 -38
View File
@@ -7,52 +7,38 @@ MOTORS = [Eph]
#workfunction = 4.3eV
#262eV : KE = 70eV for B 1s
#200eV : KE = 70eV for Ge 3p
#200eV : KE = 70eV for Ge 3p
POSITIONS_QUICK = [435]
REGION_QUICK = {'name': 'QUICK', 'elo': 398., 'ehi': 405., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 1, 'cis': True}
REGIONS_QUICK = [REGION_QUICK]
POSITIONS_1 = [435]
#for nn in range(0):
# POSITIONS_1.append(POSITIONS_1[-1]+4)
REGION_1 = {'name': 'Ge 3d', 'elo': 398., 'ehi': 405., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 10, 'cis': True}
REGIONS_1 = [REGION_1]
POSITIONS_2 = [435]
#for nn in range(0):
# POSITIONS_1.append(POSITIONS_1[-1]+4)
REGION_2 = {'name': 'Cu 3p', 'elo': 349., 'ehi': 360., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 1, 'cis': True}
REGIONS_2 = [REGION_2]
POSITIONS_3 = [300]
#for nn in range(0):
# POSITIONS_1.append(POSITIONS_1[-1]+4)
REGION_3 = {'name': 'Si 2p', 'elo': 193., 'ehi': 200., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 10, 'cis': True}
REGIONS_3 = [REGION_3]
POSITIONS_4 = [300]
#for nn in range(0):
# POSITIONS_3.append(POSITIONS_3[-1]+4)
REGION_4 = {'name': 'Si 2s', 'elo': 140., 'ehi': 150., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 10, 'cis': True}
REGIONS_4 = [REGION_4]
POSITIONS_5 = [300]
#for nn in range(0):
# POSITIONS_3.append(POSITIONS_3[-1]+4)
REGION_5 = {'name': 'Cu 3p', 'elo': 210., 'ehi': 230., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 6, 'cis': True}
REGIONS_5 = [REGION_5]
POSITIONS_6 = [70]
#for nn in range(0):
# POSITIONS_3.append(POSITIONS_3[-1]+4)
REGION_6 = {'name': 'VB', 'elo': 55., 'ehi': 68., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 7, 'cis': True}
REGIONS_6 = [REGION_6]
# XSP check for beam damage
POSITIONB = [550]
REGION3 = {'name': 'N 1s peak', 'elo': 134., 'ehi': 154, 'estep': 0.05, 'epass': 50, 'tstep': 0.5, 'iter': 1, 'cis': True}
REGIONSB = [REGION3]
CLOSE_SHUTTER_AT_END = True
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
@@ -206,14 +192,9 @@ try:
task = fork(update_live_plots)
# theta (polar), phi (azimuth), x, y, z
sample_pos = [[-9.1,-90.0,0.7, -0.4, 115.0],
[-9.1,-90.0,0.5, -0.4, 115.0],
[-9.1,-90.0,0.5, -0.3, 115.0],
[-9.1,-90.0,0.8, -0.4, 115.0],
[-9.1,-90.0,0.8, -0.5, 115.0],
[-9.1,-90.0,0.9, -0.5, 115.0]]
#[-9.1,-90.0,0.5, 0.0, 114.0]]
#sample_pos = [[-9.1,-90.0,0.5,-0.5,117.0]]
for nn in sample_pos:
[-9.1,-90.0,0.5, -0.4, 116.0]]
for (index, nn) in enumerate(sample_pos):
polar = nn[0]
azimuth = nn[1]
ManipulatorX.move(nn[2])
@@ -222,17 +203,16 @@ try:
ManipulatorTheta.move(polar)
#ManipulatorPhi.move(nn[1])
#do_scan(MOTORS, POSITIONB, REGIONSB, LATENCY) #XPS before PhD
#for bb in range(6):
do_scan(MOTORS, POSITIONS_3, REGIONS_3, LATENCY, nn)
do_scan(MOTORS, POSITIONS_4, REGIONS_4, LATENCY, nn)
do_scan(MOTORS, POSITIONS_5, REGIONS_5, LATENCY, nn)
do_scan(MOTORS, POSITIONS_6, REGIONS_6, LATENCY, nn)
#do_scan(MOTORS, POSITIONS_1, REGIONS_1, LATENCY, nn) #PhD
#do_scan(MOTORS, POSITIONS_3, REGIONS_3, LATENCY, nn) #PhD
#do_scan(MOTORS, POSITIONB, REGIONSB, LATENCY) #XPS after PhD
if index == 0:
do_scan(MOTORS, POSITIONS_QUICK, REGIONS_QUICK, LATENCY, nn)
#do_scan(MOTORS, POSITIONS_1, REGIONS_1, LATENCY, nn)
#do_scan(MOTORS, POSITIONS_2, REGIONS_2, LATENCY, nn)
#do_scan(MOTORS, POSITIONS_3, REGIONS_3, LATENCY, nn)
else if index == 1:
do_scan(MOTORS, POSITIONS_QUICK, REGIONS_QUICK, LATENCY, nn)
#do_scan(MOTORS, POSITIONS_4, REGIONS_4, LATENCY, nn)
#do_scan(MOTORS, POSITIONS_5, REGIONS_5, LATENCY, nn)
#do_scan(MOTORS, POSITIONS_6, REGIONS_6, LATENCY, nn)
finally:
if CLOSE_SHUTTER_AT_END: