Chapter 4: Radiation emitted by charges in bending magnets

Below is a set of python codes associated with Chapter 4 of Daniele Pelliccia and David M. Paganin, “Synchrotron Light: A Physics Journey from Laboratory to Cosmos” (Oxford University Press, 2025).

In order to run any of these python codes, you will need to include the following header file.

Synchrotron radiation for electrons and protons

See Fig. 4.2.

Radio-frequency cavity

See Fig. 4.4.

Simplified plot of synchrotron emission

The following code will generate one of the panels in Fig 4.8. Repeat the simulation by changing \beta.

Time-bandwidth uncertainty relation

See Fig. 4.11.

Spectral plots

Radiated power as a function of the harmonic order in Fig. 4.14.

Plots of J_n^{2}(n \beta) and J_n^{'2}(n \beta) vs \beta

See Fig. 4.15.

2D map of the power distribution

See Fig. 4.16.

Asymptotic expansion of J_n^{'}(n \beta)

See Fig. 4.17. Note: the labels are added separately in the published book version.

Numerical computation of critical harmonic number

See Fig. 4.18.

Modified Bessel functions of fractional order

See Fig. 4.19.

Comparison between exact and approximated spectrum

See Fig. 4.20.

Surface plot of universal function

See Fig. 4.21.

Taylor expansion of g(\tau)

Calculate Taylor expansion recursively and plot Fig. 4.22.

Padé approximant

The coefficients of the Padé approximant are derived from the Taylor series coefficients using the procedure described in the book by Baker (1975) that is cited on page 134. Note that the coefficients a[i] calculated in the previous section are needed for the calculations described in the computational exercise on page 111 and to plot Fig. 4.23.

Synchrotron spectrum plotted as a function of energy

See Fig. 4.24.

Polarisation: basic concepts

Plots of the polarisation ellipses in Fig. 4.27.

3D plots of polarisation components

See Fig. 4.28.

Polarisation ellipses of synchrotron radiation

See Fig. 4.30.

Eccentricity

See Fig. 4.31.

Spectral intensity associated with the two polarisation components

See Fig. 4.34. First calculate the two components.

Then generate the plots.