Undulator

calc_gap( energy)
Returns the gap value [mm] that corresponds to an energy [eV]. The gap value is calculated from the theoretical value with the following formula:
gap = gap_a0 + gap_a1*gap_theory

If the symbols gap_a0 and gap_a1 are not supplied by the user, the program takes 0 and 1.
e.g.:
* = calc_gap(123)

gap(), gap() = height
Returns/sets the gap value [mm].

ONLINE determines the output device which is connected to the GEL7510 controller by translating the environment variable WIGGLER_PORT.

If the symbol auto_gap is set to 1, the undulator is automatically moved when the energy is changed.

The gap may only be changed by authorized users /online_dir/wiggler_-experts.lis.

The requested gap size is checked three times before it is written to the controller:

The gap is changed smoothly (wait 1 second after 1 mm change) unless the symbol gap_fast has been set to 1.

If the difference between required position and current position is below 0.005 mm or below min_gap_step, the undulator is not moved.

BW1

 the symbol harmonic has to be defined (1, 2, 3).
 The gap size is shifted by bw1_gap_offset: gap = gap + bw1_gap_offset.

BW3

 The symbol ebeam is set to the beam energy [GeV].
 harmonic should be 1.
 undulator selects the type: 1 -> 18.6 cm, 2 -> 12.0 cm, 3 9.0 cm.
e.g.:
* = gap()

gap_min()
gap_max()

Returns/sets the user limits for the gap size.
e.g.:
* = calc_min()

gap_min_cntrl()
gap_max_cntrl()

Returns the controller limits for the gap size.
e.g.:
* = calc_min_cntrl()