Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
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)
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)
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