pyxem / pyxem-demos

Examples and tutorials of multi-dimensional diffraction microscopy workflows using pyxem.
29 stars 38 forks source link

01 GaAs Nanowire #73

Closed CMHell closed 3 years ago

CMHell commented 3 years ago

Hi,

I run always into the same issue with this notebook =(

(I should mention that I am hopping over 3. and 4. To go directly to 5. I replace in in the peak finding "dpc" with "dp"... so it should work ? )

This is the error message after peaks.plot_diffraction_vectors_on_signal:

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-18-a031ee756147> in <module>
----> 1 peaks.plot_diffraction_vectors_on_signal(dp, cmap = 'gray', vmax = 50)

~\.conda\envs\pyxem\lib\site-packages\pyxem\signals\diffraction_vectors.py in plot_diffraction_vectors_on_signal(self, signal, *args, **kwargs)
    329             Keyword arguments passed to signal.plot()
    330         """
--> 331         mmx, mmy = generate_marker_inputs_from_peaks(self)
    332         signal.plot(*args, **kwargs)
    333         for mx, my in zip(mmx, mmy):

~\.conda\envs\pyxem\lib\site-packages\pyxem\signals\diffraction_vectors.py in generate_marker_inputs_from_peaks(peaks)
    104 
    105     """
--> 106     max_peak_len = _find_max_length_peaks(peaks)
    107     pad = np.array(
    108         list(

~\.conda\envs\pyxem\lib\site-packages\pyxem\signals\diffraction_vectors.py in _find_max_length_peaks(peaks)
     73     """
     74     x_size, y_size = (
---> 75         peaks.axes_manager.navigation_shape[0],
     76         peaks.axes_manager.navigation_shape[1],
     77     )

IndexError: tuple index out of range
pc494 commented 3 years ago

This error is probably caused by the peak finding algorithm not finding peaks in some patterns. If you run the cell below (which plots how many peaks you've found) this should be obvious. To address this you may have to tweak the parameters in the peak finder.

Hope that helps :)

CMHell commented 3 years ago

Thanks!

From: Phillip Crout @.> Sent: Thursday, June 24, 2021 2:43 PM To: pyxem/pyxem-demos @.> Cc: Christoph Hell @.>; Author @.> Subject: Re: [pyxem/pyxem-demos] 01 GaAs Nanowire (#73)

This error is probably caused by the peak finding algorithm not finding peaks in some patterns. If you run the cell below (which plots how many peaks you've found) this should be obvious. To address this you may have to tweak the parameters in the peak finder.

Hope that helps :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/pyxem/pyxem-demos/issues/73#issuecomment-867605579, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO5UDO6KBT7C5Z6ODISY6FTTUMR4RANCNFSM47HZMQLA.