Getting started
Powder diffraction¶
AUSAXS calculates the powder diffraction pattern of a nanocrystal or nanoparticle directly from its atomic structure. A powder is a sample of randomly oriented crystallites, which is exactly what the Debye equation describes.
Since the pattern is calculated from the actual atoms of the particle, the broadening of the peaks from its finite size enters directly, as do its surface, defects and strain. For large crystallites with sharp peaks, Rietveld refinement is the better tool. The effects of the instrument, such as polarisation and instrumental broadening, are not included, and must be accounted for before comparing with a measured pattern.
The pattern is calculated as a function of \(q\), which is related to the scattering angle by \(q = \frac{4\pi}{\lambda}\sin\theta\).
Example¶
Here we calculate the Cu Kα powder pattern of a silver nanoparticle of 201 atoms, about 2 nm across, Ag_crystal.cif:
ausaxs debye Ag_crystal.cif --qmax 8.15 --wavelength 1.5406
import numpy as np
import pyausaxs as ausaxs
import matplotlib.pyplot as plt
ausaxs.settings.histogram(bin_width=0.05)
wavelength = 1.5406 # Cu Kα, in Å
two_theta = np.linspace(30, 150, 2000) # scattering angle 2θ, in degrees
q = 4*np.pi/wavelength*np.sin(np.radians(two_theta)/2)
mol = ausaxs.create_molecule("Ag_crystal.cif")
_, I = mol.debye_raw(q, form_factors=True)
plt.plot(two_theta, I)
plt.xlabel("2θ [°]")
plt.ylabel("I")
plt.show()
The peaks are broad because the particle is only about 2 nm across.
Every option of ausaxs debye is listed in its documentation.
Getting started