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)