示例#1
0
 def createWidget(self, parent):
     from silx.gui.plot.ComplexImageView import ComplexImageView
     widget = ComplexImageView(parent=parent)
     widget.getPlot().setKeepDataAspectRatio(True)
     widget.getXAxis().setLabel('X')
     widget.getYAxis().setLabel('Y')
     return widget
示例#2
0
文件: DataViews.py 项目: fangohr/silx
 def createWidget(self, parent):
     from silx.gui.plot.ComplexImageView import ComplexImageView
     widget = ComplexImageView(parent=parent)
     widget.setColormap(self.defaultColormap(), mode=ComplexImageView.Mode.ABSOLUTE)
     widget.setColormap(self.defaultColormap(), mode=ComplexImageView.Mode.SQUARE_AMPLITUDE)
     widget.setColormap(self.defaultColormap(), mode=ComplexImageView.Mode.REAL)
     widget.setColormap(self.defaultColormap(), mode=ComplexImageView.Mode.IMAGINARY)
     widget.getPlot().getColormapAction().setColorDialog(self.defaultColorDialog())
     widget.getPlot().getIntensityHistogramAction().setVisible(True)
     widget.getPlot().setKeepDataAspectRatio(True)
     widget.getXAxis().setLabel('X')
     widget.getYAxis().setLabel('Y')
     return widget
示例#3
0
    def __init__(self, parent=None, colormap=None):
        """

        :param parent: Parent QWidget
        """
        super(ArrayComplexImagePlot, self).__init__(parent)

        self.__signals = None
        self.__signals_names = None
        self.__x_axis = None
        self.__x_axis_name = None
        self.__y_axis = None
        self.__y_axis_name = None

        self._plot = ComplexImageView(self)
        if colormap is not None:
            for mode in (ComplexImageView.ComplexMode.ABSOLUTE,
                         ComplexImageView.ComplexMode.SQUARE_AMPLITUDE,
                         ComplexImageView.ComplexMode.REAL,
                         ComplexImageView.ComplexMode.IMAGINARY):
                self._plot.setColormap(colormap, mode)

        self._plot.getPlot().getIntensityHistogramAction().setVisible(True)
        self._plot.setKeepDataAspectRatio(True)
        maskToolWidget = self._plot.getPlot().getMaskToolsDockWidget().widget()
        maskToolWidget.setItemMaskUpdated(True)

        # not closable
        self._selector = NumpyAxesSelector(self)
        self._selector.setNamedAxesSelectorVisibility(False)
        self._selector.selectionChanged.connect(self._updateImage)

        self._auxSigSlider = HorizontalSliderWithBrowser(parent=self)
        self._auxSigSlider.setMinimum(0)
        self._auxSigSlider.setValue(0)
        self._auxSigSlider.valueChanged[int].connect(self._sliderIdxChanged)
        self._auxSigSlider.setToolTip("Select auxiliary signals")

        layout = qt.QVBoxLayout()
        layout.addWidget(self._plot)
        layout.addWidget(self._selector)
        layout.addWidget(self._auxSigSlider)

        self.setLayout(layout)