51 std::array<std::complex<double>, 4> getSParameters()
const;
52 std::complex<double> getLoadImpedance_At_Fmatch()
const;
53 QList<std::complex<double>> getZLdata();
54 QList<double> getFrequency();
55 std::pair<std::complex<double>, std::complex<double>>
56 getTwoPortMatchingImpedances()
const;
57 std::complex<double> getReflectionCoefficient()
const;
58 QString getSparFilePath();
59 bool isTwoPortMode()
const {
return m_twoPortMode; }
62 std::complex<double> getS11()
const;
63 std::complex<double> getS12()
const;
64 std::complex<double> getS21()
const;
65 std::complex<double> getS22()
const;
68 void setLoadImpedance(
const std::complex<double>& impedance);
69 void setReflectionCoefficient(
const std::complex<double>& gamma);
70 void setTwoPortMode(
bool enabled);
71 void setReferenceImpedance(
double Z0) {
73 updateReflectionCoefficient();
75 void setCollapsed(
bool collapsed);
76 void setFmatch(
double freq) { f_match = freq; }
77 bool isCollapsed()
const {
return m_isCollapsed; }
81 double Z0_Port1, Z0_Port2;
84 void mousePressEvent(QMouseEvent* event)
override;
87 void onImpedanceChanged();
88 void onReflectionCoefficientChanged();
89 void onFormatChanged();
90 void onInputMethodChanged();
92 void onSParameterChanged();
93 void onToggleCollapse();
97 void setupOnePortUI();
98 void setupTwoPortUI();
99 void updateReflectionCoefficient();
100 void updateImpedance();
101 void updateSParameterDisplays();
102 void updateImpedanceFormat();
103 void updateReflectionFormat();
104 void updateSParameterFormat();
108 QMap<QString, QList<double>> loadData;
109 QString spar_file_path;
113 QGridLayout* m_mainLayout;
114 QWidget* m_contentWidget;
115 QPushButton* m_toggleButton;
118 QRadioButton* m_manualInputRadio;
119 QRadioButton* m_fileInputRadio;
120 QButtonGroup* m_inputMethodGroup;
121 QPushButton* m_browseButton;
125 QLabel* m_formatLabel;
126 QComboBox* m_formatCombo;
129 QLabel* m_impedanceLabel;
130 QDoubleSpinBox* m_impedanceReal;
131 QLabel* m_impedanceSeparator;
132 QDoubleSpinBox* m_impedanceImag;
133 QLabel* m_impedanceUnit;
136 QLabel* m_reflectionLabel;
137 QDoubleSpinBox* m_reflectionReal;
138 QLabel* m_reflectionSeparator;
139 QDoubleSpinBox* m_reflectionImag;
142 QWidget* m_twoPortWidget;
143 QGridLayout* m_twoPortLayout;
147 QDoubleSpinBox* m_s11Real;
148 QLabel* m_s11Separator;
149 QDoubleSpinBox* m_s11Imag;
152 QDoubleSpinBox* m_s12Real;
153 QLabel* m_s12Separator;
154 QDoubleSpinBox* m_s12Imag;
157 QDoubleSpinBox* m_s21Real;
158 QLabel* m_s21Separator;
159 QDoubleSpinBox* m_s21Imag;
162 QDoubleSpinBox* m_s22Real;
163 QLabel* m_s22Separator;
164 QDoubleSpinBox* m_s22Imag;
168 bool m_updatingValues;
171 QString m_currentFile;
174 void impedanceChanged();
175 void reflectionCoefficientChanged();
176 void sParametersChanged();
177 void collapsedStateChanged(
bool collapsed);