Reciprocal space analysis and calculation are fundamental concepts, especially in fields like solid-state physics, materials science, and crystallography. Essentially, reciprocal space is a mathematical construct that helps us understand the wave-like properties of structures in real space, particularly how they interact with radiation like X-rays, neutrons, and electrons.
The relationship between the real and reciprocal lattice vectors is defined by:
$$ a_i \cdot b_j=2 \pi \delta_{i j} $$
where $\delta_{i j}$ is the Kronecker delta ( 1 if $i=j$, and 0 if $i \neq j$ ). More explicitly, the primitive reciprocal lattice vectors can be calculated from the primitive real lattice vectors as follows:
$$ \vec{b}_1 = 2\pi \frac{\vec{a}_2 \times \vec{a}_3}{\vec{a}_1 \cdot (\vec{a}_2 \times \vec{a}_3)} $$
$$ \begin{aligned} b_2 & =2 \pi \frac{a_3 \times a_1}{a_1 \cdot\left(a_2 \times a_3\right)} \\ b_3 & =2 \pi \frac{a_1 \times a_2}{a_1 \cdot\left(a_2 \times a_3\right)} \end{aligned} $$
where $a_1 \cdot\left(a_2 \times a_3\right)$ represents the volume of the real space unit cell.
https://gist.github.com/viadean/8b2cc6ee578f3f29f455253c28ffe3e6
example_image.tiff
with the path to your 2D X-ray diffraction image file.detector_distance
, wavelength
, pixel_size
, poni_x
, and poni_y
values to match your experimental setup.transform_reciprocal_space
method computes the diffraction pattern in reciprocal space (qx, qy).matplotlib
library is used to plot the transformed data as a 2D intensity map.