# X-ray sources

XOP has many tools to simulate x-ray sources. Most of them are for synchrotron radiation sources (spectral emission, angular and spatial distributions, etc.), but some other programs may also simulate the emission spectra of some x-ray tubes. Other applications may be useful for spectral calculations using some well-known typical distributions.

## Bending Magnet Radiation.

Spectral flux and power for a given angular emission angle, integrated over an angle interval, and integrated over the full angle. BM

## Wiggler Radiation

Two programs are available for calculating the spectral flux emitted by a wiggler:

- WS calculates the flux (and spectral power) on a (spatial or angular) aperture.

- XWIGGLER calculates the flux (and spectral power) integrated over all angles. It can deal with non-sinusoidal electron trajectories (elliptical wigglers).

Both produce the same results when a large enough aperture is chosen in WS. However, the aperture should be large enough to receive all the radiation fan, and small enough to allow accurate integration in the defined 2-dimensional integration grid. Therefore, for full emission it is recommended to use XWIGGLER for simplicity.

None of these programs include the finite size and divergence of the electron beam. They cannot create power distribution maps. For these kind of calculation, it is possible to use the undulator programs using the wiggler parameters.

## Undulators

The most typical calculation regarding plane and helical undulators are the spectral distributions, angular and spatial emission maps, and brightness. Two programs (XUS and XURGENT) can deal with this type of calculations, and the functionality of both overlap in more than 95%. The user can choose the one of his/her preference.

Other programs are for specific calculations. XTC computes tunning tuning curves (i.e., maximum flux and brightness for undulator gap changing in a given interval) (XTC). The code XYAUP is for tapered undulators.

## Others

Two programs simulate the emission of some X-ray tubes in some particular energy intervals. They use "gold standard" experimental spectra as a starting point for an interpolation algorithm. They are:

- XTUBE_W (Tungsten anode from 30 to 140 keV)

- XTUBES (for Mo, Rh and W anodes from 18 to 42 keV).

Another application is for quick computation of spectral distributions following well-known laws:

- BLACK_BODY: Plank distribution (thermal radiation from a black body).