IDL cheat sheet

Version 39.1 by fwilde on 2019/04/01 18:23

It's highly recommended to not edit this document. Any modification made will eventually be lost because it cannot reach back the owner replication instance of that document.

Coordinate system

Right-handed coordinate system with y-direction along the x-ray beam.

p05_uct.png

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_lateral, 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 0.0 mm

set_s_out_dist, 10

set s_out distance to 10.0 mm

Detector positioning

IDL command

description

motion

pressure_on

enable detector y movement


o_ccd_dist, 5

move detector in y direction

relative [ mm ]

pressure_off

disable detector movement


Slit positioning

IDL command

description

slit_eh2, rx=1 (rz=1)

moves eh2 slit aperture horizontally (vertically) by 1mm , works analoguous for slit_oh and slit_ps2

slit_eh2, rdz=1 (rdz=1)

opens eh2 the slit aperture horizontally (vertically) by 1 mm, works analoguous for slit_oh and slit_ps2

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 images

IDL command

description

i=quick(100) & tv_quick, i & draw_box, [ x1, x2 ,z1 ,z2 ]

make an image & show image & draw box

a=quick_abs(100) & tv_quick, a & draw_box, [ x1, x2 ,z1 ,z2 ]

make an absorption image & show image & draw box

write_tiff, '/gpfs/current/raw/test.tif', i, /SHORT

save i as 16-bit tiff in /gpfs/...

Monochromator positioning

IDL command

description

motion

calc_dcm_energy, 10000, /set

set DCM and undulator to 10 keV


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

move 2nd crystal pitch to optimal flux position


gap, 0.01

move undulator gap by 0.01 mm

relative [ mm ]

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()