Fitting Powder diffraction data#
Previously, you simulated and reduced powder diffraction data.
In this exercise, you will analyse this data with easyscience
.
Before the analysis can begin, it is necessary to load the experimental data and check that it looks reasonable.
The data can be loaded with np.loadtxt
as the data has been stored in a simple space-separated column file.
For simplicity, we use a custom wrapper around np.loadtxt
:
import numpy as np
from load import load
q, i, di = load('../4-reduction/powder_reduced_3pulses.xye')
With the data read in, we can produce a quick plot.
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.errorbar(q, i, di, fmt='.')
ax.set(yscale='log', xlabel='$t$/s', ylabel='I(t)')
plt.show()