You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The undulator is an insertion device used to generate the synchrotron radiation at a higher flux density than that from the bending magnet radiation. The photon energy ($hc/\lambda$) from the undulator depends on the electron beam energy ($0.000511\gamma$ GeV), harmonic number ($n$), undulator period ($\lambda_u$), polar angle from the undulator axis ($\theta$), and $K$ parameter which is based on the $\lambda_u$ and peak magnetic field ($B_0$; in the sinusoidal field approximation).
$B_0$ can be designed in the magnet height ($h$) and magnetization ($B_r$), and tuned in the magnetic gap ($g$) and temperature. The minimum gap is basically limited in the dynamic aperture of the storage ring lattice, and the maximum gap is limited in the mechanical structure of the undulator. Various magnetic types and structures are available in the advanced synchrotron facilities.
The deviation from the sinusoidal field appears owing to the finite number of trapezoidal magnet blocks in a period ($M$). In particular, the hybrid short period undulator deforms the sinusoidal field because the high peak field strength at the small pole materials. The photon radiative field can be formulated and analyzed by Takashi Tanaka and Pascal Elleaume (chap. 3).
Here, even if $\beta (z)$ is not sinusoidal, the effective $K$ should be obtained in either the numerical integration of the field as shown above or the discrete Fourier transform (DFT) analysis within a period $\lambda_u$.
For a simplity in the DFT analysis, assume $B_x$=0, so $\beta_x$ is formulated as below.
$$\beta_x (z) = {e \over \gamma m c} \sum_{n=1}^{n_{\mbox{odd}}} {\beta_n} \sin(2 \pi n z / \lambda_u)$$
$K_n$ is described in terms of $\beta_n$, and effective $K$ can be evaluated.
The flux ($F$) from the undulator depends on the the electron beam current ($I$ amps), total length ($L$), $\lambda_u$, $n$, and $K$. The flux over the central cone ($\sqrt{\lambda/L}$) at the harmonic $n$ and number of periods $N$ ($=L/\lambda_u$) in the band width ($\Delta \omega/\omega=0.1$ %) is
$${\partial F \over \partial (\Delta \omega/\omega)} = 1.431 \cdot 10^{14} \cdot N \cdot Q_n(K) \cdot I$$
The maximum $K$ value is correlated with the lowest energy as well as highest $F$ at a particular $n$. The photon energy extends toward a high energy as the $n$ increases at every odd $n$. However, the energy is not tunable between 1st and 3rd harmonics if $K$ is less than 2, because the wavelength of radiation $\lambda_1$ at $K=0$ is equal to $\lambda_3$ at $K=2$ on axis $\theta = 0$ as shown below.
U4Opt discloses these complex relationship among the parameters above. Users comprehend the principle of the undulator at a glance in two plots and tune the periodic length interactively.
Background
The undulator period can be optimized in the plot based on the magnet type, gap, flux. To design the undulator specification in the synchrotron facility, U4Opt has been developed. The first prototype of the program is based on the Excel spreadsheet, and transfered to the macro in Igor Pro. Python code is now available. The coding is in progress, not well documented, but open for public for review.
The magnetic configuration can be selected in the pop down list. Users can tune the parameters from the default values in either ($a, b, c$) or ($B_r, M, h$) configuration. APPLE-II is based on the $B_r = 0.62$ expirically. The magnetic field can be approximated in the following equations;
$$B_0 = a \cdot \exp \left[{g \over \lambda_u} \left( b + {g \over \lambda_u}c \right) \right]$$
by K. Halbach, Nucl. Instrum. Methods 187, 109 (1981) for a pure permanent magnet (PPM). $M$ represents the number of magnets in a priod, and $h$ the height of magnet. The higher order magnetic field appears upon $M$. The effective magnetic field or K can be evaluated in the Fourier transform of the field simulation in the Radia or in-situ measurement in magnet arrays.
Preset
Users can import and export the parameters as a preset (.dat) in Python version.
Non-linear effects
No emittance or energy spread are taken into account resulting in the single electron and Gaussian beam approximation. Further optimization including the end-magnet, phase error, and betatron function should be conducted in SPECTRA or SRW, SRW in OASYS, SRW in Sirepo or jupyter server.
Takashi Tanaka describes the universal representation of phase errors typically formulated below.
Jui-Che Huang describes the average brilliance by using electron beam emittance ($\epsilon$), radiation emittance ($\epsilon_r = \lambda /4\pi$), radiation wavelength ($\lambda$), undulator length ($L$), betatron function ($\beta$), and $\zeta = 2\pi \beta/L$.
Here, $\sigma_{\gamma} / \gamma$ represents the energy spread. These effects are evaluated in the effective brilliance and flux.
Limitations
No warranty of U4Opt without errors. Python and Igor Pro work in the same manner, but Igor Pro runs faster than Python does. The data can be handled in Igor as a wave within the program and transformed in further analysis.
Setup
Python (tested in Windows and macOS)
Install Python3 and pip3 install numpy, scipy, PyQt5, matplotlib, and reliability.
Download this repository and run the main.py under the Python folder.
python3 main.py
Igor Pro version 8 or 9 (tested in Windows and macOS)
Open the procedure file, then compile it. Undulator is available in the macro menu. Select the plot in the popup menu of U4Opt interface.
MPW and BM radiations
The flux of multi-pole wiggler (MPW) and bending magnet (BM) radiation can be added in Igor version. The flux of MPW is limited at the horizontal acceptance angle of 1 mrad. The magnet type and periodic length of MPW are equivalent to those used in the undulator. The magnetic field of BM is evaluated from the beam energy because the circumarence is roughly proportional to the beam energy (Lightsources2018.csv). The on-axis angular flux density of BM is caluclated in
The power of MPW is typically too high to deliver the beam in the beamline optics system. Therefore, the power of MPW shown in https://www.cockcroft.ac.uk/wp-content/uploads/2014/12/Lecture-2.pdf determines the number of period or total length of wiggler. According to the acceptable maximum power and angle from MPW ($P_{max}$), the angular flux density at a specific photon energy can be evaluted in the field-period space at a gap of ID magnets as demonstrated by O. Marcouillé et al or slide page 25.
Usage
Setup the basic parameters like the energy, current, length, and harmonic number.
Choose the magnet type like PPM, hybrid, cryogenic, superconducting, and APPLE-II.
Setup the plot ranges like the period, K, gap, flux, and energy.
Adjust the period at the maximum K (minimum gap) in the variable or slider.
Note that the you may need update the plots from the popup menu after changes in ranges of gap, K, and period in Igor version.