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.

🧠Example

https://gist.github.com/viadean/8b2cc6ee578f3f29f455253c28ffe3e6

Key Notes:

  1. Input Data: Replace example_image.tiff with the path to your 2D X-ray diffraction image file.
  2. Experimental Parameters: Update the detector_distancewavelengthpixel_sizeponi_x, and poni_y values to match your experimental setup.
  3. Reciprocal Space Transformation: The transform_reciprocal_space method computes the diffraction pattern in reciprocal space (qx, qy).
  4. Visualization: The matplotlib library is used to plot the transformed data as a 2D intensity map.