-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbeamline_support.html
More file actions
116 lines (112 loc) · 9.68 KB
/
beamline_support.html
File metadata and controls
116 lines (112 loc) · 9.68 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
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module beamline_support</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>beamline_support</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/h/backed-up/pxsys/skinner/epics_python/beamline_support.py">/h/backed-up/pxsys/skinner/epics_python/beamline_support.py</a></font></td></tr></table>
<p><tt>#John Skinner<br>
#beamline support library<br>
#Common motor, counter, and scanning utilities<br>
#code based on GSECARS Python Library from Mark Rivers</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="Scan.html">Scan</a><br>
<a href="ca.html">ca</a><br>
</td><td width="25%" valign=top><a href="exceptions.html">exceptions</a><br>
<a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
<a href="time.html">time</a><br>
</td><td width="25%" valign=top><a href="types.html">types</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-GScan"><strong>GScan</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-add_callback"><strong>add_callback</strong></a>(pv, callback_name, user_args)</dt></dl>
<dl><dt><a name="-ascan"><strong>ascan</strong></a>(motcode)</dt><dd><tt>#scan a motor from start to end and leave the motor where it was before command was issued</tt></dd></dl>
<dl><dt><a name="-datafile"><strong>datafile</strong></a>(filename)</dt><dd><tt>#sets the name of the file that a scan writes to</tt></dd></dl>
<dl><dt><a name="-do_count"><strong>do_count</strong></a>(time_to_count<font color="#909090">=0</font>)</dt><dd><tt>#count for time_to_count seconds</tt></dd></dl>
<dl><dt><a name="-dscan"><strong>dscan</strong></a>(motcode)</dt><dd><tt>#scan a motor relative to current position and leave the motor at that position when done</tt></dd></dl>
<dl><dt><a name="-dump_mots"><strong>dump_mots</strong></a>(dump_filename)</dt><dd><tt>#dumps motor parameters to a file. Used for creating scan file headers</tt></dd></dl>
<dl><dt><a name="-fly_scan"><strong>fly_scan</strong></a>(half_scan_width, stepsize, counter_number, count_time, motcode, real_motcodes)</dt></dl>
<dl><dt><a name="-get_any_epics_pv"><strong>get_any_epics_pv</strong></a>(pv_prefix, field_name)</dt><dd><tt>#convenience to set a pv value given the name</tt></dd></dl>
<dl><dt><a name="-get_count_time"><strong>get_count_time</strong></a>()</dt></dl>
<dl><dt><a name="-get_counts"><strong>get_counts</strong></a>(time_to_count<font color="#909090">=0</font>)</dt></dl>
<dl><dt><a name="-get_motor_code"><strong>get_motor_code</strong></a>(beamline_desginated_code)</dt></dl>
<dl><dt><a name="-get_motor_pos"><strong>get_motor_pos</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-get_scan_points"><strong>get_scan_points</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-get_scanstepsize"><strong>get_scanstepsize</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-init_beamline"><strong>init_beamline</strong></a>()</dt><dd><tt>#initializes epics motors and counter based on the file pointed to by $EPICS_BEAMLINE_INFO<br>
#Below this line is an example beamline info file, (remove one '#' off the front of each line)<br>
##beamline_designation<br>
#x12c<br>
##real motors<br>
#tv1 table_vert1<br>
#tv2 table_vert2<br>
#mon monochromator<br>
##virtual motors<br>
#tbv table_vert<br>
##scanned motors<br>
#mon<br>
#tbv<br>
##counters<br>
#scaler1 main_counter</tt></dd></dl>
<dl><dt><a name="-init_counters"><strong>init_counters</strong></a>()</dt></dl>
<dl><dt><a name="-init_motors"><strong>init_motors</strong></a>()</dt></dl>
<dl><dt><a name="-init_scanparms"><strong>init_scanparms</strong></a>()</dt></dl>
<dl><dt><a name="-is_soft_motor"><strong>is_soft_motor</strong></a>(mcode)</dt></dl>
<dl><dt><a name="-load_and_go_scan_parms"><strong>load_and_go_scan_parms</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-load_scan_parms"><strong>load_scan_parms</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-maketrans"><strong>maketrans</strong></a>(...)</dt><dd><tt><a href="#-maketrans">maketrans</a>(frm, to) -> string<br>
<br>
Return a translation table (a string of 256 bytes long)<br>
suitable for use in string.translate. The strings frm and to<br>
must be of the same length.</tt></dd></dl>
<dl><dt><a name="-motor_code_from_descriptor"><strong>motor_code_from_descriptor</strong></a>(descriptor)</dt></dl>
<dl><dt><a name="-mva"><strong>mva</strong></a>(*args)</dt><dd><tt>#absolute simultaneous move of multiple motors<br>
#usage example: mva mon 1.0 tv2 0.5</tt></dd></dl>
<dl><dt><a name="-mvf"><strong>mvf</strong></a>(motcode, counter_num)</dt></dl>
<dl><dt><a name="-mvr"><strong>mvr</strong></a>(*args)</dt><dd><tt>#relative simultaneous move of multiple motors<br>
#usage example: mvr mon 1.0 tv2 0.5</tt></dd></dl>
<dl><dt><a name="-newfile"><strong>newfile</strong></a>(filename_prefix)</dt><dd><tt># creates a new datafile name based on a prefix. For example, if "scandata.1" exists,<br>
# "newfile scandata" will set the datafile_name to "scandata.2"</tt></dd></dl>
<dl><dt><a name="-nowfile"><strong>nowfile</strong></a>()</dt><dd><tt>#returns the current datafile name</tt></dd></dl>
<dl><dt><a name="-peakScan"><strong>peakScan</strong></a>(motcode, counter_num)</dt><dd><tt>#do a peak scan of one motor optimizing on counter_num</tt></dd></dl>
<dl><dt><a name="-print_counts"><strong>print_counts</strong></a>()</dt></dl>
<dl><dt><a name="-pvClose"><strong>pvClose</strong></a>(pv)</dt></dl>
<dl><dt><a name="-pvCreate"><strong>pvCreate</strong></a>(pvname)</dt></dl>
<dl><dt><a name="-pvGet"><strong>pvGet</strong></a>(pv)</dt></dl>
<dl><dt><a name="-pvPut"><strong>pvPut</strong></a>(pv, val)</dt></dl>
<dl><dt><a name="-read_db"><strong>read_db</strong></a>()</dt></dl>
<dl><dt><a name="-ri"><strong>ri</strong></a>()</dt></dl>
<dl><dt><a name="-set_any_epics_pv"><strong>set_any_epics_pv</strong></a>(pv_prefix, field_name, value)</dt><dd><tt>#convenience to set a pv value given the name</tt></dd></dl>
<dl><dt><a name="-set_count_time"><strong>set_count_time</strong></a>(time_to_count)</dt></dl>
<dl><dt><a name="-set_scan_absolute"><strong>set_scan_absolute</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-set_scan_after_before_scan"><strong>set_scan_after_before_scan</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-set_scan_after_end"><strong>set_scan_after_end</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-set_scan_after_peak"><strong>set_scan_after_peak</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-set_scan_after_start"><strong>set_scan_after_start</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-set_scan_fly"><strong>set_scan_fly</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-set_scan_linear"><strong>set_scan_linear</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-set_scan_reference_counter"><strong>set_scan_reference_counter</strong></a>(counter_number)</dt></dl>
<dl><dt><a name="-set_scan_relative"><strong>set_scan_relative</strong></a>(motcode)</dt></dl>
<dl><dt><a name="-set_scanend"><strong>set_scanend</strong></a>(motcode, posn)</dt></dl>
<dl><dt><a name="-set_scanpoints"><strong>set_scanpoints</strong></a>(motcode, numpoints)</dt></dl>
<dl><dt><a name="-set_scanstart"><strong>set_scanstart</strong></a>(motcode, posn)</dt></dl>
<dl><dt><a name="-set_scanstepsize"><strong>set_scanstepsize</strong></a>(motcode, stepsize)</dt></dl>
<dl><dt><a name="-sp"><strong>sp</strong></a>(motcode, posn)</dt></dl>
<dl><dt><a name="-stop_motors"><strong>stop_motors</strong></a>()</dt></dl>
<dl><dt><a name="-stop_scan"><strong>stop_scan</strong></a>()</dt></dl>
<dl><dt><a name="-wait_for_scan"><strong>wait_for_scan</strong></a>()</dt></dl>
<dl><dt><a name="-waveform_to_string"><strong>waveform_to_string</strong></a>(wave)</dt></dl>
</td></tr></table><p>
</body></html>