Wiki source code of IDL cheat sheet

Version 18.1 by fwilde on 2018/11/28 17:49

Hide last authors
fwilde 1.1 1 This is an overview of the most commonly used commands during a beamtime.
2
moosmanj 6.1 3 == {{id name="IDLcheatsheet-Samplepositioning"/}}Sample positioning ==
4
moosmanj 12.1 5 (% class="wrapped fixed-table" %)
fwilde 1.1 6 |=(((
7 IDL command
8 )))|=(((
9 description
fwilde 3.1 10 )))|=(((
11 motion
fwilde 1.1 12 )))
13 |(((
fwilde 15.1 14 s_stage_x/z, 1
fwilde 1.1 15 )))|(((
fwilde 15.1 16 move rotation stage in x/z-direction by 1 mm
fwilde 3.1 17 )))|(((
18 relative [ mm ]
fwilde 1.1 19 )))
20 |(((
fwilde 18.1 21 s_pos_z, 1
fwilde 1.1 22 )))|(((
fwilde 18.1 23 move sample stage in z-direction by 1 mm,
fwilde 3.1 24 )))|(((
25 relative [ mm ]
fwilde 1.1 26 )))
27 |(((
fwilde 18.1 28 s_pos_lateral, 1
29 )))|(((
30 move sample stage in x-direction by 1 mm, regardless of position of rotation axis
31 )))|(((
32 relative [ mm ]
33 )))
34 |(((
moosmanj 9.1 35 s_angle, 90
fwilde 3.1 36 )))|(((
moosmanj 9.1 37 rotate sample around z axis
fwilde 3.1 38 )))|(((
moosmanj 9.1 39 relative [ deg ]
fwilde 3.1 40 )))
moosmanj 7.1 41 |(((
42 s_in
43 )))|(((
44 move sample to "in" position
45 )))|(((
46 predefined
47 )))
48 |(((
49 s_out
50 )))|(((
51 move sample to "out" position
52 )))|(((
53 predefined
54 )))
55 |(((
56 s_change
57 )))|(((
58 move sample to "change" position
59 )))|(((
60 predefined
61 )))
moosmanj 6.1 62
fwilde 17.1 63 (% class="relative-table wrapped" style="width: 63.1965%;" %)
fwilde 15.1 64 |=(((
65 IDL command
66 )))|=(((
67 description
68 )))|=(((
69 motion
70 )))
71 |(((
72 goto_s_stage_x/z, 1
73 )))|(((
74 move rotation stage in x/z-direction to 1 mm
75 )))|(((
76 absolute [ mm ]
77 )))
78 |(((
79 goto_s_pos_x/y/z, 1
80 )))|(((
81 move sample stage in x/y/z-direction to 1  mm
82 )))|(((
83 absolute [ mm ]
84 )))
85 |(((
86 goto_s_angle, 90
87 )))|(((
88 rotate sample around z axis to 90°
89 )))|(((
90 absolute [ deg ]
91 )))
92
fwilde 16.1 93 (% class="relative-table wrapped" style="width: 43.5484%;" %)
fwilde 15.1 94 |=(((
95 IDL command
96 )))|=(((
97 description
98 )))
99 |(((
100 pos_s_stage_x/z()
101 )))|(((
102 return current rotation stage in x/z position
103 )))
104 |(((
105 pos_s_pos_x/y/z()
106 )))|(((
107 return current sample stage in x/y/z position
108 )))
109 |(((
110 pos_s_angle()
111 )))|(((
112 return current rotation stage angle
113 )))
114
moosmanj 6.1 115 == {{id name="IDLcheatsheet-Detectorpositioning"/}}Detector positioning ==
116
moosmanj 12.1 117 (% class="wrapped fixed-table" %)
moosmanj 6.1 118 |=(((
moosmanj 7.1 119 IDL command
moosmanj 6.1 120 )))|=(((
121 description
122 )))|=(((
123 motion
124 )))
fwilde 3.1 125 |(((
moosmanj 6.1 126 pressure_on
fwilde 1.1 127 )))|(((
moosmanj 6.1 128 enable detector y movement
129 )))|(((
greving 5.1 130 \\
moosmanj 6.1 131 )))
132 |(((
133 o_ccd_dist, 5
fwilde 3.1 134 )))|(((
moosmanj 6.1 135 move detector in y direction
136 )))|(((
137 relative [ mm ]
138 )))
139 |(((
140 pressure_off
141 )))|(((
142 disable detector movement
143 )))|(((
fwilde 3.1 144 \\
fwilde 1.1 145 )))
fwilde 3.1 146
moosmanj 7.1 147 == {{id name="IDLcheatsheet-Makeimage"/}}Make image ==
148
moosmanj 12.1 149 (% class="wrapped fixed-table" %)
moosmanj 7.1 150 |=(((
151 IDL command
152 )))|=(((
153 description
154 )))
155 |(((
156 i=quick(100) & tv_quick, i & draw_box, [ x1, x2 ,z1 ,z2 ]
157 )))|(((
158 make an image & show image & draw box
159 )))
160 |(((
moosmanj 10.1 161 a=quick_abs(100) & tv_quick, a & draw_box, [ x1, x2 ,z1 ,z2 ]
moosmanj 7.1 162 )))|(((
moosmanj 10.1 163 make an absorption image & show image & draw box
moosmanj 7.1 164 )))
165
moosmanj 6.1 166 == {{id name="IDLcheatsheet-Monochromatorpositioning"/}}Monochromator positioning ==
167
moosmanj 12.1 168 (% class="wrapped fixed-table" %)
fwilde 3.1 169 |=(((
170 IDL command
171 )))|=(((
172 description
173 )))|=(((
174 motion
175 )))
fwilde 1.1 176 |(((
fwilde 3.1 177 calc_dcm_energy, 10000, /set
178 )))|(((
179 set DCM and undulator to 10 keV
180 )))|(((
fwilde 1.1 181 \\
fwilde 3.1 182 )))
183 |(((
184 dcm_pitch, 0.00001
fwilde 1.1 185 )))|(((
fwilde 4.1 186 move 2nd crystal pitch by 0.00001 deg
fwilde 3.1 187 )))|(((
fwilde 4.1 188 relative [ deg ]
fwilde 3.1 189 )))
190 |(((
fwilde 4.1 191 goto_dcm_pitch,  -0.03976
fwilde 3.1 192 )))|(((
fwilde 4.1 193 move 2nd crystal pitch to -0.03976 deg
fwilde 3.1 194 )))|(((
fwilde 4.1 195 absolute [ deg ]
fwilde 1.1 196 )))
fwilde 3.1 197 |(((
fwilde 4.1 198 reflex_opt
fwilde 3.1 199 )))|(((
fwilde 4.1 200 move 2nd crystal pitch to optimal flux position
fwilde 3.1 201 )))|(((
202 \\
203 )))
fwilde 14.1 204
205 == {{id name="IDLcheatsheet-Saveanimageastiff"/}}Save an image as tiff ==
206
fwilde 15.1 207 (% class="wrapped" %)
fwilde 14.1 208 |=(((
209 IDL command
210 )))|=(((
211 desciption
212 )))
213 |(((
214 write_tiff, '/gpfs/current/raw/test.tif', i, /SHORT
215 )))|(((
216 save i as 16-bit tiff in /gofs/...
217 )))