-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestHelical.py
More file actions
executable file
·77 lines (54 loc) · 1.78 KB
/
testHelical.py
File metadata and controls
executable file
·77 lines (54 loc) · 1.78 KB
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
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''testing helical collects on PX2'''
import Collect
import time
import pickle
dire = '/927bis/ccd/2013/Run5/2013-12-12/Curie/'
pref = 'test_helical'
star = 0.
first = 1
temp = pref + '_1_####.img'
rang = 180
osci = 0.5
nImg = int(rang/abs(osci))
collect = Collect.collect(directory=dire,
prefix=pref,
start=star,
template=temp,
nImages=nImg,
firstImage = first,
#inverse=20,
test=False,
helical=True)
print 'Starting helical collect ...'
#raw_input('Please center the starting point. Press enter when done.')
#collect.saveHelicalStart()
#print 'Motor positions for the starting position'
#print collect.helicalStart
#raw_input('Please center the final point. Press enter when done.')
#collect.saveHelicalFinal()
#print 'Motor positions for the final position'
#print collect.helicalFinal
collect.helicalStart = {'PhiX': -0.1229,
'PhiY': 2.1674000000000002,
'PhiZ': -0.058099999999999999,
'SamX': 0.059400000000000001,
'SamY': 0.16420000000000001}
collect.helicalFinal = {'PhiX': -0.1229,
'PhiY': 2.1674000000000002,
'PhiZ': -0.058099999999999999,
'SamX': 0.059400000000000001,
'SamY': 0.16420000000000001}
#{'PhiX': -0.1229,
#'PhiY': 0.23760000000000001,
#'PhiZ': -0.11849999999999999,
#'SamX': -1.0268999999999999,
#'SamY': 0.30599999999999999}
collect.moveToPosition(collect.helicalStart)
positions = collect.getCollectPositions(collect.nImages)
f = open('positions_' + pref + '_' + '_'.join(time.asctime().split())+ '.pck', 'w')
pickle.dump(positions, f)
f.close()
#pos = pickle.load(f)
collect.collect()