kopia lustrzana https://github.com/NanoVNA-Saver/nanovna-saver
				
				
				
			Merge branch 'Development' of github.com:NanoVNA-Saver/nanovna-saver into Development
						commit
						6f6255bf05
					
				| 
						 | 
					@ -192,6 +192,8 @@ class NanoVNASaver(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.charts_layout = QtWidgets.QGridLayout()
 | 
					        self.charts_layout = QtWidgets.QGridLayout()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        QtWidgets.QShortcut(QtGui.QKeySequence("Ctrl+Q"), self, self.close)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ###############################################################
 | 
					        ###############################################################
 | 
				
			||||||
        #  Create main layout
 | 
					        #  Create main layout
 | 
				
			||||||
        ###############################################################
 | 
					        ###############################################################
 | 
				
			||||||
| 
						 | 
					@ -301,7 +303,7 @@ class NanoVNASaver(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.windows["analysis"] = AnalysisWindow(self)
 | 
					        self.windows["analysis"] = AnalysisWindow(self)
 | 
				
			||||||
        btn_show_analysis = QtWidgets.QPushButton("Analysis ...")
 | 
					        btn_show_analysis = QtWidgets.QPushButton("Analysis ...")
 | 
				
			||||||
        btn_show_analysis.setFixedHeight(20)
 | 
					        btn_show_analysis.setMinimumHeight(20)
 | 
				
			||||||
        btn_show_analysis.clicked.connect(
 | 
					        btn_show_analysis.clicked.connect(
 | 
				
			||||||
            lambda: self.display_window("analysis"))
 | 
					            lambda: self.display_window("analysis"))
 | 
				
			||||||
        self.marker_column.addWidget(btn_show_analysis)
 | 
					        self.marker_column.addWidget(btn_show_analysis)
 | 
				
			||||||
| 
						 | 
					@ -322,13 +324,13 @@ class NanoVNASaver(QtWidgets.QWidget):
 | 
				
			||||||
        tdr_control_box.setMaximumWidth(240)
 | 
					        tdr_control_box.setMaximumWidth(240)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.tdr_result_label = QtWidgets.QLabel()
 | 
					        self.tdr_result_label = QtWidgets.QLabel()
 | 
				
			||||||
        self.tdr_result_label.setFixedHeight(20)
 | 
					        self.tdr_result_label.setMinimumHeight(20)
 | 
				
			||||||
        tdr_control_layout.addRow(
 | 
					        tdr_control_layout.addRow(
 | 
				
			||||||
            "Estimated cable length:", self.tdr_result_label)
 | 
					            "Estimated cable length:", self.tdr_result_label)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.tdr_button = QtWidgets.QPushButton(
 | 
					        self.tdr_button = QtWidgets.QPushButton(
 | 
				
			||||||
            "Time Domain Reflectometry ...")
 | 
					            "Time Domain Reflectometry ...")
 | 
				
			||||||
        self.tdr_button.setFixedHeight(20)
 | 
					        self.tdr_button.setMinimumHeight(20)
 | 
				
			||||||
        self.tdr_button.clicked.connect(lambda: self.display_window("tdr"))
 | 
					        self.tdr_button.clicked.connect(lambda: self.display_window("tdr"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        tdr_control_layout.addRow(self.tdr_button)
 | 
					        tdr_control_layout.addRow(self.tdr_button)
 | 
				
			||||||
| 
						 | 
					@ -353,10 +355,10 @@ class NanoVNASaver(QtWidgets.QWidget):
 | 
				
			||||||
        reference_control_layout = QtWidgets.QFormLayout(reference_control_box)
 | 
					        reference_control_layout = QtWidgets.QFormLayout(reference_control_box)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btn_set_reference = QtWidgets.QPushButton("Set current as reference")
 | 
					        btn_set_reference = QtWidgets.QPushButton("Set current as reference")
 | 
				
			||||||
        btn_set_reference.setFixedHeight(20)
 | 
					        btn_set_reference.setMinimumHeight(20)
 | 
				
			||||||
        btn_set_reference.clicked.connect(self.setReference)
 | 
					        btn_set_reference.clicked.connect(self.setReference)
 | 
				
			||||||
        self.btnResetReference = QtWidgets.QPushButton("Reset reference")
 | 
					        self.btnResetReference = QtWidgets.QPushButton("Reset reference")
 | 
				
			||||||
        self.btnResetReference.setFixedHeight(20)
 | 
					        self.btnResetReference.setMinimumHeight(20)
 | 
				
			||||||
        self.btnResetReference.clicked.connect(self.resetReference)
 | 
					        self.btnResetReference.clicked.connect(self.resetReference)
 | 
				
			||||||
        self.btnResetReference.setDisabled(True)
 | 
					        self.btnResetReference.setDisabled(True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -374,11 +376,11 @@ class NanoVNASaver(QtWidgets.QWidget):
 | 
				
			||||||
        serial_control_box.setTitle("Serial port control")
 | 
					        serial_control_box.setTitle("Serial port control")
 | 
				
			||||||
        serial_control_layout = QtWidgets.QFormLayout(serial_control_box)
 | 
					        serial_control_layout = QtWidgets.QFormLayout(serial_control_box)
 | 
				
			||||||
        self.serialPortInput = QtWidgets.QComboBox()
 | 
					        self.serialPortInput = QtWidgets.QComboBox()
 | 
				
			||||||
        self.serialPortInput.setFixedHeight(20)
 | 
					        self.serialPortInput.setMinimumHeight(20)
 | 
				
			||||||
        self.rescanSerialPort()
 | 
					        self.rescanSerialPort()
 | 
				
			||||||
        self.serialPortInput.setEditable(True)
 | 
					        self.serialPortInput.setEditable(True)
 | 
				
			||||||
        btn_rescan_serial_port = QtWidgets.QPushButton("Rescan")
 | 
					        btn_rescan_serial_port = QtWidgets.QPushButton("Rescan")
 | 
				
			||||||
        btn_rescan_serial_port.setFixedHeight(20)
 | 
					        btn_rescan_serial_port.setMinimumHeight(20)
 | 
				
			||||||
        btn_rescan_serial_port.setFixedWidth(60)
 | 
					        btn_rescan_serial_port.setFixedWidth(60)
 | 
				
			||||||
        btn_rescan_serial_port.clicked.connect(self.rescanSerialPort)
 | 
					        btn_rescan_serial_port.clicked.connect(self.rescanSerialPort)
 | 
				
			||||||
        serial_port_input_layout = QtWidgets.QHBoxLayout()
 | 
					        serial_port_input_layout = QtWidgets.QHBoxLayout()
 | 
				
			||||||
| 
						 | 
					@ -390,12 +392,12 @@ class NanoVNASaver(QtWidgets.QWidget):
 | 
				
			||||||
        serial_button_layout = QtWidgets.QHBoxLayout()
 | 
					        serial_button_layout = QtWidgets.QHBoxLayout()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btnSerialToggle = QtWidgets.QPushButton("Connect to device")
 | 
					        self.btnSerialToggle = QtWidgets.QPushButton("Connect to device")
 | 
				
			||||||
        self.btnSerialToggle.setFixedHeight(20)
 | 
					        self.btnSerialToggle.setMinimumHeight(20)
 | 
				
			||||||
        self.btnSerialToggle.clicked.connect(self.serialButtonClick)
 | 
					        self.btnSerialToggle.clicked.connect(self.serialButtonClick)
 | 
				
			||||||
        serial_button_layout.addWidget(self.btnSerialToggle, stretch=1)
 | 
					        serial_button_layout.addWidget(self.btnSerialToggle, stretch=1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btnDeviceSettings = QtWidgets.QPushButton("Manage")
 | 
					        self.btnDeviceSettings = QtWidgets.QPushButton("Manage")
 | 
				
			||||||
        self.btnDeviceSettings.setFixedHeight(20)
 | 
					        self.btnDeviceSettings.setMinimumHeight(20)
 | 
				
			||||||
        self.btnDeviceSettings.setFixedWidth(60)
 | 
					        self.btnDeviceSettings.setFixedWidth(60)
 | 
				
			||||||
        self.btnDeviceSettings.clicked.connect(
 | 
					        self.btnDeviceSettings.clicked.connect(
 | 
				
			||||||
            lambda: self.display_window("device_settings"))
 | 
					            lambda: self.display_window("device_settings"))
 | 
				
			||||||
| 
						 | 
					@ -408,7 +410,7 @@ class NanoVNASaver(QtWidgets.QWidget):
 | 
				
			||||||
        ###############################################################
 | 
					        ###############################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btnOpenCalibrationWindow = QtWidgets.QPushButton("Calibration ...")
 | 
					        btnOpenCalibrationWindow = QtWidgets.QPushButton("Calibration ...")
 | 
				
			||||||
        btnOpenCalibrationWindow.setFixedHeight(20)
 | 
					        btnOpenCalibrationWindow.setMinimumHeight(20)
 | 
				
			||||||
        self.calibrationWindow = CalibrationWindow(self)
 | 
					        self.calibrationWindow = CalibrationWindow(self)
 | 
				
			||||||
        btnOpenCalibrationWindow.clicked.connect(
 | 
					        btnOpenCalibrationWindow.clicked.connect(
 | 
				
			||||||
            lambda: self.display_window("calibration"))
 | 
					            lambda: self.display_window("calibration"))
 | 
				
			||||||
| 
						 | 
					@ -418,13 +420,13 @@ class NanoVNASaver(QtWidgets.QWidget):
 | 
				
			||||||
        ###############################################################
 | 
					        ###############################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btn_display_setup = QtWidgets.QPushButton("Display setup ...")
 | 
					        btn_display_setup = QtWidgets.QPushButton("Display setup ...")
 | 
				
			||||||
        btn_display_setup.setFixedHeight(20)
 | 
					        btn_display_setup.setMinimumHeight(20)
 | 
				
			||||||
        btn_display_setup.setMaximumWidth(240)
 | 
					        btn_display_setup.setMaximumWidth(240)
 | 
				
			||||||
        btn_display_setup.clicked.connect(
 | 
					        btn_display_setup.clicked.connect(
 | 
				
			||||||
            lambda: self.display_window("setup"))
 | 
					            lambda: self.display_window("setup"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btn_about = QtWidgets.QPushButton("About ...")
 | 
					        btn_about = QtWidgets.QPushButton("About ...")
 | 
				
			||||||
        btn_about.setFixedHeight(20)
 | 
					        btn_about.setMinimumHeight(20)
 | 
				
			||||||
        btn_about.setMaximumWidth(240)
 | 
					        btn_about.setMaximumWidth(240)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btn_about.clicked.connect(
 | 
					        btn_about.clicked.connect(
 | 
				
			||||||
| 
						 | 
					@ -432,7 +434,7 @@ class NanoVNASaver(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btn_open_file_window = QtWidgets.QPushButton("Files")
 | 
					        btn_open_file_window = QtWidgets.QPushButton("Files")
 | 
				
			||||||
        btn_open_file_window.setFixedHeight(20)
 | 
					        btn_open_file_window.setMinimumHeight(20)
 | 
				
			||||||
        btn_open_file_window.setMaximumWidth(240)
 | 
					        btn_open_file_window.setMaximumWidth(240)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btn_open_file_window.clicked.connect(
 | 
					        btn_open_file_window.clicked.connect(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -71,11 +71,13 @@ class CalibrationWindow(QtWidgets.QWidget):
 | 
				
			||||||
            self.cal_label[label_name] = QtWidgets.QLabel("Uncalibrated")
 | 
					            self.cal_label[label_name] = QtWidgets.QLabel("Uncalibrated")
 | 
				
			||||||
            cal_btn[label_name] = QtWidgets.QPushButton(
 | 
					            cal_btn[label_name] = QtWidgets.QPushButton(
 | 
				
			||||||
                label_name.capitalize())
 | 
					                label_name.capitalize())
 | 
				
			||||||
 | 
					            cal_btn[label_name].setMinimumHeight(20)
 | 
				
			||||||
            cal_btn[label_name].clicked.connect(partial(self.manual_save, label_name))
 | 
					            cal_btn[label_name].clicked.connect(partial(self.manual_save, label_name))
 | 
				
			||||||
            calibration_control_layout.addRow(
 | 
					            calibration_control_layout.addRow(
 | 
				
			||||||
                cal_btn[label_name], self.cal_label[label_name])
 | 
					                cal_btn[label_name], self.cal_label[label_name])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.input_offset_delay = QtWidgets.QDoubleSpinBox()
 | 
					        self.input_offset_delay = QtWidgets.QDoubleSpinBox()
 | 
				
			||||||
 | 
					        self.input_offset_delay.setMinimumHeight(20)
 | 
				
			||||||
        self.input_offset_delay.setValue(0)
 | 
					        self.input_offset_delay.setValue(0)
 | 
				
			||||||
        self.input_offset_delay.setSuffix(" ps")
 | 
					        self.input_offset_delay.setSuffix(" ps")
 | 
				
			||||||
        self.input_offset_delay.setAlignment(QtCore.Qt.AlignRight)
 | 
					        self.input_offset_delay.setAlignment(QtCore.Qt.AlignRight)
 | 
				
			||||||
| 
						 | 
					@ -86,15 +88,18 @@ class CalibrationWindow(QtWidgets.QWidget):
 | 
				
			||||||
        calibration_control_layout.addRow("Offset delay", self.input_offset_delay)
 | 
					        calibration_control_layout.addRow("Offset delay", self.input_offset_delay)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btn_automatic = QtWidgets.QPushButton("Calibration assistant")
 | 
					        self.btn_automatic = QtWidgets.QPushButton("Calibration assistant")
 | 
				
			||||||
 | 
					        self.btn_automatic.setMinimumHeight(20)
 | 
				
			||||||
        calibration_control_layout.addRow(self.btn_automatic)
 | 
					        calibration_control_layout.addRow(self.btn_automatic)
 | 
				
			||||||
        self.btn_automatic.clicked.connect(self.automaticCalibration)
 | 
					        self.btn_automatic.clicked.connect(self.automaticCalibration)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        apply_reset_layout = QtWidgets.QHBoxLayout()
 | 
					        apply_reset_layout = QtWidgets.QHBoxLayout()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btn_apply = QtWidgets.QPushButton("Apply")
 | 
					        btn_apply = QtWidgets.QPushButton("Apply")
 | 
				
			||||||
 | 
					        btn_apply.setMinimumHeight(20)
 | 
				
			||||||
        btn_apply.clicked.connect(self.calculate)
 | 
					        btn_apply.clicked.connect(self.calculate)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btn_reset = QtWidgets.QPushButton("Reset")
 | 
					        btn_reset = QtWidgets.QPushButton("Reset")
 | 
				
			||||||
 | 
					        btn_reset.setMinimumHeight(20)
 | 
				
			||||||
        btn_reset.clicked.connect(self.reset)
 | 
					        btn_reset.clicked.connect(self.reset)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        apply_reset_layout.addWidget(btn_apply)
 | 
					        apply_reset_layout.addWidget(btn_apply)
 | 
				
			||||||
| 
						 | 
					@ -114,8 +119,10 @@ class CalibrationWindow(QtWidgets.QWidget):
 | 
				
			||||||
        file_box = QtWidgets.QGroupBox("Files")
 | 
					        file_box = QtWidgets.QGroupBox("Files")
 | 
				
			||||||
        file_layout = QtWidgets.QFormLayout(file_box)
 | 
					        file_layout = QtWidgets.QFormLayout(file_box)
 | 
				
			||||||
        btn_save_file = QtWidgets.QPushButton("Save calibration")
 | 
					        btn_save_file = QtWidgets.QPushButton("Save calibration")
 | 
				
			||||||
 | 
					        btn_save_file.setMinimumHeight(20)
 | 
				
			||||||
        btn_save_file.clicked.connect(lambda: self.saveCalibration())
 | 
					        btn_save_file.clicked.connect(lambda: self.saveCalibration())
 | 
				
			||||||
        btn_load_file = QtWidgets.QPushButton("Load calibration")
 | 
					        btn_load_file = QtWidgets.QPushButton("Load calibration")
 | 
				
			||||||
 | 
					        btn_load_file.setMinimumHeight(20)
 | 
				
			||||||
        btn_load_file.clicked.connect(lambda: self.loadCalibration())
 | 
					        btn_load_file.clicked.connect(lambda: self.loadCalibration())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        save_load_layout = QtWidgets.QHBoxLayout()
 | 
					        save_load_layout = QtWidgets.QHBoxLayout()
 | 
				
			||||||
| 
						 | 
					@ -137,10 +144,15 @@ class CalibrationWindow(QtWidgets.QWidget):
 | 
				
			||||||
        cal_short_form = QtWidgets.QFormLayout(self.cal_short_box)
 | 
					        cal_short_form = QtWidgets.QFormLayout(self.cal_short_box)
 | 
				
			||||||
        self.cal_short_box.setDisabled(True)
 | 
					        self.cal_short_box.setDisabled(True)
 | 
				
			||||||
        self.short_l0_input = QtWidgets.QLineEdit("0")
 | 
					        self.short_l0_input = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        self.short_l0_input.setMinimumHeight(20)
 | 
				
			||||||
        self.short_l1_input = QtWidgets.QLineEdit("0")
 | 
					        self.short_l1_input = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        self.short_l1_input.setMinimumHeight(20)
 | 
				
			||||||
        self.short_l2_input = QtWidgets.QLineEdit("0")
 | 
					        self.short_l2_input = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        self.short_l2_input.setMinimumHeight(20)
 | 
				
			||||||
        self.short_l3_input = QtWidgets.QLineEdit("0")
 | 
					        self.short_l3_input = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        self.short_l3_input.setMinimumHeight(20)
 | 
				
			||||||
        self.short_length = QtWidgets.QLineEdit("0")
 | 
					        self.short_length = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        self.short_length.setMinimumHeight(20)
 | 
				
			||||||
        cal_short_form.addRow("L0 (H(e-12))", self.short_l0_input)
 | 
					        cal_short_form.addRow("L0 (H(e-12))", self.short_l0_input)
 | 
				
			||||||
        cal_short_form.addRow("L1 (H(e-24))", self.short_l1_input)
 | 
					        cal_short_form.addRow("L1 (H(e-24))", self.short_l1_input)
 | 
				
			||||||
        cal_short_form.addRow("L2 (H(e-33))", self.short_l2_input)
 | 
					        cal_short_form.addRow("L2 (H(e-33))", self.short_l2_input)
 | 
				
			||||||
| 
						 | 
					@ -151,10 +163,15 @@ class CalibrationWindow(QtWidgets.QWidget):
 | 
				
			||||||
        cal_open_form = QtWidgets.QFormLayout(self.cal_open_box)
 | 
					        cal_open_form = QtWidgets.QFormLayout(self.cal_open_box)
 | 
				
			||||||
        self.cal_open_box.setDisabled(True)
 | 
					        self.cal_open_box.setDisabled(True)
 | 
				
			||||||
        self.open_c0_input = QtWidgets.QLineEdit("50")
 | 
					        self.open_c0_input = QtWidgets.QLineEdit("50")
 | 
				
			||||||
 | 
					        self.open_c0_input.setMinimumHeight(20)
 | 
				
			||||||
        self.open_c1_input = QtWidgets.QLineEdit("0")
 | 
					        self.open_c1_input = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        self.open_c1_input.setMinimumHeight(20)
 | 
				
			||||||
        self.open_c2_input = QtWidgets.QLineEdit("0")
 | 
					        self.open_c2_input = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        self.open_c2_input.setMinimumHeight(20)
 | 
				
			||||||
        self.open_c3_input = QtWidgets.QLineEdit("0")
 | 
					        self.open_c3_input = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        self.open_c3_input.setMinimumHeight(20)
 | 
				
			||||||
        self.open_length = QtWidgets.QLineEdit("0")
 | 
					        self.open_length = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        self.open_length.setMinimumHeight(20)
 | 
				
			||||||
        cal_open_form.addRow("C0 (F(e-15))", self.open_c0_input)
 | 
					        cal_open_form.addRow("C0 (F(e-15))", self.open_c0_input)
 | 
				
			||||||
        cal_open_form.addRow("C1 (F(e-27))", self.open_c1_input)
 | 
					        cal_open_form.addRow("C1 (F(e-27))", self.open_c1_input)
 | 
				
			||||||
        cal_open_form.addRow("C2 (F(e-36))", self.open_c2_input)
 | 
					        cal_open_form.addRow("C2 (F(e-36))", self.open_c2_input)
 | 
				
			||||||
| 
						 | 
					@ -165,10 +182,14 @@ class CalibrationWindow(QtWidgets.QWidget):
 | 
				
			||||||
        cal_load_form = QtWidgets.QFormLayout(self.cal_load_box)
 | 
					        cal_load_form = QtWidgets.QFormLayout(self.cal_load_box)
 | 
				
			||||||
        self.cal_load_box.setDisabled(True)
 | 
					        self.cal_load_box.setDisabled(True)
 | 
				
			||||||
        self.load_resistance = QtWidgets.QLineEdit("50")
 | 
					        self.load_resistance = QtWidgets.QLineEdit("50")
 | 
				
			||||||
 | 
					        self.load_resistance.setMinimumHeight(20)
 | 
				
			||||||
        self.load_inductance = QtWidgets.QLineEdit("0")
 | 
					        self.load_inductance = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        self.load_inductance.setMinimumHeight(20)
 | 
				
			||||||
        # self.load_capacitance = QtWidgets.QLineEdit("0")
 | 
					        # self.load_capacitance = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        # self.load_capacitance.setMinimumHeight(20)
 | 
				
			||||||
        # self.load_capacitance.setDisabled(True)  # Not yet implemented
 | 
					        # self.load_capacitance.setDisabled(True)  # Not yet implemented
 | 
				
			||||||
        self.load_length = QtWidgets.QLineEdit("0")
 | 
					        self.load_length = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        self.load_length.setMinimumHeight(20)
 | 
				
			||||||
        cal_load_form.addRow("Resistance (\N{OHM SIGN})", self.load_resistance)
 | 
					        cal_load_form.addRow("Resistance (\N{OHM SIGN})", self.load_resistance)
 | 
				
			||||||
        cal_load_form.addRow("Inductance (H(e-12))", self.load_inductance)
 | 
					        cal_load_form.addRow("Inductance (H(e-12))", self.load_inductance)
 | 
				
			||||||
        # cal_load_form.addRow("Capacitance (F(e-12))", self.load_capacitance)
 | 
					        # cal_load_form.addRow("Capacitance (F(e-12))", self.load_capacitance)
 | 
				
			||||||
| 
						 | 
					@ -178,6 +199,7 @@ class CalibrationWindow(QtWidgets.QWidget):
 | 
				
			||||||
        cal_through_form = QtWidgets.QFormLayout(self.cal_through_box)
 | 
					        cal_through_form = QtWidgets.QFormLayout(self.cal_through_box)
 | 
				
			||||||
        self.cal_through_box.setDisabled(True)
 | 
					        self.cal_through_box.setDisabled(True)
 | 
				
			||||||
        self.through_length = QtWidgets.QLineEdit("0")
 | 
					        self.through_length = QtWidgets.QLineEdit("0")
 | 
				
			||||||
 | 
					        self.through_length.setMinimumHeight(20)
 | 
				
			||||||
        cal_through_form.addRow("Offset Delay (ps)", self.through_length)
 | 
					        cal_through_form.addRow("Offset Delay (ps)", self.through_length)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        cal_standard_layout.addWidget(self.cal_short_box)
 | 
					        cal_standard_layout.addWidget(self.cal_short_box)
 | 
				
			||||||
| 
						 | 
					@ -190,14 +212,18 @@ class CalibrationWindow(QtWidgets.QWidget):
 | 
				
			||||||
        self.cal_standard_save_box.setDisabled(True)
 | 
					        self.cal_standard_save_box.setDisabled(True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.cal_standard_save_selector = QtWidgets.QComboBox()
 | 
					        self.cal_standard_save_selector = QtWidgets.QComboBox()
 | 
				
			||||||
 | 
					        self.cal_standard_save_selector.setMinimumHeight(20)
 | 
				
			||||||
        self.listCalibrationStandards()
 | 
					        self.listCalibrationStandards()
 | 
				
			||||||
        cal_standard_save_layout.addWidget(self.cal_standard_save_selector)
 | 
					        cal_standard_save_layout.addWidget(self.cal_standard_save_selector)
 | 
				
			||||||
        cal_standard_save_button_layout = QtWidgets.QHBoxLayout()
 | 
					        cal_standard_save_button_layout = QtWidgets.QHBoxLayout()
 | 
				
			||||||
        btn_save_standard = QtWidgets.QPushButton("Save")
 | 
					        btn_save_standard = QtWidgets.QPushButton("Save")
 | 
				
			||||||
 | 
					        btn_save_standard.setMinimumHeight(20)
 | 
				
			||||||
        btn_save_standard.clicked.connect(self.saveCalibrationStandard)
 | 
					        btn_save_standard.clicked.connect(self.saveCalibrationStandard)
 | 
				
			||||||
        btn_load_standard = QtWidgets.QPushButton("Load")
 | 
					        btn_load_standard = QtWidgets.QPushButton("Load")
 | 
				
			||||||
 | 
					        btn_load_standard.setMinimumHeight(20)
 | 
				
			||||||
        btn_load_standard.clicked.connect(self.loadCalibrationStandard)
 | 
					        btn_load_standard.clicked.connect(self.loadCalibrationStandard)
 | 
				
			||||||
        btn_delete_standard = QtWidgets.QPushButton("Delete")
 | 
					        btn_delete_standard = QtWidgets.QPushButton("Delete")
 | 
				
			||||||
 | 
					        btn_delete_standard.setMinimumHeight(20)
 | 
				
			||||||
        btn_delete_standard.clicked.connect(self.deleteCalibrationStandard)
 | 
					        btn_delete_standard.clicked.connect(self.deleteCalibrationStandard)
 | 
				
			||||||
        cal_standard_save_button_layout.addWidget(btn_load_standard)
 | 
					        cal_standard_save_button_layout.addWidget(btn_load_standard)
 | 
				
			||||||
        cal_standard_save_button_layout.addWidget(btn_save_standard)
 | 
					        cal_standard_save_button_layout.addWidget(btn_save_standard)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -77,6 +77,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btnColorPicker = QtWidgets.QPushButton("█")
 | 
					        self.btnColorPicker = QtWidgets.QPushButton("█")
 | 
				
			||||||
        self.btnColorPicker.setFixedWidth(20)
 | 
					        self.btnColorPicker.setFixedWidth(20)
 | 
				
			||||||
 | 
					        self.btnColorPicker.setMinimumHeight(20)
 | 
				
			||||||
        self.sweepColor = self.app.settings.value(
 | 
					        self.sweepColor = self.app.settings.value(
 | 
				
			||||||
            "SweepColor", defaultValue=QtGui.QColor(160, 140, 20, 128),
 | 
					            "SweepColor", defaultValue=QtGui.QColor(160, 140, 20, 128),
 | 
				
			||||||
            type=QtGui.QColor)
 | 
					            type=QtGui.QColor)
 | 
				
			||||||
| 
						 | 
					@ -89,6 +90,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btnSecondaryColorPicker = QtWidgets.QPushButton("█")
 | 
					        self.btnSecondaryColorPicker = QtWidgets.QPushButton("█")
 | 
				
			||||||
        self.btnSecondaryColorPicker.setFixedWidth(20)
 | 
					        self.btnSecondaryColorPicker.setFixedWidth(20)
 | 
				
			||||||
 | 
					        self.btnSecondaryColorPicker.setMinimumHeight(20)
 | 
				
			||||||
        self.secondarySweepColor = self.app.settings.value("SecondarySweepColor",
 | 
					        self.secondarySweepColor = self.app.settings.value("SecondarySweepColor",
 | 
				
			||||||
                                                           defaultValue=QtGui.QColor(
 | 
					                                                           defaultValue=QtGui.QColor(
 | 
				
			||||||
                                                               20, 160, 140, 128),
 | 
					                                                               20, 160, 140, 128),
 | 
				
			||||||
| 
						 | 
					@ -102,6 +104,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btnReferenceColorPicker = QtWidgets.QPushButton("█")
 | 
					        self.btnReferenceColorPicker = QtWidgets.QPushButton("█")
 | 
				
			||||||
        self.btnReferenceColorPicker.setFixedWidth(20)
 | 
					        self.btnReferenceColorPicker.setFixedWidth(20)
 | 
				
			||||||
 | 
					        self.btnReferenceColorPicker.setMinimumHeight(20)
 | 
				
			||||||
        self.referenceColor = self.app.settings.value(
 | 
					        self.referenceColor = self.app.settings.value(
 | 
				
			||||||
            "ReferenceColor", defaultValue=QtGui.QColor(0, 0, 255, 48),
 | 
					            "ReferenceColor", defaultValue=QtGui.QColor(0, 0, 255, 48),
 | 
				
			||||||
            type=QtGui.QColor)
 | 
					            type=QtGui.QColor)
 | 
				
			||||||
| 
						 | 
					@ -114,6 +117,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btnSecondaryReferenceColorPicker = QtWidgets.QPushButton("█")
 | 
					        self.btnSecondaryReferenceColorPicker = QtWidgets.QPushButton("█")
 | 
				
			||||||
        self.btnSecondaryReferenceColorPicker.setFixedWidth(20)
 | 
					        self.btnSecondaryReferenceColorPicker.setFixedWidth(20)
 | 
				
			||||||
 | 
					        self.btnSecondaryReferenceColorPicker.setMinimumHeight(20)
 | 
				
			||||||
        self.secondaryReferenceColor = self.app.settings.value(
 | 
					        self.secondaryReferenceColor = self.app.settings.value(
 | 
				
			||||||
            "SecondaryReferenceColor",
 | 
					            "SecondaryReferenceColor",
 | 
				
			||||||
            defaultValue=QtGui.QColor(0, 0, 255, 48),
 | 
					            defaultValue=QtGui.QColor(0, 0, 255, 48),
 | 
				
			||||||
| 
						 | 
					@ -130,6 +134,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
            self.btnSecondaryReferenceColorPicker)
 | 
					            self.btnSecondaryReferenceColorPicker)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.pointSizeInput = QtWidgets.QSpinBox()
 | 
					        self.pointSizeInput = QtWidgets.QSpinBox()
 | 
				
			||||||
 | 
					        self.pointSizeInput.setMinimumHeight(20)
 | 
				
			||||||
        pointsize = self.app.settings.value("PointSize", 2, int)
 | 
					        pointsize = self.app.settings.value("PointSize", 2, int)
 | 
				
			||||||
        self.pointSizeInput.setValue(pointsize)
 | 
					        self.pointSizeInput.setValue(pointsize)
 | 
				
			||||||
        self.changePointSize(pointsize)
 | 
					        self.changePointSize(pointsize)
 | 
				
			||||||
| 
						 | 
					@ -141,6 +146,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        display_options_layout.addRow("Point size", self.pointSizeInput)
 | 
					        display_options_layout.addRow("Point size", self.pointSizeInput)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.lineThicknessInput = QtWidgets.QSpinBox()
 | 
					        self.lineThicknessInput = QtWidgets.QSpinBox()
 | 
				
			||||||
 | 
					        self.lineThicknessInput.setMinimumHeight(20)
 | 
				
			||||||
        linethickness = self.app.settings.value("LineThickness", 1, int)
 | 
					        linethickness = self.app.settings.value("LineThickness", 1, int)
 | 
				
			||||||
        self.lineThicknessInput.setValue(linethickness)
 | 
					        self.lineThicknessInput.setValue(linethickness)
 | 
				
			||||||
        self.changeLineThickness(linethickness)
 | 
					        self.changeLineThickness(linethickness)
 | 
				
			||||||
| 
						 | 
					@ -152,6 +158,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        display_options_layout.addRow("Line thickness", self.lineThicknessInput)
 | 
					        display_options_layout.addRow("Line thickness", self.lineThicknessInput)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.markerSizeInput = QtWidgets.QSpinBox()
 | 
					        self.markerSizeInput = QtWidgets.QSpinBox()
 | 
				
			||||||
 | 
					        self.markerSizeInput.setMinimumHeight(20)
 | 
				
			||||||
        markersize = self.app.settings.value("MarkerSize", 6, int)
 | 
					        markersize = self.app.settings.value("MarkerSize", 6, int)
 | 
				
			||||||
        self.markerSizeInput.setValue(markersize)
 | 
					        self.markerSizeInput.setValue(markersize)
 | 
				
			||||||
        self.changeMarkerSize(markersize)
 | 
					        self.changeMarkerSize(markersize)
 | 
				
			||||||
| 
						 | 
					@ -200,6 +207,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btn_background_picker = QtWidgets.QPushButton("█")
 | 
					        self.btn_background_picker = QtWidgets.QPushButton("█")
 | 
				
			||||||
        self.btn_background_picker.setFixedWidth(20)
 | 
					        self.btn_background_picker.setFixedWidth(20)
 | 
				
			||||||
 | 
					        self.btn_background_picker.setMinimumHeight(20)
 | 
				
			||||||
        self.btn_background_picker.clicked.connect(
 | 
					        self.btn_background_picker.clicked.connect(
 | 
				
			||||||
            lambda: self.setColor(
 | 
					            lambda: self.setColor(
 | 
				
			||||||
                "background",
 | 
					                "background",
 | 
				
			||||||
| 
						 | 
					@ -212,6 +220,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btn_foreground_picker = QtWidgets.QPushButton("█")
 | 
					        self.btn_foreground_picker = QtWidgets.QPushButton("█")
 | 
				
			||||||
        self.btn_foreground_picker.setFixedWidth(20)
 | 
					        self.btn_foreground_picker.setFixedWidth(20)
 | 
				
			||||||
 | 
					        self.btn_foreground_picker.setMinimumHeight(20)
 | 
				
			||||||
        self.btn_foreground_picker.clicked.connect(
 | 
					        self.btn_foreground_picker.clicked.connect(
 | 
				
			||||||
            lambda: self.setColor(
 | 
					            lambda: self.setColor(
 | 
				
			||||||
                "foreground",
 | 
					                "foreground",
 | 
				
			||||||
| 
						 | 
					@ -223,6 +232,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btn_text_picker = QtWidgets.QPushButton("█")
 | 
					        self.btn_text_picker = QtWidgets.QPushButton("█")
 | 
				
			||||||
        self.btn_text_picker.setFixedWidth(20)
 | 
					        self.btn_text_picker.setFixedWidth(20)
 | 
				
			||||||
 | 
					        self.btn_text_picker.setMinimumHeight(20)
 | 
				
			||||||
        self.btn_text_picker.clicked.connect(
 | 
					        self.btn_text_picker.clicked.connect(
 | 
				
			||||||
            lambda: self.setColor(
 | 
					            lambda: self.setColor(
 | 
				
			||||||
                "text",
 | 
					                "text",
 | 
				
			||||||
| 
						 | 
					@ -238,6 +248,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        font_options_box = QtWidgets.QGroupBox("Font")
 | 
					        font_options_box = QtWidgets.QGroupBox("Font")
 | 
				
			||||||
        font_options_layout = QtWidgets.QFormLayout(font_options_box)
 | 
					        font_options_layout = QtWidgets.QFormLayout(font_options_box)
 | 
				
			||||||
        self.font_dropdown = QtWidgets.QComboBox()
 | 
					        self.font_dropdown = QtWidgets.QComboBox()
 | 
				
			||||||
 | 
					        self.font_dropdown.setMinimumHeight(20)
 | 
				
			||||||
        self.font_dropdown.addItems(["7", "8", "9", "10", "11", "12"])
 | 
					        self.font_dropdown.addItems(["7", "8", "9", "10", "11", "12"])
 | 
				
			||||||
        font_size = self.app.settings.value("FontSize",
 | 
					        font_size = self.app.settings.value("FontSize",
 | 
				
			||||||
                                            defaultValue="8",
 | 
					                                            defaultValue="8",
 | 
				
			||||||
| 
						 | 
					@ -258,6 +269,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btn_bands_picker = QtWidgets.QPushButton("█")
 | 
					        self.btn_bands_picker = QtWidgets.QPushButton("█")
 | 
				
			||||||
        self.btn_bands_picker.setFixedWidth(20)
 | 
					        self.btn_bands_picker.setFixedWidth(20)
 | 
				
			||||||
 | 
					        self.btn_bands_picker.setMinimumHeight(20)
 | 
				
			||||||
        self.btn_bands_picker.clicked.connect(
 | 
					        self.btn_bands_picker.clicked.connect(
 | 
				
			||||||
            lambda: self.setColor(
 | 
					            lambda: self.setColor(
 | 
				
			||||||
                "bands",
 | 
					                "bands",
 | 
				
			||||||
| 
						 | 
					@ -268,6 +280,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        bands_layout.addRow("Chart bands", self.btn_bands_picker)
 | 
					        bands_layout.addRow("Chart bands", self.btn_bands_picker)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btn_manage_bands = QtWidgets.QPushButton("Manage bands")
 | 
					        self.btn_manage_bands = QtWidgets.QPushButton("Manage bands")
 | 
				
			||||||
 | 
					        self.btn_manage_bands.setMinimumHeight(20)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.bandsWindow = BandsWindow(self.app)
 | 
					        self.bandsWindow = BandsWindow(self.app)
 | 
				
			||||||
        self.btn_manage_bands.clicked.connect(self.displayBandsWindow)
 | 
					        self.btn_manage_bands.clicked.connect(self.displayBandsWindow)
 | 
				
			||||||
| 
						 | 
					@ -288,6 +301,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btn_vswr_picker = QtWidgets.QPushButton("█")
 | 
					        self.btn_vswr_picker = QtWidgets.QPushButton("█")
 | 
				
			||||||
        self.btn_vswr_picker.setFixedWidth(20)
 | 
					        self.btn_vswr_picker.setFixedWidth(20)
 | 
				
			||||||
 | 
					        self.btn_vswr_picker.setMinimumHeight(20)
 | 
				
			||||||
        self.btn_vswr_picker.clicked.connect(
 | 
					        self.btn_vswr_picker.clicked.connect(
 | 
				
			||||||
            lambda: self.setColor(
 | 
					            lambda: self.setColor(
 | 
				
			||||||
                "vswr",
 | 
					                "vswr",
 | 
				
			||||||
| 
						 | 
					@ -298,6 +312,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        vswr_marker_layout.addRow("VSWR Markers", self.btn_vswr_picker)
 | 
					        vswr_marker_layout.addRow("VSWR Markers", self.btn_vswr_picker)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.vswr_marker_dropdown = QtWidgets.QComboBox()
 | 
					        self.vswr_marker_dropdown = QtWidgets.QComboBox()
 | 
				
			||||||
 | 
					        self.vswr_marker_dropdown.setMinimumHeight(20)
 | 
				
			||||||
        vswr_marker_layout.addRow(self.vswr_marker_dropdown)
 | 
					        vswr_marker_layout.addRow(self.vswr_marker_dropdown)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if len(self.vswrMarkers) == 0:
 | 
					        if len(self.vswrMarkers) == 0:
 | 
				
			||||||
| 
						 | 
					@ -310,7 +325,9 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.vswr_marker_dropdown.setCurrentIndex(0)
 | 
					        self.vswr_marker_dropdown.setCurrentIndex(0)
 | 
				
			||||||
        btn_add_vswr_marker = QtWidgets.QPushButton("Add ...")
 | 
					        btn_add_vswr_marker = QtWidgets.QPushButton("Add ...")
 | 
				
			||||||
 | 
					        btn_add_vswr_marker.setMinimumHeight(20)
 | 
				
			||||||
        btn_remove_vswr_marker = QtWidgets.QPushButton("Remove")
 | 
					        btn_remove_vswr_marker = QtWidgets.QPushButton("Remove")
 | 
				
			||||||
 | 
					        btn_remove_vswr_marker.setMinimumHeight(20)
 | 
				
			||||||
        vswr_marker_btn_layout = QtWidgets.QHBoxLayout()
 | 
					        vswr_marker_btn_layout = QtWidgets.QHBoxLayout()
 | 
				
			||||||
        vswr_marker_btn_layout.addWidget(btn_add_vswr_marker)
 | 
					        vswr_marker_btn_layout.addWidget(btn_add_vswr_marker)
 | 
				
			||||||
        vswr_marker_btn_layout.addWidget(btn_remove_vswr_marker)
 | 
					        vswr_marker_btn_layout.addWidget(btn_remove_vswr_marker)
 | 
				
			||||||
| 
						 | 
					@ -323,10 +340,13 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        markers_layout = QtWidgets.QFormLayout(markers_box)
 | 
					        markers_layout = QtWidgets.QFormLayout(markers_box)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btn_add_marker = QtWidgets.QPushButton("Add")
 | 
					        btn_add_marker = QtWidgets.QPushButton("Add")
 | 
				
			||||||
 | 
					        btn_add_marker.setMinimumHeight(30)
 | 
				
			||||||
        btn_add_marker.clicked.connect(self.addMarker)
 | 
					        btn_add_marker.clicked.connect(self.addMarker)
 | 
				
			||||||
        self.btn_remove_marker = QtWidgets.QPushButton("Remove")
 | 
					        self.btn_remove_marker = QtWidgets.QPushButton("Remove")
 | 
				
			||||||
 | 
					        self.btn_remove_marker.setMinimumHeight(30)
 | 
				
			||||||
        self.btn_remove_marker.clicked.connect(self.removeMarker)
 | 
					        self.btn_remove_marker.clicked.connect(self.removeMarker)
 | 
				
			||||||
        btn_marker_settings = QtWidgets.QPushButton("Settings ...")
 | 
					        btn_marker_settings = QtWidgets.QPushButton("Settings ...")
 | 
				
			||||||
 | 
					        btn_marker_settings.setMinimumHeight(30)
 | 
				
			||||||
        btn_marker_settings.clicked.connect(self.displayMarkerWindow)
 | 
					        btn_marker_settings.clicked.connect(self.displayMarkerWindow)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        marker_btn_layout = QtWidgets.QHBoxLayout()
 | 
					        marker_btn_layout = QtWidgets.QHBoxLayout()
 | 
				
			||||||
| 
						 | 
					@ -355,6 +375,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        selections.append("None")
 | 
					        selections.append("None")
 | 
				
			||||||
        chart00_selection = QtWidgets.QComboBox()
 | 
					        chart00_selection = QtWidgets.QComboBox()
 | 
				
			||||||
 | 
					        chart00_selection.setMinimumHeight(30)
 | 
				
			||||||
        chart00_selection.addItems(selections)
 | 
					        chart00_selection.addItems(selections)
 | 
				
			||||||
        chart00 = self.app.settings.value("Chart00", "S11 Smith Chart")
 | 
					        chart00 = self.app.settings.value("Chart00", "S11 Smith Chart")
 | 
				
			||||||
        if chart00_selection.findText(chart00) > -1:
 | 
					        if chart00_selection.findText(chart00) > -1:
 | 
				
			||||||
| 
						 | 
					@ -366,6 +387,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        charts_layout.addWidget(chart00_selection, 0, 0)
 | 
					        charts_layout.addWidget(chart00_selection, 0, 0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        chart01_selection = QtWidgets.QComboBox()
 | 
					        chart01_selection = QtWidgets.QComboBox()
 | 
				
			||||||
 | 
					        chart01_selection.setMinimumHeight(30)
 | 
				
			||||||
        chart01_selection.addItems(selections)
 | 
					        chart01_selection.addItems(selections)
 | 
				
			||||||
        chart01 = self.app.settings.value("Chart01", "S11 Return Loss")
 | 
					        chart01 = self.app.settings.value("Chart01", "S11 Return Loss")
 | 
				
			||||||
        if chart01_selection.findText(chart01) > -1:
 | 
					        if chart01_selection.findText(chart01) > -1:
 | 
				
			||||||
| 
						 | 
					@ -377,6 +399,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        charts_layout.addWidget(chart01_selection, 0, 1)
 | 
					        charts_layout.addWidget(chart01_selection, 0, 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        chart02_selection = QtWidgets.QComboBox()
 | 
					        chart02_selection = QtWidgets.QComboBox()
 | 
				
			||||||
 | 
					        chart02_selection.setMinimumHeight(30)
 | 
				
			||||||
        chart02_selection.addItems(selections)
 | 
					        chart02_selection.addItems(selections)
 | 
				
			||||||
        chart02 = self.app.settings.value("Chart02", "None")
 | 
					        chart02 = self.app.settings.value("Chart02", "None")
 | 
				
			||||||
        if chart02_selection.findText(chart02) > -1:
 | 
					        if chart02_selection.findText(chart02) > -1:
 | 
				
			||||||
| 
						 | 
					@ -388,6 +411,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        charts_layout.addWidget(chart02_selection, 0, 2)
 | 
					        charts_layout.addWidget(chart02_selection, 0, 2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        chart10_selection = QtWidgets.QComboBox()
 | 
					        chart10_selection = QtWidgets.QComboBox()
 | 
				
			||||||
 | 
					        chart10_selection.setMinimumHeight(30)
 | 
				
			||||||
        chart10_selection.addItems(selections)
 | 
					        chart10_selection.addItems(selections)
 | 
				
			||||||
        chart10 = self.app.settings.value("Chart10", "S21 Polar Plot")
 | 
					        chart10 = self.app.settings.value("Chart10", "S21 Polar Plot")
 | 
				
			||||||
        if chart10_selection.findText(chart10) > -1:
 | 
					        if chart10_selection.findText(chart10) > -1:
 | 
				
			||||||
| 
						 | 
					@ -399,6 +423,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        charts_layout.addWidget(chart10_selection, 1, 0)
 | 
					        charts_layout.addWidget(chart10_selection, 1, 0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        chart11_selection = QtWidgets.QComboBox()
 | 
					        chart11_selection = QtWidgets.QComboBox()
 | 
				
			||||||
 | 
					        chart11_selection.setMinimumHeight(30)
 | 
				
			||||||
        chart11_selection.addItems(selections)
 | 
					        chart11_selection.addItems(selections)
 | 
				
			||||||
        chart11 = self.app.settings.value("Chart11", "S21 Gain")
 | 
					        chart11 = self.app.settings.value("Chart11", "S21 Gain")
 | 
				
			||||||
        if chart11_selection.findText(chart11) > -1:
 | 
					        if chart11_selection.findText(chart11) > -1:
 | 
				
			||||||
| 
						 | 
					@ -410,6 +435,7 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        charts_layout.addWidget(chart11_selection, 1, 1)
 | 
					        charts_layout.addWidget(chart11_selection, 1, 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        chart12_selection = QtWidgets.QComboBox()
 | 
					        chart12_selection = QtWidgets.QComboBox()
 | 
				
			||||||
 | 
					        chart12_selection.setMinimumHeight(30)
 | 
				
			||||||
        chart12_selection.addItems(selections)
 | 
					        chart12_selection.addItems(selections)
 | 
				
			||||||
        chart12 = self.app.settings.value("Chart12", "None")
 | 
					        chart12 = self.app.settings.value("Chart12", "None")
 | 
				
			||||||
        if chart12_selection.findText(chart12) > -1:
 | 
					        if chart12_selection.findText(chart12) > -1:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -56,6 +56,7 @@ class SweepSettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        layout = QtWidgets.QFormLayout(box)
 | 
					        layout = QtWidgets.QFormLayout(box)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        input_title = QtWidgets.QLineEdit(self.app.sweep.properties.name)
 | 
					        input_title = QtWidgets.QLineEdit(self.app.sweep.properties.name)
 | 
				
			||||||
 | 
					        input_title.setMinimumHeight(20)
 | 
				
			||||||
        input_title.editingFinished.connect(
 | 
					        input_title.editingFinished.connect(
 | 
				
			||||||
            lambda: self.update_title(input_title.text()))
 | 
					            lambda: self.update_title(input_title.text()))
 | 
				
			||||||
        layout.addRow(input_title)
 | 
					        layout.addRow(input_title)
 | 
				
			||||||
| 
						 | 
					@ -66,26 +67,33 @@ class SweepSettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
        layout = QtWidgets.QFormLayout(box)
 | 
					        layout = QtWidgets.QFormLayout(box)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Sweep Mode
 | 
					        # Sweep Mode
 | 
				
			||||||
 | 
					        sweep_btn_layout = QtWidgets.QHBoxLayout()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        radio_button = QtWidgets.QRadioButton("Single sweep")
 | 
					        radio_button = QtWidgets.QRadioButton("Single sweep")
 | 
				
			||||||
 | 
					        radio_button.setMinimumHeight(20)
 | 
				
			||||||
        radio_button.setChecked(
 | 
					        radio_button.setChecked(
 | 
				
			||||||
            self.app.sweep.properties.mode == SweepMode.SINGLE)
 | 
					            self.app.sweep.properties.mode == SweepMode.SINGLE)
 | 
				
			||||||
        radio_button.clicked.connect(
 | 
					        radio_button.clicked.connect(
 | 
				
			||||||
            lambda: self.update_mode(SweepMode.SINGLE))
 | 
					            lambda: self.update_mode(SweepMode.SINGLE))
 | 
				
			||||||
        layout.addWidget(radio_button)
 | 
					        sweep_btn_layout.addWidget(radio_button)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        radio_button = QtWidgets.QRadioButton("Continous sweep")
 | 
					        radio_button = QtWidgets.QRadioButton("Continous sweep")
 | 
				
			||||||
 | 
					        radio_button.setMinimumHeight(20)
 | 
				
			||||||
        radio_button.setChecked(
 | 
					        radio_button.setChecked(
 | 
				
			||||||
            self.app.sweep.properties.mode == SweepMode.CONTINOUS)
 | 
					            self.app.sweep.properties.mode == SweepMode.CONTINOUS)
 | 
				
			||||||
        radio_button.clicked.connect(
 | 
					        radio_button.clicked.connect(
 | 
				
			||||||
            lambda: self.update_mode(SweepMode.CONTINOUS))
 | 
					            lambda: self.update_mode(SweepMode.CONTINOUS))
 | 
				
			||||||
        layout.addWidget(radio_button)
 | 
					        sweep_btn_layout.addWidget(radio_button)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        radio_button = QtWidgets.QRadioButton("Averaged sweep")
 | 
					        radio_button = QtWidgets.QRadioButton("Averaged sweep")
 | 
				
			||||||
 | 
					        radio_button.setMinimumHeight(20)
 | 
				
			||||||
        radio_button.setChecked(
 | 
					        radio_button.setChecked(
 | 
				
			||||||
            self.app.sweep.properties.mode == SweepMode.AVERAGE)
 | 
					            self.app.sweep.properties.mode == SweepMode.AVERAGE)
 | 
				
			||||||
        radio_button.clicked.connect(
 | 
					        radio_button.clicked.connect(
 | 
				
			||||||
            lambda: self.update_mode(SweepMode.AVERAGE))
 | 
					            lambda: self.update_mode(SweepMode.AVERAGE))
 | 
				
			||||||
        layout.addWidget(radio_button)
 | 
					        sweep_btn_layout.addWidget(radio_button)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        layout.addRow(sweep_btn_layout)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Log sweep
 | 
					        # Log sweep
 | 
				
			||||||
        label = QtWidgets.QLabel(
 | 
					        label = QtWidgets.QLabel(
 | 
				
			||||||
| 
						 | 
					@ -94,23 +102,28 @@ class SweepSettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
            " amount of datapoints and many segments. Step display in"
 | 
					            " amount of datapoints and many segments. Step display in"
 | 
				
			||||||
            " SweepControl cannot reflect this currently.")
 | 
					            " SweepControl cannot reflect this currently.")
 | 
				
			||||||
        label.setWordWrap(True)
 | 
					        label.setWordWrap(True)
 | 
				
			||||||
 | 
					        label.setMinimumSize(600,70)
 | 
				
			||||||
        layout.addRow(label)
 | 
					        layout.addRow(label)
 | 
				
			||||||
        checkbox = QtWidgets.QCheckBox("Logarithmic sweep")
 | 
					        checkbox = QtWidgets.QCheckBox("Logarithmic sweep")
 | 
				
			||||||
 | 
					        checkbox.setMinimumHeight(20)
 | 
				
			||||||
        checkbox.setCheckState(self.app.sweep.properties.logarithmic)
 | 
					        checkbox.setCheckState(self.app.sweep.properties.logarithmic)
 | 
				
			||||||
        checkbox.toggled.connect(
 | 
					        checkbox.toggled.connect(
 | 
				
			||||||
            lambda: self.update_logarithmic(checkbox.isChecked()))
 | 
					            lambda: self.update_logarithmic(checkbox.isChecked()))
 | 
				
			||||||
        layout.addWidget(checkbox)
 | 
					        layout.addRow(checkbox)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Averaging
 | 
					        # Averaging
 | 
				
			||||||
        label = QtWidgets.QLabel(
 | 
					        label = QtWidgets.QLabel(
 | 
				
			||||||
            "Averaging allows discarding outlying samples to get better"
 | 
					            "Averaging allows discarding outlying samples to get better"
 | 
				
			||||||
            " averages. Common values are 3/0, 5/2, 9/4 and 25/6.")
 | 
					            " averages. Common values are 3/0, 5/2, 9/4 and 25/6.")
 | 
				
			||||||
        label.setWordWrap(True)
 | 
					        label.setWordWrap(True)
 | 
				
			||||||
 | 
					        label.setMinimumHeight(50)
 | 
				
			||||||
        layout.addRow(label)
 | 
					        layout.addRow(label)
 | 
				
			||||||
        averages = QtWidgets.QLineEdit(
 | 
					        averages = QtWidgets.QLineEdit(
 | 
				
			||||||
            str(self.app.sweep.properties.averages[0]))
 | 
					            str(self.app.sweep.properties.averages[0]))
 | 
				
			||||||
 | 
					        averages.setMinimumHeight(20)
 | 
				
			||||||
        truncates = QtWidgets.QLineEdit(
 | 
					        truncates = QtWidgets.QLineEdit(
 | 
				
			||||||
            str(self.app.sweep.properties.averages[1]))
 | 
					            str(self.app.sweep.properties.averages[1]))
 | 
				
			||||||
 | 
					        truncates.setMinimumHeight(20)
 | 
				
			||||||
        averages.editingFinished.connect(
 | 
					        averages.editingFinished.connect(
 | 
				
			||||||
            lambda: self.update_averaging(averages, truncates))
 | 
					            lambda: self.update_averaging(averages, truncates))
 | 
				
			||||||
        truncates.editingFinished.connect(
 | 
					        truncates.editingFinished.connect(
 | 
				
			||||||
| 
						 | 
					@ -124,9 +137,11 @@ class SweepSettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
            " attenuator in line with  the S21 input (CH1) here you can"
 | 
					            " attenuator in line with  the S21 input (CH1) here you can"
 | 
				
			||||||
            " specify it.")
 | 
					            " specify it.")
 | 
				
			||||||
        label.setWordWrap(True)
 | 
					        label.setWordWrap(True)
 | 
				
			||||||
 | 
					        label.setMinimumHeight(50)
 | 
				
			||||||
        layout.addRow(label)
 | 
					        layout.addRow(label)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        input_att = QtWidgets.QLineEdit(str(self.app.s21att))
 | 
					        input_att = QtWidgets.QLineEdit(str(self.app.s21att))
 | 
				
			||||||
 | 
					        input_att.setMinimumHeight(20)
 | 
				
			||||||
        input_att.editingFinished.connect(
 | 
					        input_att.editingFinished.connect(
 | 
				
			||||||
            lambda: self.update_attenuator(input_att))
 | 
					            lambda: self.update_attenuator(input_att))
 | 
				
			||||||
        layout.addRow("Attenuator in port CH1 (s21) in dB", input_att)
 | 
					        layout.addRow("Attenuator in port CH1 (s21) in dB", input_att)
 | 
				
			||||||
| 
						 | 
					@ -135,26 +150,29 @@ class SweepSettingsWindow(QtWidgets.QWidget):
 | 
				
			||||||
    def sweep_box(self) -> 'QtWidgets.QWidget':
 | 
					    def sweep_box(self) -> 'QtWidgets.QWidget':
 | 
				
			||||||
        box = QtWidgets.QGroupBox("Sweep band")
 | 
					        box = QtWidgets.QGroupBox("Sweep band")
 | 
				
			||||||
        layout = QtWidgets.QFormLayout(box)
 | 
					        layout = QtWidgets.QFormLayout(box)
 | 
				
			||||||
 | 
					        sweep_pad_layout = QtWidgets.QHBoxLayout()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.band_list = QtWidgets.QComboBox()
 | 
					        self.band_list = QtWidgets.QComboBox()
 | 
				
			||||||
 | 
					        self.band_list.setMinimumHeight(20)
 | 
				
			||||||
        self.band_list.setModel(self.app.bands)
 | 
					        self.band_list.setModel(self.app.bands)
 | 
				
			||||||
        # pylint: disable=unnecessary-lambda
 | 
					        # pylint: disable=unnecessary-lambda
 | 
				
			||||||
        self.band_list.currentIndexChanged.connect(lambda: self.update_band())
 | 
					        self.band_list.currentIndexChanged.connect(lambda: self.update_band())
 | 
				
			||||||
        layout.addRow("Select band", self.band_list)
 | 
					        layout.addRow("Select band", self.band_list)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for raw_label, btn_label, value in (("Pad band limits", "None", 0),
 | 
					        sweep_pad_layout.addWidget(QtWidgets.QLabel("Pad band limits:"))
 | 
				
			||||||
                                            ("", "10%", 10),
 | 
					        for btn_label, value in (("None", 0), ("10%", 10), ("25%", 25), ("100%", 100),):
 | 
				
			||||||
                                            ("", "25%", 25),
 | 
					 | 
				
			||||||
                                            ("", "100%", 100),):
 | 
					 | 
				
			||||||
            radio_button = QtWidgets.QRadioButton(btn_label)
 | 
					            radio_button = QtWidgets.QRadioButton(btn_label)
 | 
				
			||||||
 | 
					            radio_button.setMinimumHeight(20)
 | 
				
			||||||
            radio_button.setChecked(self.padding == value)
 | 
					            radio_button.setChecked(self.padding == value)
 | 
				
			||||||
            radio_button.clicked.connect(partial(self.update_padding, value))
 | 
					            radio_button.clicked.connect(partial(self.update_padding, value))
 | 
				
			||||||
            layout.addRow(raw_label, radio_button)
 | 
					            sweep_pad_layout.addWidget(radio_button)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        layout.addRow(sweep_pad_layout)
 | 
				
			||||||
        self.band_label = QtWidgets.QLabel()
 | 
					        self.band_label = QtWidgets.QLabel()
 | 
				
			||||||
        layout.addRow(self.band_label)
 | 
					        layout.addRow(self.band_label)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btn_set_band_sweep = QtWidgets.QPushButton("Set band sweep")
 | 
					        btn_set_band_sweep = QtWidgets.QPushButton("Set band sweep")
 | 
				
			||||||
 | 
					        btn_set_band_sweep.setMinimumHeight(20)
 | 
				
			||||||
        btn_set_band_sweep.clicked.connect(lambda: self.update_band(True))
 | 
					        btn_set_band_sweep.clicked.connect(lambda: self.update_band(True))
 | 
				
			||||||
        layout.addRow(btn_set_band_sweep)
 | 
					        layout.addRow(btn_set_band_sweep)
 | 
				
			||||||
        return box
 | 
					        return box
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Ładowanie…
	
		Reference in New Issue