Added Shireen cable and cleaned previous changes.

1. Added Shireen RFC 400 RG-8/U Low loss cable (from actual measurement.
2. Cleaned previous comments and shortened too-long line.
pull/423/head
Kevin Zembower 2021-08-03 13:00:43 -04:00 zatwierdzone przez GitHub
rodzic eaf64cd575
commit f4fa649956
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 10 dodań i 7 usunięć

Wyświetl plik

@ -2,7 +2,7 @@
#
# A python program to view and export Touchstone data from a NanoVNA
# Copyright (C) 2019, 2020 Rune B. Broberg
# Copyright (C) 2020,2021 NanoVNA-Saver Authors
# Copyright (C) 2020 NanoVNA-Saver Authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -62,11 +62,14 @@ class TDRWindow(QtWidgets.QWidget):
self.tdr_velocity_dropdown.addItem("RG-8/U PE 50\N{OHM SIGN} (Belden 8237) (0.66)", 0.66)
self.tdr_velocity_dropdown.addItem("RG-8/U Foam (Belden 8214) (0.78)", 0.78)
self.tdr_velocity_dropdown.addItem("RG-8/U (Belden 9913) (0.84)", 0.84)
# Next one added by EKZ, KC3KZ, from measurement of actual cable
self.tdr_velocity_dropdown.addItem("RG-8/U (Shireen RFC®400 Low Loss) (0.86)", 0.86)
self.tdr_velocity_dropdown.addItem("RG-8X (Belden 9258) (0.82)", 0.82)
# Added by EKZ, KC3KZ, from measurement of actual cable
# Next three added by EKZ, KC3KZ, from measurement of actual cable
self.tdr_velocity_dropdown.addItem("RG-8X (Wireman \"Super 8\" CQ106) (0.81)", 0.81)
self.tdr_velocity_dropdown.addItem("RG-8X (Wireman \"MINI-8 Lo-Loss\" CQ118) (0.82)", 0.82)
self.tdr_velocity_dropdown.addItem("RG-58 (Wireman \"CQ 58 Lo-Loss Flex\" CQ129FF) (0.79)", 0.79)
self.tdr_velocity_dropdown.addItem(
"RG-58 (Wireman \"CQ 58 Lo-Loss Flex\" CQ129FF) (0.79)", 0.79)
self.tdr_velocity_dropdown.addItem(
"RG-11/U 75\N{OHM SIGN} Foam HDPE (Belden 9292) (0.84)", 0.84)
self.tdr_velocity_dropdown.addItem("RG-58/U 52\N{OHM SIGN} PE (Belden 9201) (0.66)", 0.66)
@ -111,7 +114,7 @@ class TDRWindow(QtWidgets.QWidget):
# TODO: Let the user select whether to use high or low resolution TDR?
FFT_POINTS = 2**14
if len(self.app.data.s11) < 2:
if len(self.app.data11) < 2:
return
if self.tdr_velocity_dropdown.currentData() == -1:
@ -125,17 +128,17 @@ class TDRWindow(QtWidgets.QWidget):
except ValueError:
return
step_size = self.app.data.s11[1].freq - self.app.data.s11[0].freq
step_size = self.app.data11[1].freq - self.app.data11[0].freq
if step_size == 0:
self.tdr_result_label.setText("")
logger.info("Cannot compute cable length at 0 span")
return
s11 = []
for d in self.app.data.s11:
for d in self.app.data11:
s11.append(np.complex(d.re, d.im))
window = np.blackman(len(self.app.data.s11))
window = np.blackman(len(self.app.data11))
windowed_s11 = window * s11
self.td = np.abs(np.fft.ifft(windowed_s11, FFT_POINTS))