jarvis.analysis.diffraction.xrd =============================== .. py:module:: jarvis.analysis.diffraction.xrd .. autoapi-nested-parse:: Module to predict X-ray diffraction. Classes ------- .. autoapisummary:: jarvis.analysis.diffraction.xrd.XRD Functions --------- .. autoapisummary:: jarvis.analysis.diffraction.xrd.baseline_als jarvis.analysis.diffraction.xrd.recast_array jarvis.analysis.diffraction.xrd.sharpen_peaks jarvis.analysis.diffraction.xrd.processed jarvis.analysis.diffraction.xrd.smooth_xrd Module Contents --------------- .. py:class:: 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) Bases: :py:obj:`object` Constryct an XRD class. .. py:attribute:: wavelength :value: 1.54184 .. py:attribute:: min2theta .. py:attribute:: max2theta .. py:attribute:: thetas :value: [0, 180] .. py:attribute:: two_theta_array :value: [] .. py:attribute:: dhkl_array :value: [] .. py:attribute:: intensity_array :value: [] .. py:attribute:: two_theta_tol :value: 1e-05 .. py:attribute:: intensity_tol :value: 0.5 .. py:attribute:: max_index :value: 5 .. py:attribute:: scaling_factor :value: 100 .. py:method:: simulate(atoms=None) Simulate XRD pattern. Forked from https://github.com/qzhu2017/XRD. .. py:method:: get_unique_families(hkls) 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. .. py:function:: baseline_als(y, lam, p, niter=10) ALS baseline correction to remove broad background trends. .. py:function:: recast_array(x_original, y_original, x_new, tol=0.1) Recast original spectrum onto a new grid, accumulating close values. .. py:function:: sharpen_peaks(y, sigma=0.5) Sharpen peaks using a narrow Gaussian filter. .. py:function:: processed(x, y, x_range=[0, 90], intvl=0.1, sigma=0.05, recast=True, tol=0.1, background_subs=True) Process the spectrum: background removal and peak sharpening. .. py:function:: smooth_xrd(atoms=None, thetas=[0, 90], intvl=0.5)