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.
Citar como
Karol Vegso (2026). GIWAXS angle calculator (https://es.mathworks.com/matlabcentral/fileexchange/112880-giwaxs-angle-calculator), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2021b
Compatible con cualquier versión desde R2021b hasta R2022a
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
