kopia lustrzana https://github.com/NanoVNA-Saver/nanovna-saver
Apply immediately when the value is changed.
rodzic
7f0bde67e7
commit
192423dfdd
|
@ -444,6 +444,14 @@ class CalibrationWindow(QtWidgets.QWidget):
|
|||
def setOffsetDelay(self, value: float):
|
||||
logger.debug("New offset delay value: %f ps", value)
|
||||
self.app.worker.offsetDelay = value / 10e12
|
||||
if len(self.app.worker.rawData11) > 0:
|
||||
# There's raw data, so we can get corrected data
|
||||
logger.debug("Applying new offset to existing sweep data.")
|
||||
self.app.worker.data11, self.app.worker.data21 = self.app.worker.applyCalibration(self.app.worker.rawData11,
|
||||
self.app.worker.rawData21)
|
||||
logger.debug("Saving and displaying corrected data.")
|
||||
self.app.saveData(self.app.worker.data11, self.app.worker.data21, self.app.sweepSource)
|
||||
self.app.worker.signals.updated.emit()
|
||||
|
||||
def calculate(self):
|
||||
if self.app.btnStopSweep.isEnabled():
|
||||
|
@ -512,7 +520,8 @@ class CalibrationWindow(QtWidgets.QWidget):
|
|||
if len(self.app.worker.rawData11) > 0:
|
||||
# There's raw data, so we can get corrected data
|
||||
logger.debug("Applying calibration to existing sweep data.")
|
||||
self.app.worker.data11, self.app.worker.data21 = self.app.worker.applyCalibration(self.app.worker.rawData11, self.app.worker.rawData21)
|
||||
self.app.worker.data11, self.app.worker.data21 = self.app.worker.applyCalibration(
|
||||
self.app.worker.rawData11, self.app.worker.rawData21)
|
||||
logger.debug("Saving and displaying corrected data.")
|
||||
self.app.saveData(self.app.worker.data11, self.app.worker.data21, self.app.sweepSource)
|
||||
self.app.worker.signals.updated.emit()
|
||||
|
|
|
@ -216,7 +216,7 @@ class SweepWorker(QtCore.QRunnable):
|
|||
def applyCalibration(self, raw_data11: List[Datapoint], raw_data21: List[Datapoint]) ->\
|
||||
(List[Datapoint], List[Datapoint]):
|
||||
if self.offsetDelay != 0:
|
||||
logger.debug("Applying offset delay of %f ps.", self.offsetDelay)
|
||||
logger.debug("Applying offset delay of %f ps.", self.offsetDelay * 10e12)
|
||||
tmp = []
|
||||
for d in raw_data11:
|
||||
tmp.append(Calibration.correctDelay11(d, self.offsetDelay))
|
||||
|
|
Ładowanie…
Reference in New Issue