Пример #1
0
 def _create_image_window(self, item):
     window = ImageWindow(wintitle=item.measurement.param.filename,
                          icon="image.png",
                          toolbar=True)
     compute_menu = window.menuBar().addMenu(_("&Compute"))
     compute_actions = []
     compute_actions.append(
         create_action(self,
                       _("&Line correction"),
                       triggered=item.compute_line_detrend,
                       tip=_("Apply a linewise slope correction.")))
     compute_actions.append(
         create_action(self,
                       _("&Fourier transform"),
                       triggered=item.compute_fft,
                       tip=_("Compute the Fourier transfom of the curve.")))
     compute_actions.append(
         create_action(
             self,
             _("&Inverse Fourier transfom"),
             triggered=item.compute_ifft,
             tip=_("Compute the inverse Fourier transfom of the curve.")))
     compute_actions.append(
         create_action(self,
                       _("&Apply Wiener filter"),
                       triggered=item.compute_wiener,
                       tip=_("Smooth the curve with a Wiener filter.")))
     compute_actions.append(
         create_action(self,
                       _("&Apply Gauss filter"),
                       triggered=item.compute_gaussian,
                       tip=_("Smooth the curve with a Gaussian filter.")))
     compute_actions.append(
         create_action(
             self,
             _("&Apply Savitzky-Golay"),
             triggered=item.compute_savitzky,
             tip=
             _("Compute a smoothig or a derivative of the curve according to Savitzky-Golay algorithm."
               )))
     compute_actions.append(
         create_action(self,
                       _("&Zeroes"),
                       triggered=item.compute_zeroes,
                       tip=_("Set the minimum of the data to zero.")))
     add_actions(compute_menu, compute_actions)
     plot = window.get_plot()
     xunit = item.measurement.param.axis1.unit
     yunit = item.measurement.param.axis2.unit
     zunit = item.measurement.param.unit
     plot.set_titles(title=None,
                     xlabel=None,
                     ylabel=None,
                     xunit=xunit,
                     yunit=(yunit, zunit))
     plot.set_axis_direction('left', False)
     plot.add_item(item)
     return window
Пример #2
0
def graphical_inspection_map():
    map_ = create_test_map()

    from guiqwt.plot import ImageWindow
    win = ImageWindow(wintitle="Test")
    plot = win.get_plot()
    plot.add_item(map_)
    win.show()
    return win
Пример #3
0
def graphical_inspection_map():
    map_ = create_test_map()

    from guiqwt.plot import ImageWindow
    win = ImageWindow(wintitle="Test")
    plot = win.get_plot()
    plot.add_item(map_)
    win.show()
    return win
Пример #4
0
def graphical_inspection_image():
    s = ScanningParam()
    a = AxisParam()
    a.length = 5
    a.increment = 0.5
    a.start = -1.5
    a.unit = 'nm'
    s.axis1 = a
    s.axis2 = a
    data = np.random.rand(5, 5)
    m = Measurement(data, s)
    image = ThothImageItem(m)

    from guiqwt.plot import ImageWindow
    win = ImageWindow(wintitle="Test")
    plot = win.get_plot()
    plot.add_item(image)
    win.show()
    return win
Пример #5
0
def graphical_inspection_image():
    s = ScanningParam()
    a = AxisParam()
    a.length = 5
    a.increment = 0.5
    a.start = -1.5
    a.unit = 'nm'
    s.axis1 = a
    s.axis2 = a
    data = np.random.rand(5,5)
    m = Measurement(data,s)
    image = ThothImageItem(m)

    from guiqwt.plot import ImageWindow
    win = ImageWindow(wintitle="Test")
    plot = win.get_plot()
    plot.add_item(image)
    win.show()
    return win
Пример #6
0
 def _create_image_window(self, item):
     window = ImageWindow(wintitle=item.measurement.param.filename,
                          icon="image.png", toolbar=True)
     compute_menu = window.menuBar().addMenu(_("&Compute"))
     compute_actions = []
     compute_actions.append(create_action(self, _("&Line correction"),
                       triggered=item.compute_line_detrend,
                       tip=_("Apply a linewise slope correction.")))
     compute_actions.append(create_action(self, _("&Fourier transform"),
                       triggered=item.compute_fft,
                       tip=_("Compute the Fourier transfom of the curve.")))
     compute_actions.append(create_action(self, _("&Inverse Fourier transfom"),
                       triggered=item.compute_ifft,
                       tip=_("Compute the inverse Fourier transfom of the curve.")))
     compute_actions.append(create_action(self, _("&Apply Wiener filter"),
                       triggered=item.compute_wiener,
                       tip=_("Smooth the curve with a Wiener filter.")))
     compute_actions.append(create_action(self, _("&Apply Gauss filter"),
                       triggered=item.compute_gaussian,
                       tip=_("Smooth the curve with a Gaussian filter.")))
     compute_actions.append(create_action(self, _("&Apply Savitzky-Golay"),
                       triggered=item.compute_savitzky,
                       tip=_("Compute a smoothig or a derivative of the curve according to Savitzky-Golay algorithm.")))
     compute_actions.append(create_action(self, _("&Zeroes"),
                       triggered=item.compute_zeroes,
                       tip=_("Set the minimum of the data to zero.")))
     add_actions(compute_menu, compute_actions)
     plot = window.get_plot()
     xunit = item.measurement.param.axis1.unit
     yunit = item.measurement.param.axis2.unit
     zunit = item.measurement.param.unit
     plot.set_titles(title=None, xlabel=None, ylabel=None,
                     xunit=xunit, yunit=(yunit,zunit))
     plot.set_axis_direction('left', False)
     plot.add_item(item)
     return window