CBD forward model#

Experimental setup#

Experimental setup of a convergent beam crystallography experiment.

In the experimental setup of a CBC experiment a pair of lenses focuses the X-ray beam into a point and a crystalline sample is put in the X-ray beam at a ceratin distance downstream. The sample diffracts the incoming X-ray beam into a diffraction pattern captured by the detector. The experimental geometry is stored in cbclib.ScanSetup container, which comprises the following parameters:

  • foc_pos : Focal point of the incoming X-ray beam.

  • pupil_roi : Focus beam extent [y_min, y_max, x_min, x_max] at the detector plane. Since the beam is formed by two 1D focusing lenses, the focused beam has a rectangular shape.

  • rot_axis : The axis of sample rotation. The axis is defined by its azimuth and inclination.

  • smp_dist : Focus-to-sample distance in meters.

  • wavelength : The wavelength of the incident X-ray beam in meters.

  • x_pixel_size and y_pixel_size : Detector pixel size along the x and y axes in meters.

Note

All coordinates are defined relative to the origin of the detector and z axis is directed collinearly with the direction of X-ray beam propagation.

A location at the detector plane is related to a wave-field emanated from the source point \(\mathbf{x}_s\) inside the sample and scattered along the \(\mathbf{k}_{out}\) wave-vector as follows:

\[\begin{split}\mathbf{k}_{out} &= \begin{cases} \sin \theta(\mathbf{x} - \mathbf{x}_s) \cos \varphi(\mathbf{x} - \mathbf{x}_s), \\ \sin \theta(\mathbf{x} - \mathbf{x}_s) \sin \varphi(\mathbf{x} - \mathbf{x}_s), \\ \cos \theta(\mathbf{x} - \mathbf{x}_s), \end{cases} \\ \theta(\mathbf{x}) &= \arccos \left(\frac{z}{\sqrt{x^2 + y^2 + z^2}} \right), \\ \varphi(\mathbf{x}) &= \mathrm{atan2}(y, x).\end{split}\]

See also

cbclib.ScanSetup provides methods to project a detector point to a outcoming wave-vector (detector_to_kout) and vice-versa (kout_to_detector) following the above equation.

The source point \(\mathbf{x}_s\) is assumed to lie at the sample plane and can be expressed as a function of the incoming wave-vector \(\mathbf{k}_{in}\):

\[\begin{split}\mathbf{x}_s = \begin{cases} x_f + (z_{smp} - z_f) \tan \theta(\mathbf{k}_{in}) \cos \varphi(\mathbf{k}_{in}), \\ y_f + (z_{smp} - z_f) \tan \theta(\mathbf{k}_{in}) \sin \varphi(\mathbf{k}_{in}), \\ z_{smp}. \end{cases}\end{split}\]

See also

The above equation is used in cbclib.ScanSetup.kin_to_sample() to project an incident wave-vector to a source point at the sample plane.

CBDModel#

Geometric model for Bragg reflection in Convergent Beam Difrraction (CBD) scheme.

The forward model cbclib.CBDModel takes the following objects:

cbclib.CBDModel finds all the coordinates on the detector that satisfy the Bragg condition for reflection (see generate_streaks) and calculates the standard reflection profile \(f^2_{hkl}(\mathbf{x})\) (see pattern_dataframe). The location of a reflection on the detector is defined by a set of incident wave-vectors that satisfy the Bragg condition. These incident wave-vectors are given by:

\[\begin{split}(\mathbf{k}_{in} - \mathbf{s}) \mathbf{q} = 0, \quad \mathbf{s} = \begin{cases} \sin\left(\arccos(q / 2) - \theta_q\right) \cos \varphi_q, \\ \sin\left(\arccos(q / 2) - \theta_q\right) \sin \varphi_q, \\ \cos\left(\arccos(q / 2) - \theta_q\right). \end{cases}\end{split}\]

See also

cbclib.bin.calc_source_lines() takes a set of reciprocal lattice points and calculates the source lines following the above equation.

Contents#