GIWAXS angle calculator

Version 1.0.3 (2.05 KB) by Karol Vegso
GIWAXS angle calculator
4 Downloads
Updated 9 Jun 2022

View License

I post here simple GIWAXS angle calculator. First, you define length of basis vectors a1, a2, a3 defining your unit cell and angles between basis vectors alpha, beta and gama. In crystallography, a1 is usually marked as a, a2 is marked as b and a3 is marked as c. The angle between a2 and a3 is alpha (angle between b and c), the angle between a1 and a3 is beta (angle between a and c), the angle between a1 and a2 is gama (angle between a and b). My simple program calculates metric tensor g in real space and metric tensor g* (g_star) in reciprocal space.
Then, you specify reciprocal space vectors h1 and h2. The h1 and h2 are defined as column vectors. The angle between reciprocal space vectors h1 and h2 is calculated in the variable angle in the line 66. Actually, here, the scalar multpilication between h1 and h2 vectors is used.
First note for GIWAXS users. If reciprocal space vector h1 is perpendicular to the sample surface and reciprocal space vector h2 is pointing from origin of reciprocal space to the GIWAXS diffraction spot, then the angle between h1 and h2 is actually chi angle in GIWAXS measurement.
If there is the plane which has reciprocal space vector h perpendicular to it, the program calculates the projections of reciprocal space vectors h1 and h2 to that plane. The angle between those projections is stored in the variable angle_proj in degrees.
The program is demonstarted for c-plane sapphire. The angle between projections of h1=(1 0 2) and h2=(-1 1 2) on the (0 0 1) plane is 120 degree.
Enjoy this simple program. I wish you a lot of fun in reciprocal space.

Cite As

Karol Vegso (2024). GIWAXS angle calculator (https://www.mathworks.com/matlabcentral/fileexchange/112880-giwaxs-angle-calculator), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021b
Compatible with R2021b to R2022a
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.3

GIWAXS angle calculator

1.0.2

GIWAXS angle calculator

1.0.1

GIWAXS angle calculator

1.0.0