template_match_with_binary_image#
- Diffraction2D.template_match_with_binary_image(binary_image, lazy_result=True, show_progressbar=True, **kwargs)[source]#
[Deprecated] Template match the signal dimensions with a binary image.
Used to find diffraction disks in convergent beam electron diffraction data.
Might also work with non-binary images, but this haven’t been extensively tested.
- Parameters:
binary_image (numpy.ndarray (2-D NumPy array))
lazy_result (bool, default True) – If True, will return a LazyDiffraction2D object. If False, will compute the result and return a Diffraction2D object.
show_progressbar (bool, default True)
- Return type:
Examples
>>> s = pxm.data.dummy_data.get_cbed_signal() >>> binary_image = np.random.randint(0, 2, (6, 6)) >>> s_template = s.template_match_with_binary_image( ... binary_image, show_progressbar=False) >>> s.plot()
See also
pyxem.signals.Diffraction2D.template_match_disk
,pyxem.signals.Diffraction2D.template_match_ring
Notes
Deprecated since version 0.15.0: Function template_match_with_binary_image() is deprecated and will be removed in version 1.0.0.