Check out the Hyperspy Workshop May 13-17, 2024 Online

sigma_clip#

pyxem.utils.diffraction.sigma_clip(z, azimuthal_integrator, npt_rad, npt_azim, mask=None, **kwargs)[source]#
Perform the 2D integration and perform a sigm-clipping iterative

filter along each row. see the doc of scipy.stats.sigmaclip for the options.

Parameters:
  • z (numpy.ndarray) – Two-dimensional data array containing the signal.

  • azimuthal_integrator (pyFAI.azimuthal_integrator.AzimuthalIntegrator object) – An AzimuthalIntegrator that is already initialised and used to calculate the integral.

  • npt_rad (int) – The number of points in the output pattern

  • npt_azim (int) – The number of points in the radial space. Too few points may lead to huge rounding errors.

  • mask (Boolean Array) – A boolean array with pixels to ignore

  • sum (bool) – Returns the integrated intensity rather than the mean.

  • **kwargs – Keyword arguments to be passed to ai.integrate2d

Returns:

  • tth (numpy.ndarray) – One-dimensional scattering vector axis of z.

  • I (numpy.ndarray) – One-dimensional azimuthal integral of z.