From c2c3832fdc3421f0593e691632b2b0ad32e9bf43 Mon Sep 17 00:00:00 2001 From: gac-x03da Date: Fri, 22 Nov 2019 20:37:03 +0100 Subject: [PATCH] Script execution --- script/191122-overnight.py | 88 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 script/191122-overnight.py diff --git a/script/191122-overnight.py b/script/191122-overnight.py new file mode 100644 index 00000000..b74f3e4e --- /dev/null +++ b/script/191122-overnight.py @@ -0,0 +1,88 @@ + + +import ch.psi.pshell.plot.RangeSelectionPlot.RangeSelection as RangeSelection + +REFERENCE_POSITION = {'X':1.4 ,'Y':0.0, 'Z':110.6, 'Theta':-9.1, 'Tilt':0.8, 'Phi':-90.0} +SAMPLE_POSITION = {'X':1.4 ,'Y':0.6, 'Z':116.5, 'Theta':-9.1, 'Tilt':0.8, 'Phi':-90.0} + +def move_to_position(pdict): + ManipulatorX.move(pdict['X']) + ManipulatorY.move(pdict['Y']) + ManipulatorZ.move(pdict['Z']) + ManipulatorTheta.move(pdict['Theta']) + ManipulatorTilt.move(pdict['Tilt']) + ManipulatorPhi.move(pdict['Phi']) + + +binding_center_Au_Ef=0.; +window_Au_Ef=4.; +time_Au_Ef = 15. + +binding_center_Au_4f=86.; +window_Au_4f=15.; +time_Au_4f = 2. + +binding_center_As_3d=43.; +window_As_3d=15.; +time_As_3d=50. + +energies = [1450,950,450] + +exit_slit_dict = {1450:50, 950:25, 450:25} +pass_energy_dict = {1450:50, 950:20, 450:20} + +for e in energies: + + photon_energy = float(e) + ExitSlit.write(exit_slit_dict[e]) + + ##################################################### + #Au-fermi + set_exec_pars(name="Au-Fermi-"+str(e)+"eV") + move_to_position(REFERENCE_POSITION) + + center_Au = photon_energy - 4.5 - binding_center_Au_Ef + rs = RangeSelection(center_Au-window_Au_Ef/2.,center_Au+window_Au_Ef/2.) + rs.setVars([time_Au_Ef, 0.05, 1, photon_energy]) #Time, Size, Iteration, photon energy + + + + run("XPSSpectrum", {"save_scienta_image":True, + "ranges":[rs, ], + "ENDSCAN":False, + "pass_energy":pass_energy_dict[e]}) + + set_exec_pars(open=False) + + ##################################################### + #Au-4f + set_exec_pars(name="Au-4f-"+str(e)+"eV") + center_Au_4f = photon_energy - 4.5 - binding_center_Au_4f + rs = RangeSelection(center_Au_4f-window_Au_4f/2.,center_Au_4f+window_Au_4f/2.) + rs.setVars([time_Au_4f, 0.05, 1, photon_energy]) #Time, Size, Iteration, photon energy + + + run("XPSSpectrum", {"save_scienta_image":True, + "ranges":[rs, ], + "ENDSCAN":False, + "pass_energy":pass_energy_dict[e]}) + + set_exec_pars(open=False) + + ##################################################### + #As + set_exec_pars(name="As-3d-"+str(e)+"eV") + move_to_position(SAMPLE_POSITION) + center_As_3d = photon_energy - 4.5 - binding_center_As_3d + rs = RangeSelection(center_As_3d-window_As_3d/2.,center_As_3d+window_As_3d/2.) + + rs.setVars([time_As_3d, 0.05, 1, photon_energy]) #Time, Size, Iteration, photon energy + + run("XPSSpectrum", {"save_scienta_image":True, + "ranges":[rs, ], + "ENDSCAN":False, + "pass_energy":pass_energy_dict[e]}) + + set_exec_pars(open=False) + +