Script execution

This commit is contained in:
x03daop
2016-08-06 21:54:39 +02:00
parent 6c97f8e2f5
commit b3227c5efd

View File

@@ -81,11 +81,6 @@ def measure_stuff():
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
bb = bb+1
energy_scale_table = "scan " + str(bb) + "/EnergyScale"
print energy_scale_table
create_dataset(energy_scale_table, 'd', dimensions=[0,9])
adjust_sensors()
set_adc_averaging()
@@ -102,7 +97,11 @@ def measure_stuff():
Scienta.getStepTime().write(angle_time[jj])
#print ' Flag 2'
sleep(1)
vscan(Eph, SENSORS, VECTOR, True, LATENCY,False, before_read=wait_beam, after_read = after_readout)
bb = bb+1
energy_scale_table = "scan " + str(bb) + "/EnergyScale"
print energy_scale_table
create_dataset(energy_scale_table, 'd', dimensions=[0,9])
#vscan(Eph, SENSORS, VECTOR, True, LATENCY,False, before_read=wait_beam, after_read = after_readout)
toc = time.time()
tictoc = round((toc-tic)/60*100)/100
print 'time taken is ', tictoc, ' minutes'
@@ -124,11 +123,11 @@ pass_energy_hold = 100
initial_energy_range = [[87.2, 95.5, 0.1],
[95.0, 105.0, 0.5]]
angle_time = [0.4, 0.5, 0.6]
angle_time = [0.4, 0.5, 0.6, 0.7]
energy_scale_array = []
azi_range = [-45.]
angle_range = [-9.2]
azi_range = [-90., -45.]
angle_range = [-9.2, -9.2+20, -9.2+40, -9.2+60]
#measure_stuff()
toc_whole = time.time()
tictoc = round(toc_whole-tic_whole)
@@ -136,31 +135,6 @@ print ' ** End O 1s PhD **'
print ' ** time taken was ', math.floor(tictoc/3600), ' hours and ', round((tictoc-math.floor(tictoc/3600)*3600)/60), ' minutes.'
print ' ######################################################'
#################### Si 2p PhD scan ##############################
print ' ######################################################'
print ' ** Begin Si 2p PhD **'
tic_whole = time.time()
VECTOR = [ 170.0]
for nn in range(63):
VECTOR.append(VECTOR[-1]+4)
#nn = 0
initial_energy_range = [[63, 67, 0.1],
[67.5, 77, 0.5]]
pass_energy_hold = 20
angle_time = [0.7]
angle_range = [-9.2+60]
azi_range = [-45.]
measure_stuff()
toc_whole = time.time()
tictoc = round(toc_whole-tic_whole)
print ' ** time taken was ', math.floor(tictoc/3600), ' hours and ', round((tictoc-math.floor(tictoc/3600)*3600)/60), ' minutes.'
print ' ** End Si 2p PhD **'
print ' ######################################################'
#################### C 1s PhD scan ##############################
print ' ######################################################'
print ' ** Begin C 1s PhD **'
@@ -174,9 +148,9 @@ for nn in range(63):
initial_energy_range = [[45, 52.4, 0.1],
[52.5, 62.5, 0.5]]
pass_energy_hold = 50
angle_time = [0.4]
angle_range = [-9.2]
azi_range = [-90.]
angle_time = [0.4,0.5,0.6,0.7]
azi_range = [-90., -45.]
angle_range = [-9.2, -9.2+20, -9.2+40, -9.2+60]
#measure_stuff()
toc_whole = time.time()
@@ -184,5 +158,31 @@ tictoc = round(toc_whole-tic_whole)
print ' ** time taken was ', math.floor(tictoc/3600), ' hours and ', round((tictoc-math.floor(tictoc/3600)*3600)/60), ' minutes.'
print ' ** End C 1s PhD **'
print ' ######################################################'
#################### Si 2p PhD scan ##############################
print ' ######################################################'
print ' ** Begin Si 2p PhD **'
tic_whole = time.time()
VECTOR = [ 170.0]
for nn in range(63):
VECTOR.append(VECTOR[-1]+4)
#nn = 0
initial_energy_range = [[63, 67, 0.1],
[67.5, 77, 0.5]]
pass_energy_hold = 20
angle_time = [0.4,0.5,0.6,0.7]
azi_range = [-90., -45.]
angle_range = [-9.2, -9.2+20, -9.2+40, -9.2+60]
measure_stuff()
toc_whole = time.time()
tictoc = round(toc_whole-tic_whole)
print ' ** time taken was ', math.floor(tictoc/3600), ' hours and ', round((tictoc-math.floor(tictoc/3600)*3600)/60), ' minutes.'
print ' ** End Si 2p PhD **'
print ' ######################################################'
#toc = time.time()