IDL cheat sheet
Coordinate system
Right-handed coordinate system with y-direction along the x-ray beam.
Sample positioning
Relative movement
IDL command | description | motion |
---|---|---|
s_stage_x/z, 1 | move rotation stage in x/z-direction by 1 mm | relative [ mm ] |
s_pos_x/y/z, 1 | move sample stage in x/y/z-direction by 1 mm (caution with directions: stage mount on rotation axis) | relative [ mm ] |
s_pos, 1 | move sample stage in x-direction by 1 mm, regardless of position of rotation axis | relative [ mm ] |
s_angle, 90 | rotate sample around z axis | relative [ deg ] |
Absolute movement
IDL command | description | motion |
---|---|---|
goto_s_stage_x/z, 1 | move rotation stage in x/z-direction to 1 mm | absolute [ mm ] |
goto_s_pos_x/y/z, 1 | move sample stage in x/y/z-direction to 1 mm | absolute [ mm ] |
goto_s_angle, 90 | rotate sample around z axis to 90° (alias command: s_rot) | absolute [ deg ] |
Get current position
IDL command | description |
---|---|
pos_s_stage_x/z() | return current rotation stage in x/z position |
pos_s_pos_x/y/z() | return current sample stage in x/y/z position |
pos_s_angle() | return current rotation stage angle |
Predefined positions
IDL command | description |
---|---|
s_in | move sample to "in" position |
s_out | move sample to "out" position |
s_change | move sample to "change" position |
set_s_in_pos(, 0) | set s_in position to current stage position, or optionally to e.g. 0.0 mm |
set_s_out_dist, 10 | set s_out distance to 10.0 mm |
Magnification sets
IDL command | description |
---|---|
save_magn_set(, name_add) | save current magnification set, optionally add something to the automatically generated name |
restore_magn_set(, name) | restore last magnification set, or optionally load a file with a specific name |
Detector positioning
IDL command | description | motion |
---|---|---|
o_ccd_dist, 5 | move detector in y direction relative by 5 mm | relative [ mm ] |
goto_o_ccd_dist, 30 | move detector in y direction absoilute to 30 mm |
|
pos_o_ccd_dist() | return current of the camera stage distance |
|
Slit positioning
IDL command | description |
---|---|
slit_oh, rx=1 (rz=1) | moves oh slit aperture horizontally (vertically) by 1mm |
slit_oh, rdx=1 (rdz=1) | opens oh the slit aperture horizontally (vertically) by 1 mm |
slit_eh2, rx=1 (rz=1) | moves eh2 slit aperture horizontally (vertically) by 1 mm |
slit_eh2, rdx=1 (rdz=1) | opens eh2 the slit aperture horizontally (vertically) by 1 mm |
slit_info | show all slit positions |
rx, rdx, rz and rdz can be concatenated in one command (e.g. slit_oh, rx=1, rz=-2, rdx=0.5, rdz=0.5)
Make and save images
IDL command | description |
---|---|
i=quick(100) & display_image, BYSTCL(i, 0, 4096) | make an image & scale image (eg. from 0 to 4096, usually from 0 to maximum value the camera can do) |
a=quick_abs(100) & display_image, BYTSCL(a, 0, 2) | make an absorption image & scale image (usually from 0 to to 2) |
write_tiff, '/gpfs/current/raw/test_projection.tif', i, /SHORT | save i as 16-bit integer tiff in /gpfs/... |
write_tiff, '/gpfs/current/raw/test_absorption.tif', a, /FLOAT | save a as 32-bit float tiff in /gpfs/... |
Macros motion + images
These macros make images with predefined and internally saved values (like exposure time or display scale). Some move an axis first and then make an image (again with internally saved options likeexposure time, and image type). You may use these macros to quickly align samples.
IDL command | description |
---|---|
qt (, t=100, scale=[0,4096]) | Quick transmission image at the current position. Options: set new exposure time, set new scale for image display, |
qa (, t=100, scale=[0,2], /ref, /here) | Quick absorption image at s_in position. Options: set new exposure time, set new scale for image display, make new reference image, make image at current position. |
qp (, t=100, scale=[0,2], /ref, /here) | Quick phase image at s_in position. Options: set new exposure time, set new scale for image display, make new reference image, make image at current position |
qr (, t=100, scale=[0,4096]) | Quick reference image. Options: set new exposure time, set new scale for image display, |
side, 90 (, t=100, /ref, /rel, /here, imgtype='a') | Rotate (absolute degrees) and make an image at the new position. Options: set new exposure time, make new reference image, make image at current position, set image type ('a': absorption, 't': transmission, 'p' phase) |
sshift, 2 (, t=100, /ref, /here, imgtype='a') | Move sample stage laterally (relative, mm) and make an image at the new position. Options: set exposure time, make new reference image, , make image at current position, set image type ('a': absorption, 't': transmission, 'p' phase) |
sz, 2 (, t=100, /ref, /here, imgtype='a') | Move rotation stage up or down (relative, mm) and make an image at the new position. Options: set exposure time, make reference image, make image at current position, set image type ('a': absorption, 't': transmission, 'p' phase) |
zx, 2 (, t=100, /ref, /here, imgtype='a') | Move rotation stage left or right (relative, mm) and make an image at the new position. Options: set exposure time, make reference image, make image at current position, set image type ('a': absorption, 't': transmission, 'p' phase) |
DCM positioning
IDL command | description | motion |
---|---|---|
dcm_pitch, 0.00001 | move 2nd crystal pitch by 0.00001 deg | relative [ deg ] |
goto_dcm_pitch, -0.03976 | move 2nd crystal pitch to -0.03976 deg | absolute [ deg ] |
reflex_opt_single | move 2nd crystal pitch to optimal flux position |
|
DMM positioning
IDL command | description | motion |
---|---|---|
dmm_x2_rot, 0.001 | move 2nd crystal pitch by 0.00001 deg | relative [ deg ] |
goto_dmm_x2_rot, 0.8923 | move 2nd crystal pitch to 0.8923 deg | absolute [ deg ] |
General syntax
Functionality | IDL syntax |
---|---|
chaining commands | command_1 & command_2 & ... |
absolute movement | goto_motor, position |
relative movement | motor, position |
current motor position | pos_motor() |
Beamshutter and Interlock control
IDL command | description |
---|---|
bs_info | prints an overview of the beamline beamshutter status |
bsoh_open / bsoh_close | opens / closes the optics hutch beamshutter. Closing the OH beamshutter will close all following beamshutters (EH1, EH2) |
bseh1_open / bseh1_close | opens / closes the EH1 beamshutter. Opening will open the OH beamshutter as well. Closing the OH beamshutter will the EH2 beamshutter as well |
bseh2_open / bseh2_close | opens / closes the EH2 beamshutter. Openening will open the OH and EH1 beamshutters as well. |
ics_info | prints an overview of the beamline interlock status |
oh_break_ics | closes all P05 beamshutters and breaks OH door interlock. P06 beamshutter must be closed for this command to work! |
eh1_break_ics | closes EH1 beamshutter (and EH2 beamshutter if open) and breaks EH1 door interlock |
eh2_break_ics | closes EH2 beamshutter and breaks EH2 door interlock |
Serialscan Macros
IDL command | Description |
---|---|
ss_init | reset table |
ss_info | print current stage positions and scan parameters |
ss_pos, nr, name, dist, sz, sx, sy, dz, ndz, /fetch, /force, /all, /prot | Modify sample parameters |
ss_insert, nr, /nosamplechanger | Insert sample with settings from table |