From 3f0ea2b68f90b850f645d3d071452d04870f887f Mon Sep 17 00:00:00 2001 From: gac-x03da Date: Sat, 29 Sep 2018 16:30:45 +0200 Subject: [PATCH] Script execution --- script/users/TUM_PhD.py | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/script/users/TUM_PhD.py b/script/users/TUM_PhD.py index c962dd9c..11e16fb2 100644 --- a/script/users/TUM_PhD.py +++ b/script/users/TUM_PhD.py @@ -9,7 +9,7 @@ MOTORS = [Eph] #100eV : KE = for Ge 3d POSITIONS_B = [262] -for nn in range(20): +for nn in range(62): POSITIONS_B.append(POSITIONS_B[-1]+4) # BORON 1s REGION_B = {'name': 'B 1s peak+tail', 'elo': 62., 'ehi': 75., 'estep': 0.10, 'epass': 20, 'tstep': 0.5, 'iter': 1, 'cis': True} @@ -130,7 +130,7 @@ def update_live_plots(): finally: print "Stopping live spectra" -def do_scan(motors, positions, regions, latency): +def do_scan(motors, positions, regions, latency, polar): global SENSORS SENSORS = [] @@ -162,36 +162,22 @@ def do_scan(motors, positions, regions, latency): set_attribute(get_exec_pars().scanPath + "region{0}/ScientaSpectrum".format(index + 1), "RegionName", region['name']) set_attribute(get_exec_pars().scanPath + "region{0}/ScientaImage".format(index + 1), "RegionName", region['name']) set_attribute(get_exec_pars().scanPath, "Regions", [region['name'] for region in regions]) + #set_attribute(get_exec_pars().scanPath + + "region{0}/Polar".format(index + 1), "Polar", polar) try: setup_live_plots(REGIONS_B) task = fork(update_live_plots) # theta, x, y, z sample_pos = [ [-9.1,0.5, 0.00, 115.0]] - jj = 0 for nn in sample_pos: ManipulatorX.move(nn[1]) ManipulatorY.move(nn[2]) ManipulatorZ.move(nn[3]) ManipulatorTheta.move(nn[0]) + polar = nn[0] #do_scan(MOTORS, POSITIONB, REGIONSB, LATENCY) #XPS before PhD - do_scan(MOTORS, POSITIONS_B, REGIONS_B, LATENCY) #PhD + do_scan(MOTORS, POSITIONS_B, REGIONS_B, LATENCY, polar) #PhD #do_scan(MOTORS, POSITIONB, REGIONSB, LATENCY) #XPS after PhD -# if jj == 0: -# do_scan(MOTORS, POSITIONB, REGIONSB, LATENCY) #XPS before PhD -# do_scan(MOTORS, POSITIONS_N, REGIONS_N, LATENCY) #PhD -# do_scan(MOTORS, POSITIONB, REGIONSB, LATENCY) #XPS after PhD -# jj = 1 -# elif jj == 1: -# do_scan(MOTORS, POSITIONB, REGIONSB, LATENCY) #XPS before PhD -# do_scan(MOTORS, POSITIONS_C, REGIONS_C, LATENCY) #PhD -# do_scan(MOTORS, POSITIONB, REGIONSB, LATENCY) #XPS after PhD -# jj = 2 -# else: -# do_scan(MOTORS, POSITIONB, REGIONSB, LATENCY) #XPS before PhD -# do_scan(MOTORS, POSITIONS_O, REGIONS_O, LATENCY) #PhD -# do_scan(MOTORS, POSITIONB, REGIONSB, LATENCY) #XPS after PhD -# jj = 0 finally: if CLOSE_SHUTTER_AT_END: