For a given energy ONLINE calculates an optimum gap size from this formula (P. Gürtler):
The letter is the harmonic number,
indicates that the
quantities
,
,
and
depend
on the undulator type (
= 1, 2, 3). Their values are part of
the program code.
is the beam energy [GeV],
is the requested energy.
Since the formula is
is only an approximation, a linear correction is applied:
The constants and
are supplied as symbols in
/online_dir/exp_ini.exp. They have to be
determined for every undulator.
The following commands allow the user to specify the harmonic and the undulator type.
ONLINEharmonic = 3
ONLINEundulator = 1
The function
ONLINE![]()
= calc_gap(energy_value)
returns the gap size for the specified energy [eV].