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
/
scripting.py
66 lines (49 loc) · 2.42 KB
/
scripting.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
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 8 18:28:13 2015
@author: xf05id1
"""
import time
bshopen=PV('XF:05IDB-PPS:1{PSh:4}Cmd:Opn-Cmd')
bshclose=PV('XF:05IDB-PPS:1{PSh:4}Cmd:Cls-Cmd')
bshsta=PV('XF:05IDB-PPS:1{PSh:4}Sts:Cls-Sts')
def shutterclose():
print 'Done with this XRF 2D map. Closing shutter for position change.'
bshclose.put(1)
time.sleep(2)
while bshsta.get() == 0:
print 'shutter did not close, executing closing command again.'
bshclose.put(1)
time.sleep(2)
time.sleep(2)
print 'Shutter closed.'
def shutteropen():
print 'Open shutter for collecting XRF 2D map.'
bshopen.put(1)
time.sleep(2)
while bshsta.get() == 1:
print 'shutter did not open, executing opening command again.'
bshopen.put(1)
time.sleep(2)
time.sleep(2)
print 'Shutter opend.'
shutteropen()
#%run ./srx-2dscan-sdd-timeout.py --detname=XF:05IDA{IM:1} --xstart=-90 --xnumstep=39 --xstepsize=0.5 --ystart=-10 --ynumstep=39 --ystepsize=0.5 --wait=0.1 --acqtime=0.5 --acqnum=1 --checkbeam --checkcryo
%run ./srx-2dscan-sdd-timeout.py --detname=XF:05IDA{IM:1} --xstart=-90 --xnumstep=2 --xstepsize=0.5 --ystart=-10 --ynumstep=2 --ystepsize=0.5 --wait=0.1 --acqtime=0.5 --acqnum=1 --checkbeam --checkcryo
shutterclose()
#time.sleep(300)
time.sleep(10)
shutteropen()
#%run ./srx-2dscan-sdd-timeout.py --detname=XF:05IDA{IM:1} --xstart=-90 --xnumstep=39 --xstepsize=0.5 --ystart=10 --ynumstep=39 --ystepsize=0.5 --wait=0.1 --acqtime=0.5 --acqnum=1 --checkbeam --checkcryo
%run ./srx-2dscan-sdd-timeout.py --detname=XF:05IDA{IM:1} --xstart=-90 --xnumstep=2 --xstepsize=0.5 --ystart=10 --ynumstep=2 --ystepsize=0.5 --wait=0.1 --acqtime=0.5 --acqnum=1 --checkbeam --checkcryo
#
#time.sleep(300)
#
#%run ./srx-2dscan-sdd-timeout.py --detname=XF:05IDA{IM:1} --xstart=-90 --xnumstep=39 --xstepsize=0.5 --ystart=30 --ynumstep=39 --ystepsize=0.5 --wait=0.1 --acqtime=0.5 --acqnum=1 --checkbeam --checkcryo
#time.sleep(300)
#
#%run ./srx-2dscan-sdd-timeout.py --detname=XF:05IDA{IM:1} --xstart=-90 --xnumstep=39 --xstepsize=0.5 --ystart=50 --ynumstep=39 --ystepsize=0.5 --wait=0.1 --acqtime=0.5 --acqnum=1 --checkbeam --checkcryo
#time.sleep(300)
#
#%run ./srx-2dscan-sdd-timeout.py --detname=XF:05IDA{IM:1} --xstart=-90 --xnumstep=39 --xstepsize=0.5 --ystart=70 --ynumstep=39 --ystepsize=0.5 --wait=0.1 --acqtime=0.5 --acqnum=1 --checkbeam --checkcryo
#time.sleep(300)