jarvis.analysis.diffraction.xrd

Module to predict X-ray diffraction.

Classes

XRD

Constryct an XRD class.

Functions

baseline_als(y, lam, p[, niter])

ALS baseline correction to remove broad background trends.

recast_array(x_original, y_original, x_new[, tol])

Recast original spectrum onto a new grid, accumulating close values.

sharpen_peaks(y[, sigma])

Sharpen peaks using a narrow Gaussian filter.

processed(x, y[, x_range, intvl, sigma, recast, tol, ...])

Process the spectrum: background removal and peak sharpening.

smooth_xrd([atoms, thetas, intvl])

Module Contents

class jarvis.analysis.diffraction.xrd.XRD(wavelength=1.54184, thetas=[0, 180], two_theta_array=[], dhkl_array=[], intensity_array=[], scaling_factor=100, two_theta_tol=1e-05, intensity_tol=0.5, max_index=5)[source]

Bases: object

Constryct an XRD class.

wavelength = 1.54184
min2theta
max2theta
thetas = [0, 180]
two_theta_array = []
dhkl_array = []
intensity_array = []
two_theta_tol = 1e-05
intensity_tol = 0.5
max_index = 5
scaling_factor = 100
simulate(atoms=None)[source]

Simulate XRD pattern.

Forked from https://github.com/qzhu2017/XRD.

get_unique_families(hkls)[source]

Return unique families of Miller indices.

Families must be permutations of each other. Args:

hkls ([h, k, l]): List of Miller indices.

Returns:

{hkl: multiplicity}: A dict with unique hkl and multiplicity.

jarvis.analysis.diffraction.xrd.baseline_als(y, lam, p, niter=10)[source]

ALS baseline correction to remove broad background trends.

jarvis.analysis.diffraction.xrd.recast_array(x_original, y_original, x_new, tol=0.1)[source]

Recast original spectrum onto a new grid, accumulating close values.

jarvis.analysis.diffraction.xrd.sharpen_peaks(y, sigma=0.5)[source]

Sharpen peaks using a narrow Gaussian filter.

jarvis.analysis.diffraction.xrd.processed(x, y, x_range=[0, 90], intvl=0.1, sigma=0.05, recast=True, tol=0.1, background_subs=True)[source]

Process the spectrum: background removal and peak sharpening.

jarvis.analysis.diffraction.xrd.smooth_xrd(atoms=None, thetas=[0, 90], intvl=0.5)[source]