Script execution

This commit is contained in:
gac-x03da
2019-03-26 01:53:41 +01:00
parent 16c7ef14f9
commit 3ce87f6b6f

View File

@@ -13,18 +13,67 @@ MOTORS = [Eph]
#REGION_dummy = {'name': 'dummy', 'elo': 398., 'ehi': 405., 'estep': 1, 'epass': 10, 'tstep': 0.5, 'iter': 1, 'cis': True}
#REGIONS_dummy = [REGION_dummy]
POSITIONS_1 = [710]
REGION_1 = {'name': 'Ag3d5/2', 'elo': 60., 'ehi': 64., 'estep': 0.075, 'epass': 10, 'tstep': 0.5, 'iter': 1, 'cis': True}
POSITIONS_1 = [137]
REGION_1 = {'name': 'VB', 'elo': 123., 'ehi': 134.5, 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 20, 'cis': True}
REGIONS_1 = [REGION_1]
POSITIONS_2 = [705]
REGION_2 = {'name': 'Ge', 'elo': 20., 'ehi': 24., 'estep': 0.075, 'epass': 50, 'tstep': 0.5, 'iter': 1, 'cis': True}
POSITIONS_2 = [135]
REGION_2 = {'name': 'VB', 'elo': 121., 'ehi': 132.5, 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 20, 'cis': True}
REGIONS_2 = [REGION_2]
POSITIONS_3 = [429]
REGION_3 = {'name': 'VB', 'elo': 410., 'ehi': 429., 'estep': 0.075, 'epass':10, 'tstep': 0.5, 'iter': 2, 'cis': True}
POSITIONS_3 = [70]
REGION_3 = {'name': 'VB', 'elo': 55., 'ehi': 68., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 10, 'cis': True}
REGIONS_3 = [REGION_3]
POSITIONS_4 = [137]
REGION_4 = {'name': 'VB', 'elo': 123., 'ehi': 134.5, 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 20, 'cis': True}
REGIONS_4 = [REGION_4]
POSITIONS_5 = [135]
REGION_5 = {'name': 'VB', 'elo': 121., 'ehi': 132.5, 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 20, 'cis': True}
REGIONS_5 = [REGION_5]
POSITIONS_6 = [70]
REGION_6 = {'name': 'VB', 'elo': 55., 'ehi': 68., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 10, 'cis': True}
REGIONS_6 = [REGION_6]
POSITIONS_7 = [435]
REGION_7 = {'name': 'Ag3d', 'elo': 60.5, 'ehi': 64.5, 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 10, 'cis': True}
REGIONS_7 = [REGION_7]
POSITIONS_8 = [400]
REGION_8 = {'name': 'C1s', 'elo': 107.5, 'ehi': 113.5, 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 10, 'cis': True}
REGIONS_8 = [REGION_8]
POSITIONS_10 = [300]
REGION_10 = {'name': 'Si2p', 'elo': 193., 'ehi': 199., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 10, 'cis': True}
REGIONS_10 = [REGION_10]
POSITIONS_11 = [250]
REGION_11 = {'name': 'Si2p', 'elo': 143., 'ehi': 149., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 10, 'cis': True}
REGIONS_11 = [REGION_11]
POSITIONS_12 = [200]
REGION_12 = {'name': 'Ge3d', 'elo': 162.5, 'ehi': 168., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 10, 'cis': True}
REGIONS_12 = [REGION_12]
POSITIONS_13 = [120]
REGION_13 = {'name': 'Ge3d', 'elo': 84., 'ehi': 88., 'estep': 0.05, 'epass': 10, 'tstep': 0.5, 'iter': 10, 'cis': True}
REGIONS_13 = [REGION_13]
CLOSE_SHUTTER_AT_END = True
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
@@ -178,7 +227,8 @@ try:
task = fork(update_live_plots)
# theta (polar), phi (azimuth), x, y, z
sample_pos = [[-9.1,-90.0,0.9, 0.35, 114.5],
[-9.1,-90.0,0.9, 0.35, 114.2]]
[50.9,-90.0,-1.4, 2.6, 114.2],
[-9.1,-90.0,0.9, 0.35, 114.5]]
for (index, nn) in enumerate(sample_pos):
polar = nn[0]
@@ -192,15 +242,25 @@ try:
if index == 0:
#do_scan(MOTORS, POSITIONS_QUICK, REGIONS_QUICK, LATENCY, nn)
do_scan(MOTORS, POSITIONS_1, REGIONS_1, LATENCY, nn)
elif index == 1:
do_scan(MOTORS, POSITIONS_2, REGIONS_2, LATENCY, nn)
do_scan(MOTORS, POSITIONS_3, REGIONS_3, LATENCY, nn)
elif index == 1:
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_7, REGIONS_7, LATENCY, nn)
#do_scan(MOTORS, POSITIONS_QUICK, REGIONS_QUICK, LATENCY, nn)
#do_scan(MOTORS, POSITIONS_dummy, REGIONS_dummy, LATENCY, nn)
#do_scan(MOTORS, POSITIONS_3, REGIONS_3, LATENCY, nn)
#elif index == 2:
elif index == 2:
do_scan(MOTORS, POSITIONS_8, REGIONS_8, LATENCY, nn)
do_scan(MOTORS, POSITIONS_10, REGIONS_10, LATENCY, nn)
do_scan(MOTORS, POSITIONS_11, REGIONS_11, LATENCY, nn)
do_scan(MOTORS, POSITIONS_12, REGIONS_12, LATENCY, nn)
do_scan(MOTORS, POSITIONS_13, REGIONS_13, LATENCY, nn)
#do_scan(MOTORS, POSITIONS_4, REGIONS_4, LATENCY, nn)
#do_scan(MOTORS, POSITIONS_5, REGIONS_5, LATENCY, nn)
#elif index == 3: