Tool to analyze XRD data for BCC metals and alloys. It fits the peaks with help of the Package 'Peakutiles' and then calculates the lattice constant of the alloy phases and the formed oxides.
- From the fitted peaks, the values for the Cr concentration are calculated by the Vegard's approximation, the concentrations are filtered by bins to seperate the different BCC phases, and then the concentrations (weight%) are displayed in the Plot legend under the BCC title.
- The rest of the peaks, which were not detected as Metal/Alloy, are compared to a dictionary of different possible oxides, then these are marked in the plot and given in the legend. Herein, a new very fast numpy compare algorithm, based on numpy.searchsorted, was developted for this purpose making it possible to compare to arrays of different length on approximate values. It is available in the XRD_Analyses_modul.py and is called ox_index.
This repository contains a Jupyter notebook ('.ipynb') file and the XRD_Analyses_Modul ('.py') file. All the scripts were written using Python 2.7, portation to Python 3.X is possible. The main libraries used are numpy, pyplot from matplotlib, scipy.signal with function 'savgol_filter' for smoothing, peakutils for the fit, sys, and os for shell comments.
For the metal and oxides the data of (ICDD-Database (2014) spefically: PDF2014 PDF-2) is used, except Y$6$WO${12}$ and W${8}$O${21}$, which are taken from: Persson, K. (2014). Materials data on y6wo12 (sg:148) by materials project.
Only download the ('.ipynb') and the XRD_Analyses_Modul files, put both files in to a folder for example '/XRD', then add a folder of samples with the name describing the experiment e.g. 'Bulk' in this folder all plots are saved. In this folder ('Bulk') create a subfolder with the name '/data', here you can put the ('.xy') data files to investigate. The full path then looks like ('/XRD/Bulk/data').
At the moment this is optimized for the BCC W-Cr system but an adaption for other systems is possible if the Vegard's law applies for the system.
Distributed under the MIT license. See LICENSE.txt
for more information.