Esempio n. 1
0
    def __init__(self, parent=None):
        super().__init__(parent)

        self._instruments = InstrumentController()
        self._threadPool = QThreadPool()

        self._vcoCharMeasurement = VCOCharMeasurement()

        self._offset = 0.0
        self._offsetF1 = 0.0
        self._offsetF2 = 0.0
        self._offsetF3 = 0.0
        self._offsetF4 = 0.0
        self._offsetF5 = 0.0
        self._freqOffset = 0.0
        self._ampOffset = 0.0
        self._curOffset = 0.0
        self._markerOffsets = [[0.0] * 5] * 5
        self._markerOffset = self._markerOffsets[0]
        self._deltaFs = [0.0] * 6

        self._freqs = list()
        self._raw_amps = list()
        self._amps = list()
        self._smoothAmps = list()

        self._freq = 0.0
        self._amp = 0.0
        self._cur = 0.0

        self._loadParams()
Esempio n. 2
0
    def __init__(self, parent=None):
        super().__init__(parent)

        self.setAttribute(Qt.WA_QuitOnClose)
        self.setAttribute(Qt.WA_DeleteOnClose)

        # create instance variables
        self._ui = uic.loadUi('mainwindow.ui', self)
        self._instrumentController = InstrumentController(parent=self)
        self._connectionWidget = ConnectionWidget(
            parent=self, controller=self._instrumentController)
        self._measureWidget = MeasureWidgetWithSecondaryParameters(
            parent=self, controller=self._instrumentController)
        self._measureModel = MeasureModel(
            parent=self, controller=self._instrumentController)
        self._plotWidget = PrimaryPlotWidget(
            parent=self, result=self._instrumentController.result)
        self._statWidget = StatWidget(parent=self,
                                      result=self._instrumentController.result)

        # init UI
        self._ui.layInstrs.insertWidget(0, self._connectionWidget)
        self._ui.layInstrs.insertWidget(1, self._measureWidget)
        self._ui.layInstrs.insertWidget(2, self._statWidget, 10)

        self._ui.tabWidget.insertTab(0, self._plotWidget,
                                     'Автоматическое измерение')

        self._init()
Esempio n. 3
0
    def __init__(self, parent=None):
        super().__init__(parent)

        self.setAttribute(Qt.WA_QuitOnClose)
        self.setAttribute(Qt.WA_DeleteOnClose)

        # create instance variables
        self._ui = uic.loadUi('mainwindow.ui', self)
        self._instrumentController = InstrumentController(parent=self)
        self._connectionWidget = ConnectionWidget(parent=self, controller=self._instrumentController)
        self._measureWidget = MeasureWidgetWithSecondaryParameters(parent=self, controller=self._instrumentController)
        self._measureModel = MeasureModel(parent=self, controller=self._instrumentController)

        # init UI
        self._ui.layInstrs.insertWidget(0, self._connectionWidget)
        self._ui.layInstrs.insertWidget(1, self._measureWidget)

        self._init()
Esempio n. 4
0
    def __init__(self, parent=None):
        super().__init__(parent)

        self.setAttribute(Qt.WA_QuitOnClose)
        self.setAttribute(Qt.WA_DeleteOnClose)

        # create instance variables
        self._ui = uic.loadUi('mainwindow.ui', self)
        self._instrumentController = InstrumentController(parent=self)
        self._connectionWidget = ConnectionWidget(
            parent=self, controller=self._instrumentController)
        self._measureWidget = MeasureWidgetWithSecondaryParameters(
            parent=self, controller=self._instrumentController)
        self._measureModel = MeasureModel(
            parent=self, controller=self._instrumentController)
        self._sParamPlotWidget = SParamPlotWidget(
            parent=self, result=self._instrumentController.result)
        self._psmPlotWidget = PsmPlotWidget(
            parent=self, result=self._instrumentController.result)
        self._attPlotWidget = AttPlotWidget(
            parent=self, result=self._instrumentController.result)
        self._rmsePlotWidget = ErrorPlotWidget(
            parent=self, result=self._instrumentController.result)

        self._statWidget = StatWidget(parent=self,
                                      result=self._instrumentController.result)

        # init UI
        self._ui.layInstrs.insertWidget(0, self._connectionWidget)
        self._ui.layInstrs.insertWidget(1, self._measureWidget)
        self._ui.layInstrs.insertWidget(2, self._statWidget, 10)

        self._ui.tabWidget.insertTab(0, self._sParamPlotWidget, 'S-параметры')
        self._ui.tabWidget.insertTab(1, self._psmPlotWidget,
                                     'Отклик фазовращателя')
        self._ui.tabWidget.insertTab(2, self._attPlotWidget,
                                     'Отклик аттенюатора')
        self._ui.tabWidget.insertTab(3, self._rmsePlotWidget,
                                     'Амп. и фаз. ошибки')
        self._init()
Esempio n. 5
0
    def __init__(self, parent=None):
        super().__init__(parent)

        self.setAttribute(Qt.WA_QuitOnClose)
        self.setAttribute(Qt.WA_DeleteOnClose)

        # create instance variables
        self._ui = uic.loadUi('mainwindow.ui', self)
        self._instrumentController = InstrumentController(parent=self)
        self._connectionWidget = ConnectionWidget(parent=self, controller=self._instrumentController)
        self._measureWidget = MeasureWidgetWithSecondaryParameters(parent=self, controller=self._instrumentController)
        self._powSweepWidget = make_sweep_widget('pow', parent=self, controller=self._instrumentController)
        self._freqSweepWidget = make_sweep_widget('freq', parent=self, controller=self._instrumentController)

        self._measureModel = MeasureModel(parent=self, controller=self._instrumentController)

        # init UI
        self._ui.layInstrs.insertWidget(0, self._connectionWidget)
        self._ui.layInstrs.insertWidget(1, self._measureWidget)
        self._ui.tabWidget.insertTab(0, self._powSweepWidget, 'По мощности')
        self._ui.tabWidget.insertTab(1, self._freqSweepWidget, 'По частоте')
        self._ui.tabWidget.setCurrentIndex(0)

        self._init()