diffraction#
This module contains utility functions for processing electron diffraction patterns.
Functions
| 
 | Apply a transformation to a 2-dimensional array. | 
| 
 | Estimate direct beam position by calculating the center of mass of the image. | 
| 
 | Produces a mask of radius 'r' centered on 'center' of shape 'shape'. | 
| 
 | Converts an affine transform on a diffraction pattern to a suitable form for  | 
| 
 | Generate ellipse perimeter coordinates. | 
| 
 | Convolve two N-dimensional arrays using FFT. | 
| 
 | Estimate direct beam position by blurring the image with a large Gaussian kernel and finding the maximum. | 
| 
 | Find the center of the primary beam in the image img by summing along X/Y directions and finding the position along the two directions independently. | 
| Find the offset of the direct beam from the image center by a cross-correlation algorithm. | |
| 
 | |
| 
 | Find single pixels which have much larger values compared to neighbors. | 
| 
 | Apply gain normalization to experimentally acquired electron diffraction pattern. | 
| [Deprecated] Utility function to help the parameter selection for the difference of gaussians (dog) background subtraction method | |
| 
 | Convenience function to determine if an array is a cupy array | 
| 
 | |
| 
 | Match a template to a 2-D or 3-D image using normalized correlation. | 
| 
 | Matches a template with an image using a window normalized cross-correlation. | 
| 
 | Matches a template with an image z. | 
| 
 | Converts peaks found as array indices to calibrated units, for use in a hyperspy map function. | 
| 
 | Efficient subpixel image translation registration by cross-correlation. | 
| 
 | Draw the perimeter of an circle at a given position in the diffraction pattern (e.g. to provide a reference for finding the direct beam center). | 
| 
 | Perform a h-dome regional filtering of the an image for background subtraction. | 
| 
 | Replace values in bad pixels with mean of neighbors. | 
| 
 | Remove dead pixels from experimental electron diffraction patterns. | 
Classes
| 
 | This class abstracts handling of a project's versions. | 
| 
 | Decorator to mark deprecated functions with an informative warning. | 
| 
 | Interpolate a 1-D function (legacy). | 
| 
 | Decorate an iterable object, returning an iterator which acts exactly like the original iterable, but prints a dynamically updating progressbar every time a value is requested. | 
