Add new s21 markers for |Z| and R+jX

pull/384/head
Daniel Lingvay 2021-04-04 23:51:48 +03:00
rodzic ba63ef5fc5
commit b3068543a9
3 zmienionych plików z 9 dodań i 0 usunięć

1
.gitignore vendored
Wyświetl plik

@ -11,3 +11,4 @@
settings.json settings.json
.gitignore .gitignore
.coverage .coverage
/nanovna-saver.exe.spec

Wyświetl plik

@ -54,6 +54,10 @@ TYPES = (
Label("s21phase", "S21 Phase", "S21 Phase", True), Label("s21phase", "S21 Phase", "S21 Phase", True),
Label("s21polar", "S21 Polar", "S21 Polar", False), Label("s21polar", "S21 Polar", "S21 Polar", False),
Label("s21groupdelay", "S21 Group Delay", "S21 Group Delay", False), Label("s21groupdelay", "S21 Group Delay", "S21 Group Delay", False),
Label("s21magshunt", "S21 |Z| shunt", "S21 Z Magnitude shunt", False),
Label("s21magseries", "S21 |Z| series", "S21 Z Magnitude series", False),
Label("s21realimagshunt", "S21 R+jX shunt", "S21 Z Real+Imag shunt", False),
Label("s21realimagseries", "S21 R+jX series", "S21 Z Real+Imag series", False),
) )

Wyświetl plik

@ -351,3 +351,7 @@ class Marker(QtCore.QObject, Value):
self.label['s21phase'].setText(format_phase(s21.phase)) self.label['s21phase'].setText(format_phase(s21.phase))
self.label['s21polar'].setText( self.label['s21polar'].setText(
str(round(abs(s21.z), 2)) + "" + format_phase(s21.phase)) str(round(abs(s21.z), 2)) + "" + format_phase(s21.phase))
self.label['s21magshunt'].setText(format_magnitude(abs(s21.shuntImpedance())))
self.label['s21magseries'].setText(format_magnitude(abs(s21.seriesImpedance())))
self.label['s21realimagshunt'].setText(format_complex_imp(s21.shuntImpedance(), allow_negative=True))
self.label['s21realimagseries'].setText(format_complex_imp(s21.seriesImpedance(), allow_negative=True))