-
Notifications
You must be signed in to change notification settings - Fork 0
/
304413_2019_03_VBisogni.py
506 lines (408 loc) · 13.4 KB
/
304413_2019_03_VBisogni.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
def Fe_film_tth150_with_E_field_20200316():
ext_vg = 15
total_time = 600
cyc = 6
sec_x_pt = 5
#yield from mv(keithley_output,'ON')
#yield from mv(voltage_dc,-20.0)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
yield from mv(extslt.vg, 50)
yield from rel_scan([sclr],cryo.x,-0.15,.15,101)
yield from sleep(30)
yield from rel_scan([sclr],cryo.y,-0.15,.15,101)
yield from mv(extslt.vg, 15)
#yield from mv(keithley_output,'ON')
yield from mv(voltage_dc,0)
yield from mv(keithley_output,'OFF')
yield from sleep(1800)
yield from mv(extslt.vg, 50)
yield from rel_scan([sclr],cryo.x,-0.15,.15,101)
yield from sleep(30)
yield from rel_scan([sclr],cryo.y,-0.15,.15,101)
yield from mv(extslt.vg, 15)
cyc = 12
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
yield from mv(extslt.vg, 50)
yield from rel_scan([sclr],cryo.x,-0.15,.15,101)
yield from sleep(30)
yield from rel_scan([sclr],cryo.y,-0.15,.15,101)
yield from mv(extslt.vg, 15)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
yield from mv(extslt.vg, 50)
yield from rel_scan([sclr],cryo.x,-0.15,.15,101)
yield from sleep(30)
yield from rel_scan([sclr],cryo.y,-0.15,.15,101)
yield from mv(extslt.vg, 15)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
yield from mv(extslt.vg, 50)
yield from rel_scan([sclr],cryo.x,-0.15,.15,101)
yield from sleep(30)
yield from rel_scan([sclr],cryo.y,-0.15,.15,101)
yield from mv(extslt.vg, 15)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
def Fe_film_tth150_with_E_field_20200315_v2():
ext_vg = 15
total_time = 600
cyc = 12
sec_x_pt = 5
#yield from mv(keithley_output,'ON')
#yield from mv(voltage_dc,-20.0)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
yield from mv(extslt.vg, 50)
yield from rel_scan([sclr],cryo.x,-0.15,.15,101)
yield from sleep(30)
yield from rel_scan([sclr],cryo.y,-0.15,.15,101)
yield from mv(extslt.vg, 15)
cyc = 12
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
yield from mv(extslt.vg, 50)
yield from rel_scan([sclr],cryo.x,-0.15,.15,101)
yield from sleep(30)
yield from rel_scan([sclr],cryo.y,-0.15,.15,101)
yield from mv(extslt.vg, 15)
cyc = 12
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
yield from mv(extslt.vg, 50)
yield from rel_scan([sclr],cryo.x,-0.15,.15,101)
yield from sleep(30)
yield from rel_scan([sclr],cryo.y,-0.15,.15,101)
yield from mv(extslt.vg, 15)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
yield from mv(voltage_dc,0.0)
yield from mv(keithley_output,'OFF')
def Fe_film_tth150_with_E_field_20200314_v2():
ext_vg = 15
total_time = 600
cyc = 24
sec_x_pt = 5
#yield from mv(keithley_output,'ON')
#yield from mv(voltage_dc,10.0)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
#yield from mv(voltage_dc,0.0)
#yield from mv(keithley_output,'OFF')
def Fe_film_tth150_with_E_field_20200315():
ext_vg = 15
total_time = 600
cyc = 10
sec_x_pt = 5
#yield from mv(keithley_output,'ON')
#yield from mv(voltage_dc,20.0)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
yield from mv(extslt.vg, 50)
yield from rel_scan([sclr],cryo.x,-0.15,.15,101)
yield from sleep(30)
yield from rel_scan([sclr],cryo.y,-0.15,.15,101)
yield from mv(extslt.vg, 15)
cyc = 12
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
yield from mv(extslt.vg, 50)
yield from rel_scan([sclr],cryo.x,-0.15,.15,101)
yield from sleep(30)
yield from rel_scan([sclr],cryo.y,-0.15,.15,101)
yield from mv(extslt.vg, 15)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708,ext_vg, 'Fe film')
yield from mv(voltage_dc,0.0)
yield from mv(keithley_output,'OFF')
def Fe3Sn2_th0_highStats():
ext_vg = 15
total_time = 600
cyc = 18
sec_x_pt = 5
E = [706.5] # film
# E = [707.35,709] #crystal
for i in E:
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'Fe3Sn2')
def Fe3Sn2_th0():
ext_vg = 11
total_time = 600
cyc = 6
sec_x_pt = 5
E = [706.5] # film
# E = [707.35,709] #crystal
for i in E:
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'Fe3Sn2')
yield from pol_H(0)
yield from sleep(30)
yield from beamline_align_v2()
yield from sleep(30)
cyc = 9
for i in E:
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'Fe3Sn2')
voltage_dc = EpicsSignal('XF:02IDD{K2611:1}SP-VLvl', name = 'voltage_dc')
keithley_output = EpicsSignal('XF:02IDD{K2611:1}Cmd:Out-Ena', name = 'keithley_output')
current_rbk = EpicsSignal('XF:02IDD{K2611:1}RB-MeasI', name = 'current_rbk')
#yield from mv(keithley_output,'OFF')
#yield from mv(keithley_output,'ON')
#yield from mv(voltage_dc,0.5)
def Fe_film_tth150_without_field():
ext_vg = 15
total_time = 900
cyc = 6
# Pol Vertical
#yield from pol_V(-2)
sec_x_pt = 5
# yield from mv(keithley_output,'OFF')
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,706.6,ext_vg, 'Fe film')
yield from mv(voltage_dc,0.0)
yield from mv(keithley_output,'OFF')
def Fe_film_tth150_with_E_field_4():
ext_vg = 15
total_time = 900
cyc = 12
# Pol Vertical
#yield from pol_V(-2)
sec_x_pt = 5
yield from mv(keithley_output,'ON')
yield from mv(voltage_dc,-10.0)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,706.6,ext_vg, 'Fe film')
yield from mv(voltage_dc,0.0)
yield from mv(keithley_output,'OFF')
def Fe_film_tth150_with_E_field():
ext_vg = 15
total_time = 900
cyc = 12
# Pol Vertical
#yield from pol_V(-2)
sec_x_pt = 5
yield from mv(keithley_output,'ON')
yield from mv(voltage_dc,0.5)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,706.6,ext_vg, 'Fe film')
yield from mv(voltage_dc,1.0)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,706.6,ext_vg, 'Fe film')
yield from mv(voltage_dc,0.0)
yield from mv(keithley_output,'OFF')
def Fe_film_tth150_with_E_field_2():
ext_vg = 15
total_time = 900
cyc = 12
# Pol Vertical
#yield from pol_V(-2)
sec_x_pt = 5
yield from mv(keithley_output,'ON')
yield from mv(voltage_dc,-9.0)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,706.6,ext_vg, 'Fe film')
yield from mv(voltage_dc,0.0)
yield from mv(keithley_output,'OFF')
def Fe_film_tth150_with_E_field_3():
ext_vg = 15
total_time = 900
cyc = 12
# Pol Vertical
#yield from pol_V(-2)
sec_x_pt = 5
yield from mv(keithley_output,'ON')
yield from mv(voltage_dc,-17.5)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,706.5,ext_vg, 'Fe film')
yield from mv(voltage_dc,0.0)
yield from mv(keithley_output,'OFF')
def YIG_film_energy_map_tth110():
ext_vg = 11
total_time = 600
cyc = 12
# Pol Vertical
#yield from pol_V(-2)
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,9,708.85,ext_vg, 'YIG')
yield from rixs_one_energy_1(sec_x_pt,total_time,12,707.65,ext_vg, 'YIG')
#E = [707.65]
#for i in E:
#sec_x_pt = 5
#yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'YIG')
def YIG_film_specular_search():
ext_vg = 100
total_time = 30
cyc = 1
# Pol Vertical
#yield from pol_V(-2)
sec_x_pt = 1
E = [708.85]
th = [45.6,45.8,46,46.2,46.8,47.0,47.2,47.4,47.6,47.8,48,48.2,48.4,48.6,48.8,49.,49.2,49.4,49.6,49.8,50.0,50.2,50.4,50.6,50.8,51,51.2,51.4,51.6,51.8,52.0]
for i in th:
yield from mv(cryo.t,i)
yield from mvr(cryo.z,0.035)
yield from mvr(cryo.x,-0.0035)
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708.85,ext_vg, 'YIG')
def YIG_film_energy_map():
ext_vg = 11
total_time = 600
cyc = [6,9]
# Pol Vertical
#yield from pol_V(-2)
sec_x_pt = 5
E = [707.35,708.55] # film
# E = [707.35,709] #crystal
for c, i in zip(cyc, E):
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,c,i,ext_vg, 'YIG')
# Moving to sample transfer position
# yield from mv(cryo.t,257)
# yield from mv(cryo.y,44)
# yield from mv(cryo.x,14)
# yield from mv(ow,-69.75)
def YIG_energy_map():
ext_vg = 11
total_time = 600
cyc = 9
# Pol Vertical
#yield from pol_V(-2)
sec_x_pt = 5
E = [710.6,709.4,707.65,707.1]
for i in E:
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'high Res_th_62')
pulse_time = EpicsSignal('XF:02IDD{K2611:1}Cmd-Pulse.SCAN', name = 'pulse_time')
#yield from mv(pulse_time,'300 second')
#yield from mv(pulse_time,'Passive')
def Hematite_device_th20_20191115():
ext_vg = 11
total_time = 600
cyc = 9
# Pol Vertical
#yield from pol_V(-2)
yield from sleep(10)
# E = 708.5
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708.5,ext_vg, 'high Res_th_0')
# Pol Horizontal
yield from pol_H(0)
yield from sleep(10)
yield from beamline_align_v2()
yield from sleep(30)
# E = 708.5
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,708.5,ext_vg, 'high Res_th_0')
def Hematite_middle_th40_highres_20191113():
ext_vg = 11
total_time = 600
cyc = 9
# Pol Horizontal
#yield from pol_H(0)
yield from sleep(10)
# E = 708.5
sec_x_pt = 5
E = [707.5,709.1]
for i in E:
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'high Res_th_40')
def Hematite_device_th20_E_map_20191113():
ext_vg = 11
total_time = 600
cyc = 12
# Pol Horizontal
#yield from pol_H(0)
yield from sleep(10)
# E = 708.5
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,3,708.5,ext_vg, 'high Res_th_20')
# E = 707.5 and 709.1
E = [707.5,709.1]
for i in E:
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'high Res_th_20')
# Check XAS LH
yield from mv(rixscam.cam.acquire_time, 1)
yield from mv(extslt.vg,200)
yield from xas([sclr,ring_curr,rixscam],pgm.en,705,713,81,1)
yield from mv(rixscam.cam.acquire_time, 5)
def Hematite_device_middle_specular():
ext_vg = 11
total_time = 600
cyc = 9
yield from pol_H(0)
yield from sleep(10)
E = [708.5]
for i in E:
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'high Res_th_59')
def Hematite_film_specular():
ext_vg = 11
total_time = 600
cyc = 9
yield from pol_H(0)
yield from sleep(10)
E = [708.5]
for i in E:
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'high Res_th_59')
def Hematite_film_lunch():
ext_vg = 11
total_time = 600
cyc = 12
yield from pol_H(0)
yield from sleep(10)
E = [708.5]
for i in E:
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'high Res_th_20')
def Hematite_film_dinner():
ext_vg = 15
total_time = 600
cyc = 6
yield from pol_H(0)
yield from sleep(10)
E = list(np.arange(707.5,707.6,0.5))
for i in E:
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'th43')
def Hematite_film_E_map_20191111():
ext_vg = 15
total_time = 600
cyc = 6
# Pol Vertical
yield from pol_V(-2)
yield from sleep(10)
# E = 706.7
yield from rixs_one_energy_1(5,900,4,706.7,ext_vg, 'th20')
# E = 707,708.5 and 709.1
E = [707,708.5,709.1]
for i in E:
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'th20')
# Pol Horizontal
yield from pol_H(0)
yield from sleep(10)
yield from beamline_align_v2()
yield from sleep(30)
# E = 706.7
yield from rixs_one_energy_1(5,900,4,706.7,ext_vg, 'th20')
# E = 707,708.5 and 709.1
E = [707,708.5,709.1]
for i in E:
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'th20')
# Check XAS LH
yield from mv(rixscam.cam.acquire_time, 1)
yield from mv(extslt.vg,200)
yield from xas([sclr,ring_curr,rixscam],pgm.en,705,713,81,1)
# Check XAS LV
yield from pol_V(-2)
yield from sleep(10)
yield from beamline_align_v2()
yield from xas([sclr,ring_curr,rixscam],pgm.en,705,713,81,1)
def Hematite_film_E_map_20191112():
ext_vg = 15
total_time = 600
cyc = 6
# Pol Horizontal
yield from pol_H(0)
yield from sleep(10)
yield from beamline_align_v2()
yield from sleep(30)
E = [707,708.5,709.1]
for i in E:
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,i,ext_vg, 'th20')
def Hematite_device_th20_E_map_20191113_02():
ext_vg = 11
total_time = 600
cyc = 9
# Pol Horizontal
#yield from pol_H(0)
yield from sleep(10)
# E = 708.5
sec_x_pt = 5
yield from rixs_one_energy_1(sec_x_pt,total_time,cyc,707.5,ext_vg, 'high Res_th_40')