The tutorial 4th

Contents

The tutorial 4th#

Illustrates the simulation features built into the package for refinement purposes.

Note: For general-purpose diffraction simulation, please refer to the standalone toolkit

coding#

1. Save your diffraction data to the root directory and rename the file to intensity.csv.

# import PyXplore package
from PyXplore import WPEM
import pandas as pd
██╗    ██╗██████╗ ███████╗███╗   ███╗
██║    ██║██╔══██╗██╔════╝████╗ ████║
██║ █╗ ██║██████╔╝█████╗  ██╔████╔██║
██║███╗██║██╔═══╝ ██╔══╝  ██║╚██╔╝██║
╚███╔███╔╝██║     ███████╗██║ ╚═╝ ██║
 ╚══╝╚══╝ ╚═╝     ╚══════╝╚═╝     ╚═╝                                                  

A Diffraction Refinement Software : WPEM
Bin Cao, Advanced Materials Thrust, Hong Kong University of Science and Technology (Guangzhou)
URL : https://github.com/Bin-Cao/WPEM
Executed on : 2025-07-22 11:13:26  | Have a great day.
====================================================================================================

Save the .cif file in the root directory and generate its powder diffraction pattern.

_,_,_ = WPEM.XRDSimulation(filepath='Mn2O3.cif',two_theta_range=(10, 120, 0.01),bacI=True,GrainSize=3,orientation=[-0.2, 0.3],thermo_vib=0.2,zero_shift=0.01)
the space group of input crystal is : I 21 3
cif file parse completed
atom locations claculated by parsed cif file
retrieval of all reciprocal vectors satisfying the diffraction geometry is done
extinction peaks are distinguished
There are 43 extinction peaks
Diffraction condition judgment end !
The input crystal system is: Cubic  |  The initial lattice constants : 9.41 9.41 9.41 90.0 90.0 90.0


WPEM simulates the peaks as the default Voigt functions
Initilized with default peak's shape
The nearest neighbor atoms are : ['Mn3+', 'O2-', 1.8337]
../../_images/f4c785d068420e70ec2042397c3ff5b8b873c44328118d7a3929f902fefb3a10.png
XRD simulation process of WPEM is completed !
<Figure size 640x480 with 0 Axes>