Script execution

This commit is contained in:
x03daop
2017-06-09 21:19:37 +02:00
parent 9b873b4bad
commit 959a128ccf
+20 -9
View File
@@ -9,10 +9,13 @@ for nn in range(52):
POSITIONS.append(POSITIONS[-1]+4)
LATENCY = 0.0
REGION1 = {'name': 'N 1s peak', 'elo': 129., 'ehi': 138.5, 'estep': 0.15, 'epass': 100, 'tstep': 1, 'iter': 1, 'cis': True}
REGION2 = {'name': 'N 1s tail', 'elo': 138.5, 'ehi': 148.0, 'estep': 0.5, 'epass': 100, 'tstep': 1, 'iter': 1, 'cis': True}
REGION1 = {'name': 'N 1s peak', 'elo': 129., 'ehi': 138.5, 'estep': 0.15, 'epass': 100, 'tstep': 1.5, 'iter': 1, 'cis': True}
REGION2 = {'name': 'N 1s tail', 'elo': 138.5, 'ehi': 148.0, 'estep': 0.5, 'epass': 100, 'tstep': 1.5, 'iter': 1, 'cis': True}
REGIONS = [REGION1, REGION2]
POSITIONB = [550]
REGION3 = {'name': 'N 1s peak', 'elo': 134., 'ehi': 154, 'estep': 0.05, 'epass': 50, 'tstep': 0.5, 'iter': 1, 'cis': True}
REGIONSB = [REGION3]
CLOSE_SHUTTER_AT_END = True
Scienta.setAcquisitionMode(ch.psi.pshell.epics.Scienta.AcquisitionMode.Swept)
@@ -160,13 +163,21 @@ def do_scan(motors, positions, regions, latency):
try:
setup_live_plots(REGIONS)
task = fork(update_live_plots)
# for nn in range():
# ManipulatorX.move(1.0)
# ManipulatorY.move()
ManipulatorZ.move(115.2)
# ManipulatorTheta.move()
do_scan(MOTORS, POSITIONS, REGIONS, LATENCY)
sample_pos = [ [51.2,-3.8,-0.1,118.5]
[41.2,-3.75,-0.1,117.5]
[31.2,-3.6,-0.1,116.5]
[21.2,-3.9,0.25,115.5]
[11.2,-3.75,0.2,113]
[1.2,-3.65,0.2,112]
[-8.8,-3.6,0.2,111]
for nn in sample_pos:
ManipulatorX.move(nn[1])
ManipulatorY.move(nn[2])
ManipulatorZ.move(nn[3])
ManipulatorTheta.move(nn[0])
do_scan(MOTORS, POSITIONB, REGIONSB, LATENCY) #XPS before PhD
do_scan(MOTORS, POSITIONS, REGIONS, LATENCY) #PhD
do_scan(MOTORS, POSITIONB, REGIONSB, LATENCY) #XPS after PhD
finally:
if CLOSE_SHUTTER_AT_END:
after_scan()