This repository has been archived by the owner on Aug 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathXRFxanesbatch_steel.ipy
72 lines (51 loc) · 1.77 KB
/
XRFxanesbatch_steel.ipy
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
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 5 02:01:58 2015
@author: xf05id1
"""
from epics import PV
import time
def nowtime():
D0=str(time.localtime()[0])
D1=str(time.localtime()[1])
D2=str(time.localtime()[2])
D3=str(time.localtime()[3])
D4=str(time.localtime()[4])
currentTime=D0+'_'+D1+'_'+D2+'_'+D3+'_'+D4+'_'
return currentTime
aeroyval=PV('XF:05IDD-ES:1{Stg:Smpl1-Ax:Y}Mtr.VAL')
aeroyrbv=PV('XF:05IDD-ES:1{Stg:Smpl1-Ax:Y}Mtr.RBV')
PIval=PV('XF:05IDD-ES:1{Stg:Smpl1-Ax:Z}Mtr.VAL')
PIrbv=PV('XF:05IDD-ES:1{Stg:Smpl1-Ax:Z}Mtr.RBV')
f=open('/nfs/xf05id1/batchText/MET20150808_xanes.text','w')
sam1y=0.042
sam1z=-296.87
sam3y=15.9919
sam3z=-296.7
ystep=0.125
SRXpmenergy.moveE(12.975, harmonicIN=7, simulate=False)
time.sleep(10)
f.write('sample 1\n')
f.write('sampley = '+str(aeroyrbv.get())+'\n')
f.write('samplez = '+str(PIrbv.get())+'\n')
%run ./srx-coord-energy-sdd.py --wait=3 --config=/nfs/xf05id1/energyScanConfig/20150807_Pb_no2.text --acqtime=2.3 --acqnum=1 --checkbeam
SRXpmenergy.moveE(12.975, harmonicIN=7, simulate=False)
#time.sleep(3)
time.sleep(600)
f.write('sample 3\n')
aeroyval.put(sam3y, wait=True)
time.sleep(3)
PIval.put(sam3z, wait=True)
f.write('samplez = '+str(PIrbv.get())+'\n')
time.sleep(3)
for i in range(0,30):
f.write('sampley = '+str(aeroyrbv.get())+'\n')
#record current time
f.write('BeforeScan:'+nowtime()+'\n')
SRXpmenergy.moveE(12.975, harmonicIN=7, simulate=False)
%run ./srx-2dscan-sdd.py --detname=XF:05IDA{IM:1} --xstart=-40 --xnumstep=39 --xstepsize=1 --ystart=-40 --ynumstep=39 --ystepsize=1 --wait=0.1 --acqtime=0.5 --acqnum=1 --checkbeam
# #move 100 um up
aeroyval.put(aeroyrbv.get()+0.1, wait=True)
# time.sleep(3)
time.sleep(600)
f.close()