stemtool.eels package

Submodules

stemtool.eels.eels_tools module

stemtool.eels.eels_tools.cleanEELS_3D(data3D, method, threshold=0)[source]
stemtool.eels.eels_tools.cleanEELS_wavelet(data, threshold)[source]
stemtool.eels.eels_tools.lcpl(xx, c1, p1, c2, p2)[source]
stemtool.eels.eels_tools.powerlaw_fit(xdata, ydata, xrange)[source]

Power Law Fiiting of EELS spectral data

Parameters:
  • xdata (ndarray) – energy values in electron-volts
  • ydata (ndarray) – intensity values in A.U.
  • xrange (ndarray) – Starting and stopping energy values in electron volts
Returns:

  • fitted (ndarray) – Background from the region of xdata
  • power (float) – The power term
  • const (float) – Constant of multiplication

Notes

We first find the array start and stop points to which the power law will be fitted to. Once done, we take the logarithm of both the intensity values and the energy loss values, taking care to to only take the log of non-negative intensity values to prevent imaginary numbers from occuring. We then do a linear polynomial fit in numpy, and return the power law fitted data, power and the multiplicative constant. Since the fitting is done in log-log space, we have to take the exponential of the intercept to get the multiplicative constant.

Authors:

Jordan Hachtel <hachtelja@ornl.gov>

stemtool.eels.eels_tools.powerlaw_plot(xdata, ydata, xrange, figtitle, showdata=True, font={'family': 'sans-serif', 'size': 25, 'weight': 'bold'})[source]
stemtool.eels.eels_tools.region_intensity(xdata, ydata, xrange, peak_range, showdata=True)[source]