How to use the pyxem.utils.peakfinder2D_gui.PeakFinderUIIPYW function in pyxem

To help you get started, we’ve selected a few pyxem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pyxem / pyxem / pyxem / signals / electron_diffraction.py View on Github external
def find_peaks_interactive(self, imshow_kwargs={}):
        """Find peaks using an interactive tool.

        Requires `ipywidgets` and `traitlets` to be installed.

        """
        peakfinder = peakfinder2D_gui.PeakFinderUIIPYW(imshow_kwargs=imshow_kwargs)
        peakfinder.interactive(self)
github pyxem / pyxem / pyxem / signals / diffraction2d.py View on Github external
disc_image : numpy.array
            See .utils.peakfinders2D.peak_finder_xc for details. If not
            given a warning will be raised.
        imshow_kwargs : arguments
            kwargs to be passed to internal imshow statements

        Notes
        -----
        Requires `ipywidgets` and `traitlets` to be installed.

        """
        if disc_image is None:
            warn("You have not specified a disc image, as such you will not "
                 "be able to use the xc method in this session")

        peakfinder = peakfinder2D_gui.PeakFinderUIIPYW(
            disc_image=disc_image, imshow_kwargs=imshow_kwargs)
        peakfinder.interactive(self)
github pyxem / pyxem / pyxem / signals / diffraction2d.py View on Github external
disc_image : numpy.array
            See .utils.peakfinders2D.peak_finder_xc for details. If not
            given a warning will be raised.
        imshow_kwargs : arguments
            kwargs to be passed to internal imshow statements

        Notes
        -----
        Requires `ipywidgets` and `traitlets` to be installed.

        """
        if disc_image is None:
            warn("You have not specified a disc image, as such you will not "
                 "be able to use the xc method in this session")

        peakfinder = peakfinder2D_gui.PeakFinderUIIPYW(
            disc_image=disc_image, imshow_kwargs=imshow_kwargs)
        peakfinder.interactive(self)
github pyxem / pyxem / pyxem / utils / peakfinder2D_gui.py View on Github external
def __init__(self, disc_image=None, imshow_kwargs={}):
        super(PeakFinderUIIPYW, self).__init__()
        self.ax = None
        self.image = None
        self.pts = None
        self.param_container = None
        self.imshow_kwargs = imshow_kwargs
        # if you want to use xc
        self.params[find_peaks_xc.__name__]['disc_image'] = disc_image