-
Notifications
You must be signed in to change notification settings - Fork 0
/
304185_DMazzone.py
186 lines (143 loc) · 4.98 KB
/
304185_DMazzone.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
def ErFeO3_map():
#yield from mv(extslt.vg,100, extslt.hg, 150)
#sclr_enable()
#yield from xas([sclr],pgm.en,706,713,71)
#sclr_disable()
#yield from mv(extslt.vg,20, extslt.hg, 150)
yield from mv(gvbt1,'open')
rixscam_exp = 2
yield from mv(rixscam.cam.acquire_time, rixscam_exp)
reps=10
cts=30
#yield from pol_V(5.5)
x_start=707
x_stop=709
num=9
for i in range(num):
x_val = x_start + i * (x_stop - x_start) / (num - 1)
yield from mv(pgm.en, x_val)
for i in range(reps):
yield from count([rixscam], num=cts, md = {'reason': 'ErFeO3 60K theta=10 deg pi pol'})
yield from pzshutter_disable()
yield from mv(gvbt1,'close')
yield from mv(extslt.vg,100, extslt.hg, 150)
sclr_enable()
yield from xas([sclr],pgm.en,706,713,71)
sclr_disable()
yield from mv(gvbt1,'open')
yield from mv(extslt.vg,20, extslt.hg, 150)
x_start=709.25
x_stop=711
num=8
yield from pzshutter_enable()
for i in range(num):
x_val = x_start + i * (x_stop - x_start) / (num - 1)
yield from mv(pgm.en, x_val)
for i in range(reps):
yield from count([rixscam], num=cts, md = {'reason': 'ErFeO3 60K theta=10 deg pi pol'})
yield from pzshutter_disable()
yield from mv(gvbt1,'close')
yield from mv(extslt.vg,100, extslt.hg, 150)
sclr_enable()
yield from xas([sclr],pgm.en,706,713,71)
sclr_disable()
yield from mv(gvbt1,'open')
yield from mv(extslt.vg,20, extslt.hg, 150)
x_start=711.25
x_stop=712
num=4
yield from pzshutter_enable()
for i in range(num):
x_val = x_start + i * (x_stop - x_start) / (num - 1)
yield from mv(pgm.en, x_val)
for i in range(reps):
yield from count([rixscam], num=cts, md = {'reason': 'ErFeO3 60K theta=10 deg pi pol'})
yield from pzshutter_disable()
yield from mv(gvbt1,'close')
yield from mv(extslt.vg,100, extslt.hg, 150)
sclr_enable()
yield from xas([sclr],pgm.en,706,713,71)
sclr_disable()
#yield from pol_H(3)
yield from mv(gvbt1,'close')
def testslit():
reps=3
cts=30
yield from mv(gvbt1,'open')
yield from mv(extslt.vg,150, extslt.hg, 150)
x_start=702.5
x_stop=703.75
num=2
yield from pzshutter_enable()
for i in range(num):
x_val = x_start + i * (x_stop - x_start) / (num - 1)
yield from mv(pgm.en, x_val)
for i in range(reps):
yield from count([rixscam], num=cts, md = {'reason': 'ErFeO3 130K theta=10 deg sigma pol'})
yield from pzshutter_disable()
yield from mv(gvbt1,'close')
def plan_one_energy1(pts,cycles,energy):
sclr_disable()
dets = [rixscam]
yield from mv(extslt.vg,10, extslt.hg, 150)
#yield from pol_H(-2)
rixscam_exp = 1.0
#yield from mv(cryo.y,28.65)
#yield from mv(cryo.x,26.31)
#yield from mv(cryo.z,15.835)
yield from pzshutter_enable()
yield from mv(gvbt1,'open')
yield from mv(rixscam.cam.acquire_time, rixscam_exp)
yield from mv(pgm.en,energy)
yield from sleep(5)
for i in range(0,cycles):
print('Starting cycle {}' .format(i+1))
yield from count(dets, num=pts, md = {'reason':'90K th=67.5deg V pol'} )
print('Ending cycle {}\n' .format(i+1))
yield from pzshutter_disable()
sclr_enable()
yield from mv(gvbt1,'close')
#yield from mv(shutterb,'close')
def ErFeO3_Mar30():
#yield from mv(extslt.vg,100, extslt.hg, 150)
#sclr_enable()
#yield from xas([sclr],pgm.en,706,713,71)
rixscam_exp = 2
yield from mv(rixscam.cam.acquire_time, rixscam_exp)
sclr_disable()
yield from mv(extslt.vg,20, extslt.hg, 150)
reps=40
cts=30
yield from mv(gvbt1,'open')
yield from mv(extslt.vg,20, extslt.hg, 150)
x_val=710.5
yield from pzshutter_enable()
#for i in range(num):
# x_val = x_start + i * (x_stop - x_start) / (num - 1)
yield from mv(pgm.en, x_val)
for i in range(reps):
yield from count([rixscam], num=cts, md = {'reason': 'ErFeO3 115K theta=10 deg sigma pol'})
yield from pzshutter_disable()
yield from mv(gvbt1,'close')
#yield from pol_H(3)
def carbon():
#yield from mv(extslt.vg,100, extslt.hg, 150)
#sclr_enable()
#yield from xas([sclr],pgm.en,706,713,71)
rixscam_exp = 2
yield from mv(rixscam.cam.acquire_time, rixscam_exp)
sclr_disable()
yield from mv(extslt.vg,20, extslt.hg, 150)
reps=2
cts=30
yield from mv(gvbt1,'open')
yield from mv(extslt.vg,20, extslt.hg, 150)
x_val=710.5
yield from pzshutter_enable()
#for i in range(num):
# x_val = x_start + i * (x_stop - x_start) / (num - 1)
yield from mv(pgm.en, x_val)
for i in range(reps):
yield from count([rixscam], num=cts, md = {'reason': 'carbon 20 um'})
yield from pzshutter_disable()
yield from mv(gvbt1,'close')