Skip to content

Commit

Permalink
Fix two doctests in radial_utils.py
Browse files Browse the repository at this point in the history
Note that this file is still ignored by the unit testing, due to a
progressbar making the test fail.
  • Loading branch information
magnunor committed Apr 23, 2021
1 parent 8acd72d commit 91c22ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyxem/utils/radial_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ def fit_single_ellipse_to_signal(
Examples
--------
>>> import pyxem.dummy_data import make_diffraction_test_data as mdtd
>>> from pyxem.dummy_data import make_diffraction_test_data as mdtd
>>> s = pxm.signals.Diffraction2D(np.zeros((200, 220)))
>>> s.axes_manager[0].offset, s.axes_manager[1].offset = -100, -110
>>> xx, yy = np.meshgrid(s.axes_manager[0].axis, s.axes_manager[1].axis)
Expand Down Expand Up @@ -715,13 +715,13 @@ def fit_ellipses_to_signal(
Examples
--------
>>> import pyxem.dummy_data import make_diffraction_test_data as mdtd
>>> s = ps.PixelatedSTEM(np.zeros((200, 220)))
>>> from pyxem.dummy_data import make_diffraction_test_data as mdtd
>>> s = pxm.signals.Diffraction2D(np.zeros((200, 220)))
>>> s.axes_manager[0].offset, s.axes_manager[1].offset = -100, -110
>>> xx, yy = np.meshgrid(s.axes_manager[0].axis, s.axes_manager[1].axis)
>>> ellipse_ring = mdtd._get_elliptical_ring(xx, yy, 0, 0, 50, 70, 0.8)
>>> s.data += ellipse_ring
>>> from pyxem..utils.radial_tools import fit_ellipses_to_signal
>>> from pyxem.utils.radial_utils import fit_ellipses_to_signal
>>> output = fit_ellipses_to_signal(
... s, [(40, 80)], angleN=30, show_progressbar=False)
Expand Down

0 comments on commit 91c22ff

Please sign in to comment.