XRD Analyzer Documentation
Welcome to the technical library for XRD Analyzer. Here you will find extensive guides on digital filtering, profile fitting theories, and crystallite size deconvolution models.
Core Documentation
Understanding the Analysis Pipeline
The XRD Analyzer platform implements a standard four-phase digital signal processing pipeline for powder X-ray diffraction data. Because all processing runs inside a WebAssembly virtual machine directly in your client's web browser, understanding how these subroutines execute helps you configure parameters for publication-quality results.
Phase 1: Pre-processing & Baseline Removal
Experimental XRD scans often contain backgrounds caused by thermal diffuse scattering, sample holder scatter, or fluorescence. Before fitting profiles, you must isolate the crystalline reflection signals. Our tool uses the SNIP algorithm from the pybaselines package to clip backgrounds iteratively. You can also strip $K\alpha_2$ radiation peaks using the Rachinger shift algorithm, preventing split peak profiles.
Phase 2: Peak Detection & Centroid Location
Once the background is subtracted, a peak-finding subroutine scans the spectrum. It uses the SciPy signal processing module to identify local maxima based on your custom height, prominence, and width parameters. The coordinates of these peaks are converted to crystallographic lattice d-spacings via Bragg's Law.
Phase 3: Mathematical Profile Fitting
Diffraction peaks are not simple delta functions; their shape represents the instrument geometry and crystallographic defects. Our system runs non-linear least-squares regressions to fit each detected peak with a Pseudo-Voigt model. The Pseudo-Voigt function is a linear combination of Gaussian and Lorentzian profiles, which allows it to model both instrument-induced shapes and grain-broadening effects.
Phase 4: Sizing & Crystallographic Phase Matching
The final phase calculates crystallite sizes using the Scherrer equation. If you upload crystal structure definitions in CIF format, our engine calculates theoretical Bragg reflections, overlays them on your plot, and computes Figure-of-Merit (FOM) coefficients to identify phase contributions.