From 55ac50ee84e457554d1daa184a6cb5ac3cbe7a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Sat, 27 Nov 2021 23:32:41 +0100 Subject: [PATCH] allow different paramaters for male/female standards --- .../Calibration/calibration.cpp | 9 +- .../Calibration/calibrationtracedialog.cpp | 3 +- .../PC_Application/Calibration/calkit.cpp | 269 +-- Software/PC_Application/Calibration/calkit.h | 114 +- .../Calibration/calkitdialog.cpp | 258 ++- .../PC_Application/Calibration/calkitdialog.h | 2 +- .../Calibration/calkitdialog.ui | 1439 +++++++++++------ 7 files changed, 1416 insertions(+), 678 deletions(-) diff --git a/Software/PC_Application/Calibration/calibration.cpp b/Software/PC_Application/Calibration/calibration.cpp index 9029134..3fce2b9 100644 --- a/Software/PC_Application/Calibration/calibration.cpp +++ b/Software/PC_Application/Calibration/calibration.cpp @@ -122,13 +122,14 @@ bool Calibration::constructErrorTerms(Calibration::Type type) } qDebug() << "Constructing error terms for" << TypeToString(type) << "calibration"; bool isTRL = type == Type::TRL; - double kit_minFreq = kit.minFreq(isTRL); - double kit_maxFreq = kit.maxFreq(isTRL); - if(minFreq < kit_minFreq || maxFreq > kit_maxFreq) { + bool uses_male = true; + bool uses_female = true; + if(kit.checkIfValid(minFreq, maxFreq, isTRL, uses_male, uses_female)) { + // TODO adjust for male/female standards // Calkit does not support complete calibration range QString msg = QString("The calibration kit does not support the complete span.\n\n") + "The measured calibration data covers " + Unit::ToString(minFreq, "Hz", " kMG", 4) + " to " + Unit::ToString(maxFreq, "Hz", " kMG", 4) - + ", however the calibration kit is only valid from " + Unit::ToString(kit_minFreq, "Hz", " kMG", 4) + " to " + Unit::ToString(kit_maxFreq, "Hz", " kMG", 4) + ".\n\n" + + ", however the calibration kit does not support the whole frequency range.\n\n" + "Please adjust the calibration kit or the span and take the calibration measurements again."; InformationBox::ShowError("Unable to perform calibration", msg); qWarning() << msg; diff --git a/Software/PC_Application/Calibration/calibrationtracedialog.cpp b/Software/PC_Application/Calibration/calibrationtracedialog.cpp index 434dbe5..d1d8260 100644 --- a/Software/PC_Application/Calibration/calibrationtracedialog.cpp +++ b/Software/PC_Application/Calibration/calibrationtracedialog.cpp @@ -30,7 +30,8 @@ CalibrationTraceDialog::CalibrationTraceDialog(Calibration *cal, double f_min, d if(type != Calibration::Type::None) { auto kit = cal->getCalibrationKit(); auto isTRL = type == Calibration::Type::TRL; - if(kit.minFreq(isTRL) > f_min || kit.maxFreq(isTRL) < f_max) { + if(isTRL && (kit.minFreqTRL() > f_min || kit.maxFreqTRL() < f_max)) { + // TODO check SOLT frequency range depending on selected male/female kit InformationBox::ShowMessage("Warning", "The calibration kit does not completely cover the currently selected span. " "Applying a calibration will not be possible for any measurements taken with these settings."); } diff --git a/Software/PC_Application/Calibration/calkit.cpp b/Software/PC_Application/Calibration/calkit.cpp index 890d9a2..8a6ecbc 100644 --- a/Software/PC_Application/Calibration/calkit.cpp +++ b/Software/PC_Application/Calibration/calkit.cpp @@ -14,9 +14,12 @@ using json = nlohmann::json; using namespace std; Calkit::Calkit() - : ts_open(nullptr), - ts_short(nullptr), - ts_load(nullptr), + : ts_open_m(nullptr), + ts_short_m(nullptr), + ts_load_m(nullptr), + ts_open_f(nullptr), + ts_short_f(nullptr), + ts_load_f(nullptr), ts_through(nullptr), ts_cached(false) { @@ -128,39 +131,39 @@ Calkit Calkit::fromFile(QString filename) // legacy file format, return to beginning of file file.clear(); file.seekg(0); - c.SOLT.Open.useMeasurements = readLine(file).toInt(); - c.SOLT.Short.useMeasurements = readLine(file).toInt(); - c.SOLT.Load.useMeasurements = readLine(file).toInt(); + c.SOLT.open_m.useMeasurements = readLine(file).toInt(); + c.SOLT.short_m.useMeasurements = readLine(file).toInt(); + c.SOLT.load_m.useMeasurements = readLine(file).toInt(); c.SOLT.Through.useMeasurements = readLine(file).toInt(); - c.SOLT.Open.Z0 = readLine(file).toDouble(); - c.SOLT.Open.delay = readLine(file).toDouble(); - c.SOLT.Open.loss = readLine(file).toDouble(); - c.SOLT.Open.C0 = readLine(file).toDouble(); - c.SOLT.Open.C1 = readLine(file).toDouble(); - c.SOLT.Open.C2 = readLine(file).toDouble(); - c.SOLT.Open.C3 = readLine(file).toDouble(); - c.SOLT.Short.Z0 = readLine(file).toDouble(); - c.SOLT.Short.delay = readLine(file).toDouble(); - c.SOLT.Short.loss = readLine(file).toDouble(); - c.SOLT.Short.L0 = readLine(file).toDouble(); - c.SOLT.Short.L1 = readLine(file).toDouble(); - c.SOLT.Short.L2 = readLine(file).toDouble(); - c.SOLT.Short.L3 = readLine(file).toDouble(); - c.SOLT.Load.Z0 = readLine(file).toDouble(); + c.SOLT.open_m.Z0 = readLine(file).toDouble(); + c.SOLT.open_m.delay = readLine(file).toDouble(); + c.SOLT.open_m.loss = readLine(file).toDouble(); + c.SOLT.open_m.C0 = readLine(file).toDouble(); + c.SOLT.open_m.C1 = readLine(file).toDouble(); + c.SOLT.open_m.C2 = readLine(file).toDouble(); + c.SOLT.open_m.C3 = readLine(file).toDouble(); + c.SOLT.short_m.Z0 = readLine(file).toDouble(); + c.SOLT.short_m.delay = readLine(file).toDouble(); + c.SOLT.short_m.loss = readLine(file).toDouble(); + c.SOLT.short_m.L0 = readLine(file).toDouble(); + c.SOLT.short_m.L1 = readLine(file).toDouble(); + c.SOLT.short_m.L2 = readLine(file).toDouble(); + c.SOLT.short_m.L3 = readLine(file).toDouble(); + c.SOLT.load_m.Z0 = readLine(file).toDouble(); c.SOLT.Through.Z0 = readLine(file).toDouble(); c.SOLT.Through.delay = readLine(file).toDouble(); c.SOLT.Through.loss = readLine(file).toDouble(); - if(c.SOLT.Open.useMeasurements) { - c.SOLT.Open.file = readLine(file); - c.SOLT.Open.Sparam = readLine(file).toInt(); + if(c.SOLT.open_m.useMeasurements) { + c.SOLT.open_m.file = readLine(file); + c.SOLT.open_m.Sparam = readLine(file).toInt(); } - if(c.SOLT.Short.useMeasurements) { - c.SOLT.Short.file = readLine(file); - c.SOLT.Short.Sparam = readLine(file).toInt(); + if(c.SOLT.short_m.useMeasurements) { + c.SOLT.short_m.file = readLine(file); + c.SOLT.short_m.Sparam = readLine(file).toInt(); } - if(c.SOLT.Load.useMeasurements) { - c.SOLT.Load.file = readLine(file); - c.SOLT.Load.Sparam = readLine(file).toInt(); + if(c.SOLT.load_m.useMeasurements) { + c.SOLT.load_m.file = readLine(file); + c.SOLT.load_m.Sparam = readLine(file).toInt(); } if(c.SOLT.Through.useMeasurements) { c.SOLT.Through.file = readLine(file); @@ -173,6 +176,8 @@ Calkit Calkit::fromFile(QString filename) c.TRL.Line.minFreq = readLine(file).toDouble(); c.TRL.Line.maxFreq = readLine(file).toDouble(); + c.SOLT.separate_male_female = false; + InformationBox::ShowMessage("Loading calkit file", "The file \"" + filename + "\" is stored in a deprecated" " calibration kit format. Future versions of this application might not support" " it anymore. Please save the calibration kit to update to the new format"); @@ -199,7 +204,7 @@ void Calkit::edit(std::function done) dialog->show(); } -class Calkit::SOLT Calkit::toSOLT(double frequency) +class Calkit::SOLT Calkit::toSOLT(double frequency, bool male_standards) { auto addTransmissionLine = [](complex termination_reflection, double offset_impedance, double offset_delay, double offset_loss, double frequency) -> complex { // nomenclature and formulas from https://loco.lab.asu.edu/loco-memos/edges_reports/report_20130807.pdf @@ -221,29 +226,36 @@ class Calkit::SOLT Calkit::toSOLT(double frequency) return Gamma_i; }; + auto Load = male_standards ? SOLT.load_m : SOLT.load_f; + auto Short = male_standards ? SOLT.short_m : SOLT.short_f; + auto Open = male_standards ? SOLT.open_m : SOLT.open_f; + auto ts_load = male_standards ? ts_load_m : ts_load_f; + auto ts_short = male_standards ? ts_short_m : ts_short_f; + auto ts_open = male_standards ? ts_open_m : ts_open_f; + fillTouchstoneCache(); class SOLT ref; - if(SOLT.Load.useMeasurements) { + if(Load.useMeasurements) { ref.Load = ts_load->interpolate(frequency).S[0]; } else { - auto imp_load = complex(SOLT.Load.Z0, 0); + auto imp_load = complex(Load.Z0, 0); // Add parallel capacitor to impedance - if(SOLT.Load.Cparallel > 0) { - auto imp_C = complex(0, -1.0 / (frequency * 2 * M_PI * SOLT.Load.Cparallel)); + if(Load.Cparallel > 0) { + auto imp_C = complex(0, -1.0 / (frequency * 2 * M_PI * Load.Cparallel)); imp_load = (imp_load * imp_C) / (imp_load + imp_C); } // add series inductor to impedance - auto imp_L = complex(0, frequency * 2 * M_PI * SOLT.Load.Lseries); + auto imp_L = complex(0, frequency * 2 * M_PI * Load.Lseries); imp_load += imp_L; ref.Load = (imp_load - complex(50.0)) / (imp_load + complex(50.0)); - ref.Load = addTransmissionLine(ref.Load, SOLT.Load.Z0, SOLT.Load.delay*1e-12, 0, frequency); + ref.Load = addTransmissionLine(ref.Load, Load.Z0, Load.delay*1e-12, 0, frequency); } - if(SOLT.Open.useMeasurements) { + if(Open.useMeasurements) { ref.Open = ts_open->interpolate(frequency).S[0]; } else { // calculate fringing capacitance for open - double Cfringing = SOLT.Open.C0 * 1e-15 + SOLT.Open.C1 * 1e-27 * frequency + SOLT.Open.C2 * 1e-36 * pow(frequency, 2) + SOLT.Open.C3 * 1e-45 * pow(frequency, 3); + double Cfringing = Open.C0 * 1e-15 + Open.C1 * 1e-27 * frequency + Open.C2 * 1e-36 * pow(frequency, 2) + Open.C3 * 1e-45 * pow(frequency, 3); // convert to impedance if (Cfringing == 0) { // special case to avoid issues with infinity @@ -252,18 +264,18 @@ class Calkit::SOLT Calkit::toSOLT(double frequency) auto imp_open = complex(0, -1.0 / (frequency * 2 * M_PI * Cfringing)); ref.Open = (imp_open - complex(50.0)) / (imp_open + complex(50.0)); } - ref.Open = addTransmissionLine(ref.Open, SOLT.Open.Z0, SOLT.Open.delay*1e-12, SOLT.Open.loss*1e9, frequency); + ref.Open = addTransmissionLine(ref.Open, Open.Z0, Open.delay*1e-12, Open.loss*1e9, frequency); } - if(SOLT.Short.useMeasurements) { + if(Short.useMeasurements) { ref.Short = ts_short->interpolate(frequency).S[0]; } else { // calculate inductance for short - double Lseries = SOLT.Short.L0 * 1e-12 + SOLT.Short.L1 * 1e-24 * frequency + SOLT.Short.L2 * 1e-33 * pow(frequency, 2) + SOLT.Short.L3 * 1e-42 * pow(frequency, 3); + double Lseries = Short.L0 * 1e-12 + Short.L1 * 1e-24 * frequency + Short.L2 * 1e-33 * pow(frequency, 2) + Short.L3 * 1e-42 * pow(frequency, 3); // convert to impedance auto imp_short = complex(0, frequency * 2 * M_PI * Lseries); ref.Short = (imp_short - complex(50.0)) / (imp_short + complex(50.0)); - ref.Short = addTransmissionLine(ref.Short, SOLT.Short.Z0, SOLT.Short.delay*1e-12, SOLT.Short.loss*1e9, frequency); + ref.Short = addTransmissionLine(ref.Short, Short.Z0, Short.delay*1e-12, Short.loss*1e9, frequency); } if(SOLT.Through.useMeasurements) { @@ -300,47 +312,91 @@ class Calkit::TRL Calkit::toTRL(double) return trl; } -double Calkit::minFreq(bool trl) +double Calkit::minFreqTRL() { - if(trl) { - return TRL.Line.minFreq; - } else { - fillTouchstoneCache(); - double min = 0; - array ts_list = {ts_open, ts_short, ts_load, ts_through}; - // find the highest minimum frequency in all measurement files - for(auto ts : ts_list) { - if(!ts) { - // this calibration standard is defined by coefficients, no minimum frequency - continue; - } - if(ts->minFreq() > min) { - min = ts->minFreq(); - } - } - return min; - } + return TRL.Line.minFreq; } -double Calkit::maxFreq(bool trl) +double Calkit::maxFreqTRL() { - if(trl) { - return TRL.Line.maxFreq; + return TRL.Line.maxFreq; +} + +double Calkit::minFreqSOLT(bool male_standards) +{ + fillTouchstoneCache(); + double min = 0; + auto ts_load = male_standards ? ts_load_m : ts_load_f; + auto ts_short = male_standards ? ts_short_m : ts_short_f; + auto ts_open = male_standards ? ts_open_m : ts_open_f; + array ts_list = {ts_open, ts_short, ts_load, ts_through}; + // find the highest minimum frequency in all measurement files + for(auto ts : ts_list) { + if(!ts) { + // this calibration standard is defined by coefficients, no minimum frequency + continue; + } + if(ts->minFreq() > min) { + min = ts->minFreq(); + } + } + return min; +} + +double Calkit::maxFreqSOLT(bool male_standards) +{ + fillTouchstoneCache(); + double max = std::numeric_limits::max(); + auto ts_load = male_standards ? ts_load_m : ts_load_f; + auto ts_short = male_standards ? ts_short_m : ts_short_f; + auto ts_open = male_standards ? ts_open_m : ts_open_f; + array ts_list = {ts_open, ts_short, ts_load, ts_through}; + // find the highest minimum frequency in all measurement files + for(auto ts : ts_list) { + if(!ts) { + // this calibration standard is defined by coefficients, no minimum frequency + continue; + } + if(ts->maxFreq() < max) { + max = ts->maxFreq(); + } + } + return max; +} + +bool Calkit::checkIfValid(double min_freq, double max_freq, bool isTRL, bool include_male, bool include_female) +{ + auto min_supported = std::numeric_limits::min(); + auto max_supported = std::numeric_limits::max(); + if(isTRL) { + min_supported = TRL.Line.minFreq; + max_supported = TRL.Line.maxFreq; } else { - fillTouchstoneCache(); - double max = std::numeric_limits::max(); - array ts_list = {ts_open, ts_short, ts_load, ts_through}; - // find the highest minimum frequency in all measurement files - for(auto ts : ts_list) { - if(!ts) { - // this calibration standard is defined by coefficients, no minimum frequency - continue; + if(include_male) { + auto min_male = minFreqSOLT(true); + auto max_male = maxFreqSOLT(true); + if(min_male > min_supported) { + min_supported = min_male; } - if(ts->maxFreq() < max) { - max = ts->maxFreq(); + if(max_male > max_supported) { + max_supported = max_male; } } - return max; + if(include_female) { + auto min_female = minFreqSOLT(false); + auto max_female = maxFreqSOLT(false); + if(min_female > min_supported) { + min_supported = min_female; + } + if(max_female > max_supported) { + max_supported = max_female; + } + } + } + if(min_supported <= min_freq && max_supported >= max_freq) { + return true; + } else { + return false; } } @@ -351,7 +407,7 @@ bool Calkit::isTRLReflectionShort() const void Calkit::TransformPathsToRelative(QFileInfo d) { - vector filenames = {&SOLT.Short.file, &SOLT.Open.file, &SOLT.Load.file, &SOLT.Through.file}; + vector filenames = {&SOLT.short_m.file, &SOLT.open_m.file, &SOLT.load_m.file, &SOLT.short_f.file, &SOLT.open_f.file, &SOLT.load_f.file, &SOLT.Through.file}; for(auto f : filenames) { if(f->isEmpty()) { continue; @@ -366,7 +422,7 @@ void Calkit::TransformPathsToRelative(QFileInfo d) void Calkit::TransformPathsToAbsolute(QFileInfo d) { - vector filenames = {&SOLT.Short.file, &SOLT.Open.file, &SOLT.Load.file, &SOLT.Through.file}; + vector filenames = {&SOLT.short_m.file, &SOLT.open_m.file, &SOLT.load_m.file, &SOLT.short_f.file, &SOLT.open_f.file, &SOLT.load_f.file, &SOLT.Through.file}; for(auto f : filenames) { if(f->isEmpty()) { continue; @@ -382,12 +438,18 @@ void Calkit::TransformPathsToAbsolute(QFileInfo d) void Calkit::clearTouchstoneCache() { - delete ts_open; - ts_open = nullptr; - delete ts_short; - ts_short = nullptr; - delete ts_load; - ts_load = nullptr; + delete ts_open_m; + ts_open_m = nullptr; + delete ts_short_m; + ts_short_m = nullptr; + delete ts_load_m; + ts_load_m = nullptr; + delete ts_open_f; + ts_open_f = nullptr; + delete ts_short_f; + ts_short_f = nullptr; + delete ts_load_f; + ts_load_f = nullptr; delete ts_through; ts_through = nullptr; ts_cached = false; @@ -398,20 +460,35 @@ void Calkit::fillTouchstoneCache() if(ts_cached) { return; } - if(SOLT.Open.useMeasurements) { - ts_open = new Touchstone(1); - *ts_open = Touchstone::fromFile(SOLT.Open.file.toStdString()); - ts_open->reduceTo1Port(SOLT.Open.Sparam); + if(SOLT.open_m.useMeasurements) { + ts_open_m = new Touchstone(1); + *ts_open_m = Touchstone::fromFile(SOLT.open_m.file.toStdString()); + ts_open_m->reduceTo1Port(SOLT.open_m.Sparam); } - if(SOLT.Short.useMeasurements) { - ts_short = new Touchstone(1); - *ts_short = Touchstone::fromFile(SOLT.Short.file.toStdString()); - ts_short->reduceTo1Port(SOLT.Short.Sparam); + if(SOLT.short_m.useMeasurements) { + ts_short_m = new Touchstone(1); + *ts_short_m = Touchstone::fromFile(SOLT.short_m.file.toStdString()); + ts_short_m->reduceTo1Port(SOLT.short_m.Sparam); } - if(SOLT.Load.useMeasurements) { - ts_load = new Touchstone(1); - *ts_load = Touchstone::fromFile(SOLT.Load.file.toStdString()); - ts_load->reduceTo1Port(SOLT.Load.Sparam); + if(SOLT.load_m.useMeasurements) { + ts_load_m = new Touchstone(1); + *ts_load_m = Touchstone::fromFile(SOLT.load_m.file.toStdString()); + ts_load_m->reduceTo1Port(SOLT.load_m.Sparam); + } + if(SOLT.open_f.useMeasurements) { + ts_open_f = new Touchstone(1); + *ts_open_f = Touchstone::fromFile(SOLT.open_f.file.toStdString()); + ts_open_f->reduceTo1Port(SOLT.open_f.Sparam); + } + if(SOLT.short_f.useMeasurements) { + ts_short_f = new Touchstone(1); + *ts_short_f = Touchstone::fromFile(SOLT.short_f.file.toStdString()); + ts_short_f->reduceTo1Port(SOLT.short_f.Sparam); + } + if(SOLT.load_f.useMeasurements) { + ts_load_f = new Touchstone(1); + *ts_load_f = Touchstone::fromFile(SOLT.load_f.file.toStdString()); + ts_load_f->reduceTo1Port(SOLT.load_f.Sparam); } if(SOLT.Through.useMeasurements) { ts_through = new Touchstone(2); diff --git a/Software/PC_Application/Calibration/calkit.h b/Software/PC_Application/Calibration/calkit.h index 093fbeb..21eb063 100644 --- a/Software/PC_Application/Calibration/calkit.h +++ b/Software/PC_Application/Calibration/calkit.h @@ -41,10 +41,13 @@ public: void toFile(QString filename); static Calkit fromFile(QString filename); void edit(std::function done = nullptr); - SOLT toSOLT(double frequency); + SOLT toSOLT(double frequency, bool male_standards = true); TRL toTRL(double frequency); - double minFreq(bool trl = false); - double maxFreq(bool trl = false); + double minFreqTRL(); + double maxFreqTRL(); + double minFreqSOLT(bool male_standards = true); + double maxFreqSOLT(bool male_standards = true); + bool checkIfValid(double min_freq, double max_freq, bool isTRL, bool include_male, bool include_female); bool isTRLReflectionShort() const; private: @@ -54,30 +57,34 @@ private: QString manufacturer, serialnumber, description; // SOLT standard definitions struct { - struct { + using Open = struct { double Z0, delay, loss, C0, C1, C2, C3; QString file; bool useMeasurements; int Sparam; - } Open; - struct { + }; + Open open_m, open_f; + using Short = struct { double Z0, delay, loss, L0, L1, L2, L3; QString file; bool useMeasurements; int Sparam; - } Short; - struct { + }; + Short short_m, short_f; + using Load = struct { double Z0, delay, Cparallel, Lseries; QString file; bool useMeasurements; int Sparam; - } Load; + }; + Load load_m, load_f; struct { double Z0, delay, loss; QString file; bool useMeasurements; int Sparam1, Sparam2; } Through; + bool separate_male_female; } SOLT; struct { struct { @@ -92,7 +99,9 @@ private: } TRL; bool startDialogWithSOLT; - Touchstone *ts_open, *ts_short, *ts_load, *ts_through; + Touchstone *ts_open_m, *ts_short_m, *ts_load_m; + Touchstone *ts_open_f, *ts_short_f, *ts_load_f; + Touchstone *ts_through; bool ts_cached; using JSONDescription = struct _jsondescr { @@ -100,40 +109,67 @@ private: QString name; QVariant def; }; - const std::array json_descr = {{ + const std::array json_descr = {{ {&manufacturer, "Manufacturer", ""}, {&serialnumber, "Serialnumber", ""}, {&description, "Description", ""}, - {&SOLT.Open.Z0, "SOLT/Open/Param/Z0", 50.0}, - {&SOLT.Open.delay, "SOLT/Open/Param/Delay", 0.0}, - {&SOLT.Open.loss, "SOLT/Open/Param/Loss", 0.0}, - {&SOLT.Open.C0, "SOLT/Open/Param/C0", 0.0}, - {&SOLT.Open.C1, "SOLT/Open/Param/C1", 0.0}, - {&SOLT.Open.C2, "SOLT/Open/Param/C2", 0.0}, - {&SOLT.Open.C3, "SOLT/Open/Param/C3", 0.0}, - {&SOLT.Open.useMeasurements, "SOLT/Open/Measurements/Use", false}, - {&SOLT.Open.file, "SOLT/Open/Measurements/File", ""}, - {&SOLT.Open.Sparam, "SOLT/Open/Measurements/Port", 0}, + {&SOLT.open_m.Z0, "SOLT/Open/Param/Z0", 50.0}, + {&SOLT.open_m.delay, "SOLT/Open/Param/Delay", 0.0}, + {&SOLT.open_m.loss, "SOLT/Open/Param/Loss", 0.0}, + {&SOLT.open_m.C0, "SOLT/Open/Param/C0", 0.0}, + {&SOLT.open_m.C1, "SOLT/Open/Param/C1", 0.0}, + {&SOLT.open_m.C2, "SOLT/Open/Param/C2", 0.0}, + {&SOLT.open_m.C3, "SOLT/Open/Param/C3", 0.0}, + {&SOLT.open_m.useMeasurements, "SOLT/Open/Measurements/Use", false}, + {&SOLT.open_m.file, "SOLT/Open/Measurements/File", ""}, + {&SOLT.open_m.Sparam, "SOLT/Open/Measurements/Port", 0}, + {&SOLT.open_f.Z0, "SOLT/Open/Param/Z0_Female", 50.0}, + {&SOLT.open_f.delay, "SOLT/Open/Param/Delay_Female", 0.0}, + {&SOLT.open_f.loss, "SOLT/Open/Param/Loss_Female", 0.0}, + {&SOLT.open_f.C0, "SOLT/Open/Param/C0_Female", 0.0}, + {&SOLT.open_f.C1, "SOLT/Open/Param/C1_Female", 0.0}, + {&SOLT.open_f.C2, "SOLT/Open/Param/C2_Female", 0.0}, + {&SOLT.open_f.C3, "SOLT/Open/Param/C3_Female", 0.0}, + {&SOLT.open_f.useMeasurements, "SOLT/Open/Measurements/Use_Female", false}, + {&SOLT.open_f.file, "SOLT/Open/Measurements/File_Female", ""}, + {&SOLT.open_f.Sparam, "SOLT/Open/Measurements/Port_Female", 0}, - {&SOLT.Short.Z0, "SOLT/Short/Param/Z0", 50.0}, - {&SOLT.Short.delay, "SOLT/Short/Param/Delay", 0.0}, - {&SOLT.Short.loss, "SOLT/Short/Param/Loss", 0.0}, - {&SOLT.Short.L0, "SOLT/Short/Param/L0", 0.0}, - {&SOLT.Short.L1, "SOLT/Short/Param/L1", 0.0}, - {&SOLT.Short.L2, "SOLT/Short/Param/L2", 0.0}, - {&SOLT.Short.L3, "SOLT/Short/Param/L3", 0.0}, - {&SOLT.Short.useMeasurements, "SOLT/Short/Measurements/Use", false}, - {&SOLT.Short.file, "SOLT/Short/Measurements/File", ""}, - {&SOLT.Short.Sparam, "SOLT/Short/Measurements/Port", 0}, + {&SOLT.short_m.Z0, "SOLT/Short/Param/Z0", 50.0}, + {&SOLT.short_m.delay, "SOLT/Short/Param/Delay", 0.0}, + {&SOLT.short_m.loss, "SOLT/Short/Param/Loss", 0.0}, + {&SOLT.short_m.L0, "SOLT/Short/Param/L0", 0.0}, + {&SOLT.short_m.L1, "SOLT/Short/Param/L1", 0.0}, + {&SOLT.short_m.L2, "SOLT/Short/Param/L2", 0.0}, + {&SOLT.short_m.L3, "SOLT/Short/Param/L3", 0.0}, + {&SOLT.short_m.useMeasurements, "SOLT/Short/Measurements/Use", false}, + {&SOLT.short_m.file, "SOLT/Short/Measurements/File", ""}, + {&SOLT.short_m.Sparam, "SOLT/Short/Measurements/Port", 0}, + {&SOLT.short_f.Z0, "SOLT/Short/Param/Z0_Female", 50.0}, + {&SOLT.short_f.delay, "SOLT/Short/Param/Delay_Female", 0.0}, + {&SOLT.short_f.loss, "SOLT/Short/Param/Loss_Female", 0.0}, + {&SOLT.short_f.L0, "SOLT/Short/Param/L0_Female", 0.0}, + {&SOLT.short_f.L1, "SOLT/Short/Param/L1_Female", 0.0}, + {&SOLT.short_f.L2, "SOLT/Short/Param/L2_Female", 0.0}, + {&SOLT.short_f.L3, "SOLT/Short/Param/L3_Female", 0.0}, + {&SOLT.short_f.useMeasurements, "SOLT/Short/Measurements/Use_Female", false}, + {&SOLT.short_f.file, "SOLT/Short/Measurements/File_Female", ""}, + {&SOLT.short_f.Sparam, "SOLT/Short/Measurements/Port_Female", 0}, - {&SOLT.Load.Z0, "SOLT/Load/Param/Z0", 50.0}, - {&SOLT.Load.delay, "SOLT/Load/Param/Delay", 0.0}, - {&SOLT.Load.Cparallel, "SOLT/Load/Param/C", 0.0}, - {&SOLT.Load.Lseries, "SOLT/Load/Param/L", 0.0}, - {&SOLT.Load.useMeasurements, "SOLT/Load/Measurements/Use", false}, - {&SOLT.Load.file, "SOLT/Load/Measurements/File", ""}, - {&SOLT.Load.Sparam, "SOLT/Load/Measurements/Port", 0}, + {&SOLT.load_m.Z0, "SOLT/Load/Param/Z0", 50.0}, + {&SOLT.load_m.delay, "SOLT/Load/Param/Delay", 0.0}, + {&SOLT.load_m.Cparallel, "SOLT/Load/Param/C", 0.0}, + {&SOLT.load_m.Lseries, "SOLT/Load/Param/L", 0.0}, + {&SOLT.load_m.useMeasurements, "SOLT/Load/Measurements/Use", false}, + {&SOLT.load_m.file, "SOLT/Load/Measurements/File", ""}, + {&SOLT.load_m.Sparam, "SOLT/Load/Measurements/Port", 0}, + {&SOLT.load_f.Z0, "SOLT/Load/Param/Z0_Female", 50.0}, + {&SOLT.load_f.delay, "SOLT/Load/Param/Delay_Female", 0.0}, + {&SOLT.load_f.Cparallel, "SOLT/Load/Param/C_Female", 0.0}, + {&SOLT.load_f.Lseries, "SOLT/Load/Param/L_Female", 0.0}, + {&SOLT.load_f.useMeasurements, "SOLT/Load/Measurements/Use_Female", false}, + {&SOLT.load_f.file, "SOLT/Load/Measurements/File_Female", ""}, + {&SOLT.load_f.Sparam, "SOLT/Load/Measurements/Port_Female", 0}, {&SOLT.Through.Z0, "SOLT/Through/Param/Z0", 50.0}, {&SOLT.Through.delay, "SOLT/Through/Param/Delay", 0.0}, @@ -143,6 +179,8 @@ private: {&SOLT.Through.Sparam1, "SOLT/Through/Measurements/Port1", 0}, {&SOLT.Through.Sparam2, "SOLT/Through/Measurements/Port2", 1}, + {&SOLT.separate_male_female, "SOLT/SeparateMaleFemale", false}, + {&TRL.Through.Z0, "TRL/Through/Z0", 50.0}, {&TRL.Reflection.isShort, "TRL/Reflect/isShort", false}, {&TRL.Line.delay, "TRL/Line/Delay", 74.0}, diff --git a/Software/PC_Application/Calibration/calkitdialog.cpp b/Software/PC_Application/Calibration/calkitdialog.cpp index 2687411..a76921b 100644 --- a/Software/PC_Application/Calibration/calkitdialog.cpp +++ b/Software/PC_Application/Calibration/calkitdialog.cpp @@ -47,6 +47,29 @@ CalkitDialog::CalkitDialog(Calkit &c, QWidget *parent) : ui->load_parC->setPrefixes("fpnum "); ui->load_serL->setUnit("H"); ui->load_serL->setPrefixes("fpnum "); + + // Same setup for female standards + ui->OpenType_f->setId(ui->open_coefficients_f, 0); + ui->OpenType_f->setId(ui->open_measurement_f, 1); + + ui->ShortType_f->setId(ui->short_coefficients_f, 0); + ui->ShortType_f->setId(ui->short_measurement_f, 1); + + ui->LoadType_f->setId(ui->load_coefficients_f, 0); + ui->LoadType_f->setId(ui->load_measurement_f, 1); + + ui->open_touchstone_f->setPorts(1); + ui->short_touchstone_f->setPorts(1); + ui->load_touchstone_f->setPorts(1); + + ui->short_Z0_f->setUnit("Ω"); + ui->open_Z0_f->setUnit("Ω"); + ui->load_Z0_f->setUnit("Ω"); + ui->load_parC_f->setUnit("F"); + ui->load_parC_f->setPrefixes("fpnum "); + ui->load_serL_f->setUnit("H"); + ui->load_serL_f->setPrefixes("fpnum "); + ui->through_Z0->setUnit("Ω"); ui->TRL_through_Z0->setUnit("Ω"); @@ -59,6 +82,24 @@ CalkitDialog::CalkitDialog(Calkit &c, QWidget *parent) : editKit.clearTouchstoneCache(); ownKit = editKit; + + connect(ui->cbStandardDefinition, qOverload(&QComboBox::currentIndexChanged), [=](int index){ + if (index == 0) { + // common definition, hide tab bars, set all to male tab + ui->mf_short->setCurrentIndex(0); + ui->mf_short->tabBar()->hide(); + ui->mf_open->setCurrentIndex(0); + ui->mf_open->tabBar()->hide(); + ui->mf_load->setCurrentIndex(0); + ui->mf_load->tabBar()->hide(); + } else { + // separate definitions for male/female standards + ui->mf_short->tabBar()->show(); + ui->mf_open->tabBar()->show(); + ui->mf_load->tabBar()->show(); + } + }); + updateEntries(); connect(ui->TRL_line_min, &SIUnitEdit::valueChanged, [=](double newval){ @@ -85,6 +126,15 @@ CalkitDialog::CalkitDialog(Calkit &c, QWidget *parent) : if(ui->load_measurement->isChecked() && !ui->load_touchstone->getStatus()) { ok = false; } + if(ui->open_measurement_f->isChecked() && !ui->open_touchstone_f->getStatus()) { + ok = false; + } + if(ui->short_measurement_f->isChecked() && !ui->short_touchstone_f->getStatus()) { + ok = false; + } + if(ui->load_measurement_f->isChecked() && !ui->load_touchstone_f->getStatus()) { + ok = false; + } if(ui->through_measurement->isChecked() && !ui->through_touchstone->getStatus()) { ok = false; } @@ -95,6 +145,9 @@ CalkitDialog::CalkitDialog(Calkit &c, QWidget *parent) : connect(ui->open_touchstone, &TouchstoneImport::statusChanged, UpdateStatus); connect(ui->short_touchstone, &TouchstoneImport::statusChanged, UpdateStatus); connect(ui->load_touchstone, &TouchstoneImport::statusChanged, UpdateStatus); + connect(ui->open_touchstone_f, &TouchstoneImport::statusChanged, UpdateStatus); + connect(ui->short_touchstone_f, &TouchstoneImport::statusChanged, UpdateStatus); + connect(ui->load_touchstone_f, &TouchstoneImport::statusChanged, UpdateStatus); connect(ui->through_touchstone, &TouchstoneImport::statusChanged, UpdateStatus); connect(ui->OpenType, qOverload(&QButtonGroup::buttonClicked), [=](int) { @@ -106,6 +159,15 @@ CalkitDialog::CalkitDialog(Calkit &c, QWidget *parent) : connect(ui->LoadType, qOverload(&QButtonGroup::buttonClicked), [=](int) { UpdateStatus(); }); + connect(ui->OpenType_f, qOverload(&QButtonGroup::buttonClicked), [=](int) { + UpdateStatus(); + }); + connect(ui->ShortType_f, qOverload(&QButtonGroup::buttonClicked), [=](int) { + UpdateStatus(); + }); + connect(ui->LoadType_f, qOverload(&QButtonGroup::buttonClicked), [=](int) { + UpdateStatus(); + }); connect(ui->ThroughType, qOverload(&QButtonGroup::buttonClicked), [=](int) { UpdateStatus(); }); @@ -152,49 +214,83 @@ void CalkitDialog::parseEntries() ownKit.description = ui->description->toPlainText(); // type - ownKit.SOLT.Open.useMeasurements = ui->open_measurement->isChecked(); - ownKit.SOLT.Short.useMeasurements = ui->short_measurement->isChecked(); - ownKit.SOLT.Load.useMeasurements = ui->load_measurement->isChecked(); + ownKit.SOLT.open_m.useMeasurements = ui->open_measurement->isChecked(); + ownKit.SOLT.short_m.useMeasurements = ui->short_measurement->isChecked(); + ownKit.SOLT.load_m.useMeasurements = ui->load_measurement->isChecked(); + ownKit.SOLT.open_f.useMeasurements = ui->open_measurement_f->isChecked(); + ownKit.SOLT.short_f.useMeasurements = ui->short_measurement_f->isChecked(); + ownKit.SOLT.load_f.useMeasurements = ui->load_measurement_f->isChecked(); ownKit.SOLT.Through.useMeasurements = ui->through_measurement->isChecked(); // coefficients - ownKit.SOLT.Open.Z0 = ui->open_Z0->value(); - ownKit.SOLT.Open.delay = ui->open_delay->value(); - ownKit.SOLT.Open.loss = ui->open_loss->value(); - ownKit.SOLT.Open.C0 = ui->open_C0->value(); - ownKit.SOLT.Open.C1 = ui->open_C1->value(); - ownKit.SOLT.Open.C2 = ui->open_C2->value(); - ownKit.SOLT.Open.C3 = ui->open_C3->value(); + ownKit.SOLT.open_m.Z0 = ui->open_Z0->value(); + ownKit.SOLT.open_m.delay = ui->open_delay->value(); + ownKit.SOLT.open_m.loss = ui->open_loss->value(); + ownKit.SOLT.open_m.C0 = ui->open_C0->value(); + ownKit.SOLT.open_m.C1 = ui->open_C1->value(); + ownKit.SOLT.open_m.C2 = ui->open_C2->value(); + ownKit.SOLT.open_m.C3 = ui->open_C3->value(); - ownKit.SOLT.Short.Z0 = ui->short_Z0->value(); - ownKit.SOLT.Short.delay = ui->short_delay->value(); - ownKit.SOLT.Short.loss = ui->short_loss->value(); - ownKit.SOLT.Short.L0 = ui->short_L0->value(); - ownKit.SOLT.Short.L1 = ui->short_L1->value(); - ownKit.SOLT.Short.L2 = ui->short_L2->value(); - ownKit.SOLT.Short.L3 = ui->short_L3->value(); + ownKit.SOLT.short_m.Z0 = ui->short_Z0->value(); + ownKit.SOLT.short_m.delay = ui->short_delay->value(); + ownKit.SOLT.short_m.loss = ui->short_loss->value(); + ownKit.SOLT.short_m.L0 = ui->short_L0->value(); + ownKit.SOLT.short_m.L1 = ui->short_L1->value(); + ownKit.SOLT.short_m.L2 = ui->short_L2->value(); + ownKit.SOLT.short_m.L3 = ui->short_L3->value(); - ownKit.SOLT.Load.Z0 = ui->load_Z0->value(); - ownKit.SOLT.Load.delay = ui->load_delay->value(); - ownKit.SOLT.Load.Cparallel = ui->load_parC->value(); - ownKit.SOLT.Load.Lseries = ui->load_serL->value(); + ownKit.SOLT.load_m.Z0 = ui->load_Z0->value(); + ownKit.SOLT.load_m.delay = ui->load_delay->value(); + ownKit.SOLT.load_m.Cparallel = ui->load_parC->value(); + ownKit.SOLT.load_m.Lseries = ui->load_serL->value(); + + ownKit.SOLT.open_f.Z0 = ui->open_Z0_f->value(); + ownKit.SOLT.open_f.delay = ui->open_delay_f->value(); + ownKit.SOLT.open_f.loss = ui->open_loss_f->value(); + ownKit.SOLT.open_f.C0 = ui->open_C0_f->value(); + ownKit.SOLT.open_f.C1 = ui->open_C1_f->value(); + ownKit.SOLT.open_f.C2 = ui->open_C2_f->value(); + ownKit.SOLT.open_f.C3 = ui->open_C3_f->value(); + + ownKit.SOLT.short_f.Z0 = ui->short_Z0_f->value(); + ownKit.SOLT.short_f.delay = ui->short_delay_f->value(); + ownKit.SOLT.short_f.loss = ui->short_loss_f->value(); + ownKit.SOLT.short_f.L0 = ui->short_L0_f->value(); + ownKit.SOLT.short_f.L1 = ui->short_L1_f->value(); + ownKit.SOLT.short_f.L2 = ui->short_L2_f->value(); + ownKit.SOLT.short_f.L3 = ui->short_L3_f->value(); + + ownKit.SOLT.load_f.Z0 = ui->load_Z0_f->value(); + ownKit.SOLT.load_f.delay = ui->load_delay_f->value(); + ownKit.SOLT.load_f.Cparallel = ui->load_parC_f->value(); + ownKit.SOLT.load_f.Lseries = ui->load_serL_f->value(); ownKit.SOLT.Through.Z0 = ui->through_Z0->value(); ownKit.SOLT.Through.delay = ui->through_delay->value(); ownKit.SOLT.Through.loss = ui->through_loss->value(); + ownKit.SOLT.separate_male_female = ui->cbStandardDefinition->currentIndex() == 1; + // file - ownKit.SOLT.Open.file = ui->open_touchstone->getFilename(); - ownKit.SOLT.Short.file = ui->short_touchstone->getFilename(); - ownKit.SOLT.Load.file = ui->load_touchstone->getFilename(); + ownKit.SOLT.open_m.file = ui->open_touchstone->getFilename(); + ownKit.SOLT.short_m.file = ui->short_touchstone->getFilename(); + ownKit.SOLT.load_m.file = ui->load_touchstone->getFilename(); ownKit.SOLT.Through.file = ui->through_touchstone->getFilename(); - ownKit.SOLT.Open.Sparam = ui->open_touchstone->getPorts()[0]; - ownKit.SOLT.Short.Sparam = ui->short_touchstone->getPorts()[0]; - ownKit.SOLT.Load.Sparam = ui->load_touchstone->getPorts()[0]; + ownKit.SOLT.open_m.Sparam = ui->open_touchstone->getPorts()[0]; + ownKit.SOLT.short_m.Sparam = ui->short_touchstone->getPorts()[0]; + ownKit.SOLT.load_m.Sparam = ui->load_touchstone->getPorts()[0]; ownKit.SOLT.Through.Sparam1 = ui->through_touchstone->getPorts()[0]; ownKit.SOLT.Through.Sparam2 = ui->through_touchstone->getPorts()[1]; + ownKit.SOLT.open_f.file = ui->open_touchstone_f->getFilename(); + ownKit.SOLT.short_f.file = ui->short_touchstone_f->getFilename(); + ownKit.SOLT.load_f.file = ui->load_touchstone_f->getFilename(); + + ownKit.SOLT.open_f.Sparam = ui->open_touchstone_f->getPorts()[0]; + ownKit.SOLT.short_f.Sparam = ui->short_touchstone_f->getPorts()[0]; + ownKit.SOLT.load_f.Sparam = ui->load_touchstone_f->getPorts()[0]; + // TRL ownKit.TRL.Through.Z0 = ui->TRL_through_Z0->value(); ownKit.TRL.Reflection.isShort = ui->TRL_R_short->isChecked(); @@ -212,70 +308,124 @@ void CalkitDialog::updateEntries() ui->description->setPlainText(ownKit.description); // Coefficients - ui->open_Z0->setValueQuiet(ownKit.SOLT.Open.Z0); - ui->open_delay->setValueQuiet(ownKit.SOLT.Open.delay); - ui->open_loss->setValueQuiet(ownKit.SOLT.Open.loss); - ui->open_C0->setValueQuiet(ownKit.SOLT.Open.C0); - ui->open_C1->setValueQuiet(ownKit.SOLT.Open.C1); - ui->open_C2->setValueQuiet(ownKit.SOLT.Open.C2); - ui->open_C3->setValueQuiet(ownKit.SOLT.Open.C3); + ui->open_Z0->setValueQuiet(ownKit.SOLT.open_m.Z0); + ui->open_delay->setValueQuiet(ownKit.SOLT.open_m.delay); + ui->open_loss->setValueQuiet(ownKit.SOLT.open_m.loss); + ui->open_C0->setValueQuiet(ownKit.SOLT.open_m.C0); + ui->open_C1->setValueQuiet(ownKit.SOLT.open_m.C1); + ui->open_C2->setValueQuiet(ownKit.SOLT.open_m.C2); + ui->open_C3->setValueQuiet(ownKit.SOLT.open_m.C3); - ui->short_Z0->setValueQuiet(ownKit.SOLT.Short.Z0); - ui->short_delay->setValueQuiet(ownKit.SOLT.Short.delay); - ui->short_loss->setValueQuiet(ownKit.SOLT.Short.loss); - ui->short_L0->setValueQuiet(ownKit.SOLT.Short.L0); - ui->short_L1->setValueQuiet(ownKit.SOLT.Short.L1); - ui->short_L2->setValueQuiet(ownKit.SOLT.Short.L2); - ui->short_L3->setValueQuiet(ownKit.SOLT.Short.L3); + ui->short_Z0->setValueQuiet(ownKit.SOLT.short_m.Z0); + ui->short_delay->setValueQuiet(ownKit.SOLT.short_m.delay); + ui->short_loss->setValueQuiet(ownKit.SOLT.short_m.loss); + ui->short_L0->setValueQuiet(ownKit.SOLT.short_m.L0); + ui->short_L1->setValueQuiet(ownKit.SOLT.short_m.L1); + ui->short_L2->setValueQuiet(ownKit.SOLT.short_m.L2); + ui->short_L3->setValueQuiet(ownKit.SOLT.short_m.L3); - ui->load_Z0->setValueQuiet(ownKit.SOLT.Load.Z0); - ui->load_delay->setValueQuiet(ownKit.SOLT.Load.delay); - ui->load_parC->setValueQuiet(ownKit.SOLT.Load.Cparallel); - ui->load_serL->setValueQuiet(ownKit.SOLT.Load.Lseries); + ui->load_Z0->setValueQuiet(ownKit.SOLT.load_m.Z0); + ui->load_delay->setValueQuiet(ownKit.SOLT.load_m.delay); + ui->load_parC->setValueQuiet(ownKit.SOLT.load_m.Cparallel); + ui->load_serL->setValueQuiet(ownKit.SOLT.load_m.Lseries); + + ui->open_Z0_f->setValueQuiet(ownKit.SOLT.open_f.Z0); + ui->open_delay_f->setValueQuiet(ownKit.SOLT.open_f.delay); + ui->open_loss_f->setValueQuiet(ownKit.SOLT.open_f.loss); + ui->open_C0_f->setValueQuiet(ownKit.SOLT.open_f.C0); + ui->open_C1_f->setValueQuiet(ownKit.SOLT.open_f.C1); + ui->open_C2_f->setValueQuiet(ownKit.SOLT.open_f.C2); + ui->open_C3_f->setValueQuiet(ownKit.SOLT.open_f.C3); + + ui->short_Z0_f->setValueQuiet(ownKit.SOLT.short_f.Z0); + ui->short_delay_f->setValueQuiet(ownKit.SOLT.short_f.delay); + ui->short_loss_f->setValueQuiet(ownKit.SOLT.short_f.loss); + ui->short_L0_f->setValueQuiet(ownKit.SOLT.short_f.L0); + ui->short_L1_f->setValueQuiet(ownKit.SOLT.short_f.L1); + ui->short_L2_f->setValueQuiet(ownKit.SOLT.short_f.L2); + ui->short_L3_f->setValueQuiet(ownKit.SOLT.short_f.L3); + + ui->load_Z0_f->setValueQuiet(ownKit.SOLT.load_f.Z0); + ui->load_delay_f->setValueQuiet(ownKit.SOLT.load_f.delay); + ui->load_parC_f->setValueQuiet(ownKit.SOLT.load_f.Cparallel); + ui->load_serL_f->setValueQuiet(ownKit.SOLT.load_f.Lseries); ui->through_Z0->setValueQuiet(ownKit.SOLT.Through.Z0); ui->through_delay->setValueQuiet(ownKit.SOLT.Through.delay); ui->through_loss->setValueQuiet(ownKit.SOLT.Through.loss); // Measurements - ui->open_touchstone->setFile(ownKit.SOLT.Open.file); - ui->open_touchstone->selectPort(0, ownKit.SOLT.Open.Sparam); + ui->open_touchstone->setFile(ownKit.SOLT.open_m.file); + ui->open_touchstone->selectPort(0, ownKit.SOLT.open_m.Sparam); - ui->short_touchstone->setFile(ownKit.SOLT.Short.file); - ui->short_touchstone->selectPort(0, ownKit.SOLT.Short.Sparam); + ui->short_touchstone->setFile(ownKit.SOLT.short_m.file); + ui->short_touchstone->selectPort(0, ownKit.SOLT.short_m.Sparam); - ui->load_touchstone->setFile(ownKit.SOLT.Load.file); - ui->load_touchstone->selectPort(0, ownKit.SOLT.Load.Sparam); + ui->load_touchstone->setFile(ownKit.SOLT.load_m.file); + ui->load_touchstone->selectPort(0, ownKit.SOLT.load_m.Sparam); + + ui->open_touchstone_f->setFile(ownKit.SOLT.open_f.file); + ui->open_touchstone_f->selectPort(0, ownKit.SOLT.open_f.Sparam); + + ui->short_touchstone_f->setFile(ownKit.SOLT.short_f.file); + ui->short_touchstone_f->selectPort(0, ownKit.SOLT.short_f.Sparam); + + ui->load_touchstone_f->setFile(ownKit.SOLT.load_f.file); + ui->load_touchstone_f->selectPort(0, ownKit.SOLT.load_f.Sparam); ui->through_touchstone->setFile(ownKit.SOLT.Through.file); ui->through_touchstone->selectPort(0, ownKit.SOLT.Through.Sparam1); ui->through_touchstone->selectPort(1, ownKit.SOLT.Through.Sparam2); // Type - if (ownKit.SOLT.Open.useMeasurements) { + if (ownKit.SOLT.open_m.useMeasurements) { ui->open_measurement->click(); } else { ui->open_coefficients->click(); } - if (ownKit.SOLT.Short.useMeasurements) { + if (ownKit.SOLT.short_m.useMeasurements) { ui->short_measurement->click(); } else { ui->short_coefficients->click(); } - if (ownKit.SOLT.Load.useMeasurements) { + if (ownKit.SOLT.load_m.useMeasurements) { ui->load_measurement->click(); } else { ui->load_coefficients->click(); } + if (ownKit.SOLT.open_f.useMeasurements) { + ui->open_measurement_f->click(); + } else { + ui->open_coefficients_f->click(); + } + + if (ownKit.SOLT.short_f.useMeasurements) { + ui->short_measurement_f->click(); + } else { + ui->short_coefficients_f->click(); + } + + if (ownKit.SOLT.load_f.useMeasurements) { + ui->load_measurement_f->click(); + } else { + ui->load_coefficients_f->click(); + } + if (ownKit.SOLT.Through.useMeasurements) { ui->through_measurement->click(); } else { ui->through_coefficients->click(); } + if (ownKit.SOLT.separate_male_female) { + ui->cbStandardDefinition->setCurrentIndex(1); + } else { + ui->cbStandardDefinition->setCurrentIndex(0); + } + // TRL ui->TRL_through_Z0->setValueQuiet(ownKit.TRL.Through.Z0); if(ownKit.TRL.Reflection.isShort) { diff --git a/Software/PC_Application/Calibration/calkitdialog.h b/Software/PC_Application/Calibration/calkitdialog.h index b06e073..a8b02b5 100644 --- a/Software/PC_Application/Calibration/calkitdialog.h +++ b/Software/PC_Application/Calibration/calkitdialog.h @@ -20,7 +20,7 @@ public: explicit CalkitDialog(Calkit &c, QWidget *parent = nullptr); ~CalkitDialog(); -private: +private: void parseEntries(); void updateEntries(); Ui::CalkitDialog *ui; diff --git a/Software/PC_Application/Calibration/calkitdialog.ui b/Software/PC_Application/Calibration/calkitdialog.ui index b904fea..a85820d 100644 --- a/Software/PC_Application/Calibration/calkitdialog.ui +++ b/Software/PC_Application/Calibration/calkitdialog.ui @@ -9,8 +9,8 @@ 0 0 - 1141 - 602 + 1213 + 626 @@ -28,7 +28,7 @@ false - + @@ -93,512 +93,945 @@ SOLT - + - + - - - - 16 - - - - Short - - - Qt::AlignCenter - - - - - + - - - Coefficients - - - ShortType - - - - - - - Measurement file - - - ShortType - - - - - - - - - 0 - - - + - - - + + + Standard definition: + + + + + + + 1 + + + + Use one common definition for open/short/load standard + + + + + Use separate male/female definitions for open/short/load standard + + + + + + + + + + + + + + + 16 + + - Offset delay [ps]: + Short + + + Qt::AlignCenter - - + + + + 1 + + + + Male + + + + + + + + Coefficients + + + ShortType + + + + + + + Measurement file + + + ShortType + + + + + + + + + 0 + + + + + + + + + Offset delay [ps]: + + + + + + + + + + Offset loss [GΩ/s]: + + + + + + + + + + <html><head/><body><p>L0 [10<span style=" vertical-align:super;">-12</span>H]:</p></body></html> + + + + + + + + + + <html><head/><body><p>L1 [10<span style=" vertical-align:super;">-24</span>H/Hz]:</p></body></html> + + + + + + + + + + <html><head/><body><p>L2 [10<span style=" vertical-align:super;">-33</span>H/Hz<span style=" vertical-align:super;">2</span>]:</p></body></html> + + + + + + + + + + <html><head/><body><p>L3 [10<span style=" vertical-align:super;">-42</span>H/Hz<span style=" vertical-align:super;">3</span>]:</p></body></html> + + + + + + + + + + true + + + + + + + Z0: + + + + + + + + + + + + + + + + + + + + + Female + + + + + + + + Coefficients + + + ShortType_f + + + + + + + Measurement file + + + ShortType_f + + + + + + + + + 0 + + + + + + + + + Offset delay [ps]: + + + + + + + + + + Offset loss [GΩ/s]: + + + + + + + + + + <html><head/><body><p>L0 [10<span style=" vertical-align:super;">-12</span>H]:</p></body></html> + + + + + + + + + + <html><head/><body><p>L1 [10<span style=" vertical-align:super;">-24</span>H/Hz]:</p></body></html> + + + + + + + + + + <html><head/><body><p>L2 [10<span style=" vertical-align:super;">-33</span>H/Hz<span style=" vertical-align:super;">2</span>]:</p></body></html> + + + + + + + + + + <html><head/><body><p>L3 [10<span style=" vertical-align:super;">-42</span>H/Hz<span style=" vertical-align:super;">3</span>]:</p></body></html> + + + + + + + + + + true + + + + + + + Z0: + + + + + + + + + + + + + + + + + + + - - + + + + + + Qt::Vertical + + + + + + + + + + 16 + + - Offset loss [GΩ/s]: + Open + + + Qt::AlignCenter - - + + + + 1 + + + + Male + + + + + + + + Coefficients + + + OpenType + + + + + + + Measurement file + + + OpenType + + + + + + + + + 0 + + + + + + + + + Offset delay [ps]: + + + + + + + + + + Offset loss [GΩ/s]: + + + + + + + + + + C0 [10<sup>-15</sup>F]: + + + + + + + + + + C1 [10<sup>-27</sup>F/Hz]: + + + + + + + + + + C2 [10<sup>-36</sup>F/Hz<sup>2</sup>]: + + + + + + + + + + <html><head/><body><p>C3 [10<span style=" vertical-align:super;">-45</span>F/Hz<span style=" vertical-align:super;">3</span>]:</p></body></html> + + + + + + + + + + true + + + + + + + Z0: + + + + + + + + + + + + + + + + + + + + + Female + + + + + + + + Coefficients + + + OpenType_f + + + + + + + Measurement file + + + OpenType_f + + + + + + + + + 0 + + + + + + + + + Offset delay [ps]: + + + + + + + + + + Offset loss [GΩ/s]: + + + + + + + + + + C0 [10<sup>-15</sup>F]: + + + + + + + + + + C1 [10<sup>-27</sup>F/Hz]: + + + + + + + + + + C2 [10<sup>-36</sup>F/Hz<sup>2</sup>]: + + + + + + + + + + <html><head/><body><p>C3 [10<span style=" vertical-align:super;">-45</span>F/Hz<span style=" vertical-align:super;">3</span>]:</p></body></html> + + + + + + + + + + true + + + + + + + Z0: + + + + + + + + + + + + + + + + + + + - - + + + + + + Qt::Vertical + + + + + + + + + + 16 + + - <html><head/><body><p>L0 [10<span style=" vertical-align:super;">-12</span>H]:</p></body></html> + Load + + + Qt::AlignCenter - - - - - - - <html><head/><body><p>L1 [10<span style=" vertical-align:super;">-24</span>H/Hz]:</p></body></html> - - - - - - - - - - <html><head/><body><p>L2 [10<span style=" vertical-align:super;">-33</span>H/Hz<span style=" vertical-align:super;">2</span>]:</p></body></html> - - - - - - - - - - <html><head/><body><p>L3 [10<span style=" vertical-align:super;">-42</span>H/Hz<span style=" vertical-align:super;">3</span>]:</p></body></html> - - - - - - - - - - true - - - - - - - Z0: + + + + 1 + + + Male + + + + + + + + Coefficients + + + LoadType + + + + + + + Measurement file + + + LoadType + + + + + + + + + 0 + + + + + + + + + Z0: + + + + + + + true + + + + + + + Offset delay [ps]: + + + + + + + + + + Parallel C: + + + + + + + + + + Series L: + + + + + + + + + + + + + + + + + + + + + + + + Female + + + + + + + + Coefficients + + + LoadType_f + + + + + + + Measurement file + + + LoadType_f + + + + + + + + + 0 + + + + + + + + + Z0: + + + + + + + true + + + + + + + Offset delay [ps]: + + + + + + + + + + Parallel C: + + + + + + + + + + Series L: + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - Qt::Vertical - - - - - - - - - - 16 - - - - Open - - - Qt::AlignCenter - - - - - - - - - Coefficients - - - OpenType - - - - - - - Measurement file - - - OpenType - - - - - 0 - - - - - - - - - Offset delay [ps]: - - - - - - - - - - Offset loss [GΩ/s]: - - - - - - - - - - C0 [10<sup>-15</sup>F]: - - - - - - - - - - C1 [10<sup>-27</sup>F/Hz]: - - - - - - - - - - C2 [10<sup>-36</sup>F/Hz<sup>2</sup>]: - - - - - - - - - - <html><head/><body><p>C3 [10<span style=" vertical-align:super;">-45</span>F/Hz<span style=" vertical-align:super;">3</span>]:</p></body></html> - - - - - - - - - - true - - - - - - - Z0: - - - - - - - - - - - - - - - - - - - - - - Qt::Vertical - - - - - - - - - - 16 - - - - Load - - - Qt::AlignCenter + + + Qt::Vertical - + - - - Coefficients + + + + 16 + + + + Through + + + Qt::AlignCenter - - LoadType - - - - Measurement file + + + + + Coefficients + + + ThroughType + + + + + + + Measurement file + + + ThroughType + + + + + + + + + 0 - - LoadType - + + + + + + + + Z0: + + + + + + + false + + + + + + + Delay [ps]: + + + + + + + + + + Loss [GΩ/s]: + + + + + + + + + + + + + + + + + - - - - 0 - - - - - - - - - Z0: - - - - - - - true - - - - - - - Offset delay [ps]: - - - - - - - - - - Parallel C: - - - - - - - Series L: - - - - - - - - - - - - - - - - - - - - - - - - - - - - Qt::Vertical - - - - - - - - - - 16 - - - - Through - - - Qt::AlignCenter - - - - - - - - - Coefficients - - - ThroughType - - - - - - - Measurement file - - - ThroughType - - - - - - - - - 0 - - - - - - - - - Z0: - - - - - - - false - - - - - - - Delay [ps]: - - - - - - - - - - Loss [GΩ/s]: - - - - - - - - - - - - - - - - - - - @@ -607,7 +1040,7 @@ TRL - + @@ -867,19 +1300,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -986,12 +1406,63 @@ + + ShortType_f + buttonClicked(int) + short_stack_f + setCurrentIndex(int) + + + -1 + -1 + + + 165 + 442 + + + + + OpenType_f + buttonClicked(int) + open_stack_f + setCurrentIndex(int) + + + -1 + -1 + + + 466 + 442 + + + + + LoadType_f + buttonClicked(int) + load_stack_f + setCurrentIndex(int) + + + -1 + -1 + + + 767 + 442 + + + - - - + + + + + +