Component Manual for the Xray-Tracing Package McXtrace, version 3.8.6

3.1  The Source_pt McXtrace Component

Release: McXtrace 0.1

An x-ray point source

Identification

Description

A simple source model emitting photons from a point source uniformly into 4pi. A square target centered on the Z-axis restricts the beam to that aperture. If an input spectrum datafile (spectrum_file) is not specified, the beam is restricted to emit photons between E0+-dE keV, or lambda0+-dlambda Å, whichever is given. The input spectrum file should be formatted such that x-ray energy/wavelength is in the first column and the intensity in the second. Any preceding lines starting with # are considered part of the file header. If a datafile is given, a nonzero E¤0 value indicates that is is parametrized by energy ( in keV) as opposed to wavelength (in Å). Wavelength is the default. Flux is given in the unit photons/s

Example: Source_pt(dist=1,focus_xw=0.1,focus_yh=0.1, lamda=0.231, dlambda=0.002)

Input parameters

Parameters in boldface are required; the others are optional.

Name

Unit

Description

Default

focus_xw

m

Width of target

0

focus_yh

m

Height of target

0

focus_x0

m

x-cocordinate of target centre.

0

focus_y0

m

y-coordinate of target centre.

0

flux

ph/s

Total flux radiated from the source.

0

dist

m

Distance from source plane to sampling window.

1

E0

keV

Mean energy of xrays.

0

dE

keV

Energy half spread of x-rays.

0

lambda0

Å

Mean wavelength of x-rays.

0

dlambda

Å

Wavelength half spread of x-rays (flat or gaussian sigma).

0

phase

rad

Set phase to something given.

0

randomphase

0/1

If nonzero, the phase of the emotted photon is random, i.e. source is fully incoherent. otherwise the value of phase is used.

1

gauss

1

Gaussian (1) or Flat (0) energy/wavelength distribution

0

spectrum_file

string

File from which to read an input spectrum.

””

verbose

1

Output more information runtime.

0

Links

A mathematical point emitting photons with a spectrum either uniform, gaussian or generated from a datafile

The simplest source model, where a mathematical point source at \((0,0,0)\) emits photons. The wavevector of the emitted photons is picked randomly in a defining aperture focus_xw by focus_yh m at \((0,0,\mathit {dist})\). Please note that this aperture is merely a virtual aperture used to reduce the sampling space. This has a few implications: Other components may be placed without reference to the aperture, but if the aperture does not fill the full acceptance window of subsequent components your simulations will be biased. The aperture is simply there to provide efficient sampling.

If a 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. The Energy/wavelength spectrum of the emitted photons is centered around E0 or \(\lambda 0\) with a width of dE or \(d\lambda \) respectively. E0 takes precedence over \(\lambda 0\). Thus if \(E0\neq 0\) the the combination E0, dE is used, \(\lambda 0,d\lambda \) otherwise. If gauss (the default) is set to be non-zero the spectrum is Gaussian with mean E0 (\(\lambda 0\)) and standard deviation dE (\(d\lambda \)), otherwise the spectrum is uniform in E0\(\pm \)dE (\(\lambda 0\pm d\lambda \)).

If a spectrum_file 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.

Currently only completely coherent or fully incoherent beams are supported. If randomphase is specified emitted photons will be assigned a random phase, otherwise it is set to the value of phase.