\section{Source\_div: A continuous source with specified divergence}
\label{source-div}
\index{Sources!Continuous source with specified divergence}

\mcdoccomp{sources/Source_div.parms}

\textbf{Source\_div} is a rectangular source, $w \times h$, which emits a
beam of a specified divergence around the direction of the $z$-axis.

Just as for \textbf{Source\_pt}, if a \textit{spectrum\_file} is not supplied, the xray
is given a weight which is the total wavelength-integrated intensity downscaled
by the solid angle subtended by the defining aperture and the energy/wavlength spectrum is centered around  \textit{E0} or  $\lambda 0$ with width
\textit{dE} or $d\lambda$ respectively. The profile is Gaussian if \textit{gauss}$\neq0$, uniform if \textit{gauss}$=0$,
If a \textit{spectrum\_file} \emph{is} supplied, a slightly different strategy is adopted. In this case the
wavelength/energy range implied by the datafile is sampled unformly and each ray is assigned
a weight corresponding to the intensity indicated by linear interpolation between datapoints
at that wavelength. This implies an oversampling of weak parts of the intensity spectrum.

The beam intensity is uniform over
the whole of the source and the source divergences are \textit{focus\_ah} and \textit{focus\_aw} in degrees.
Unless \textit{gauss\_a}$\neq=0$ the individual photons are sampled from a uniform divergence distribution, otherwise a Gaussian is used.

