-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbeamline_support_doc.txt
More file actions
165 lines (102 loc) · 3.79 KB
/
beamline_support_doc.txt
File metadata and controls
165 lines (102 loc) · 3.79 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
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
Help on module beamline_support:
NAME
beamline_support
FILE
/h/backed-up/pxsys/skinner/epics_python/beamline_support.py
DESCRIPTION
#John Skinner
#beamline support library
#Common motor, counter, and scanning utilities
#code based on GSECARS Python Library from Mark Rivers
FUNCTIONS
GScan(motcode)
add_callback(pv, callback_name, user_args)
ascan(motcode)
#scan a motor from start to end and leave the motor where it was before command was issued
datafile(filename)
#sets the name of the file that a scan writes to
do_count(time_to_count=0)
#count for time_to_count seconds
dscan(motcode)
#scan a motor relative to current position and leave the motor at that position when done
dump_mots(dump_filename)
#dumps motor parameters to a file. Used for creating scan file headers
fly_scan(half_scan_width, stepsize, counter_number, count_time, motcode, real_motcodes)
get_any_epics_pv(pv_prefix, field_name)
#convenience to set a pv value given the name
get_count_time()
get_counts(time_to_count=0)
get_motor_code(beamline_desginated_code)
get_motor_pos(motcode)
get_scan_points(motcode)
get_scanstepsize(motcode)
init_beamline()
#initializes epics motors and counter based on the file pointed to by $EPICS_BEAMLINE_INFO
#Below this line is an example beamline info file, (remove one '#' off the front of each line)
##beamline_designation
#x12c
##real motors
#tv1 table_vert1
#tv2 table_vert2
#mon monochromator
##virtual motors
#tbv table_vert
##scanned motors
#mon
#tbv
##counters
#scaler1 main_counter
init_counters()
init_motors()
init_scanparms()
is_soft_motor(mcode)
load_and_go_scan_parms(motcode)
load_scan_parms(motcode)
maketrans(...)
maketrans(frm, to) -> string
Return a translation table (a string of 256 bytes long)
suitable for use in string.translate. The strings frm and to
must be of the same length.
motor_code_from_descriptor(descriptor)
mva(*args)
#absolute simultaneous move of multiple motors
#usage example: mva mon 1.0 tv2 0.5
mvf(motcode, counter_num)
mvr(*args)
#relative simultaneous move of multiple motors
#usage example: mvr mon 1.0 tv2 0.5
newfile(filename_prefix)
# creates a new datafile name based on a prefix. For example, if "scandata.1" exists,
# "newfile scandata" will set the datafile_name to "scandata.2"
nowfile()
#returns the current datafile name
peakScan(motcode, counter_num)
#do a peak scan of one motor optimizing on counter_num
print_counts()
pvClose(pv)
pvCreate(pvname)
pvGet(pv)
pvPut(pv, val)
read_db()
ri()
set_any_epics_pv(pv_prefix, field_name, value)
#convenience to set a pv value given the name
set_count_time(time_to_count)
set_scan_absolute(motcode)
set_scan_after_before_scan(motcode)
set_scan_after_end(motcode)
set_scan_after_peak(motcode)
set_scan_after_start(motcode)
set_scan_fly(motcode)
set_scan_linear(motcode)
set_scan_reference_counter(counter_number)
set_scan_relative(motcode)
set_scanend(motcode, posn)
set_scanpoints(motcode, numpoints)
set_scanstart(motcode, posn)
set_scanstepsize(motcode, stepsize)
sp(motcode, posn)
stop_motors()
stop_scan()
wait_for_scan()
waveform_to_string(wave)