diff --git a/Software/PC_Application/Application.pro b/Software/PC_Application/Application.pro index 9a06d93..78a74e9 100644 --- a/Software/PC_Application/Application.pro +++ b/Software/PC_Application/Application.pro @@ -78,7 +78,6 @@ HEADERS += \ Traces/Math/parser/utGeneric.h \ Traces/Math/tdr.h \ Traces/Math/tracemath.h \ - Traces/Math/tracematheditdialog.h \ Traces/Math/windowfunction.h \ Traces/fftcomplex.h \ Traces/markerwidget.h \ @@ -184,7 +183,6 @@ SOURCES += \ Traces/Math/parser/mpVariable.cpp \ Traces/Math/tdr.cpp \ Traces/Math/tracemath.cpp \ - Traces/Math/tracematheditdialog.cpp \ Traces/Math/windowfunction.cpp \ Traces/fftcomplex.cpp \ Traces/markerwidget.cpp \ @@ -246,7 +244,6 @@ FORMS += \ Traces/Math/newtracemathdialog.ui \ Traces/Math/tdrdialog.ui \ Traces/Math/tdrexplanationwidget.ui \ - Traces/Math/tracematheditdialog.ui \ Traces/markerwidget.ui \ Traces/smithchartdialog.ui \ Traces/tracecsvexport.ui \ diff --git a/Software/PC_Application/Traces/Math/tracematheditdialog.cpp b/Software/PC_Application/Traces/Math/tracematheditdialog.cpp deleted file mode 100644 index 809cd11..0000000 --- a/Software/PC_Application/Traces/Math/tracematheditdialog.cpp +++ /dev/null @@ -1,200 +0,0 @@ -#include "tracematheditdialog.h" -#include "ui_tracematheditdialog.h" -#include - -#include "ui_newtracemathdialog.h" -namespace Ui { -class NewTraceMathDialog; -} - -#include "medianfilter.h" - -TraceMathEditDialog::TraceMathEditDialog(Trace &t, QWidget *parent) : - QDialog(parent), - ui(new Ui::TraceMathEditDialog) -{ - auto model = new MathModel(t); - ui->setupUi(this); - ui->view->setModel(model); - - QHeaderView *headerView = ui->view->horizontalHeader(); - headerView->setSectionResizeMode(MathModel::ColIndexDescription, QHeaderView::Stretch); - headerView->setSectionResizeMode(MathModel::ColIndexStatus, QHeaderView::ResizeToContents); - headerView->setSectionResizeMode(MathModel::ColIndexDomain, QHeaderView::ResizeToContents); - - connect(ui->view->selectionModel(), &QItemSelectionModel::currentRowChanged, [=](const QModelIndex ¤t, const QModelIndex &previous){ - Q_UNUSED(previous) - if(!current.isValid()) { - ui->bDelete->setEnabled(false); - ui->bMoveUp->setEnabled(false); - ui->bMoveDown->setEnabled(false); - } else { - ui->bDelete->setEnabled(true); - ui->bMoveUp->setEnabled(current.row() > 1); - ui->bMoveDown->setEnabled(current.row() + 1 < model->rowCount()); - } - }); - - connect(ui->view, &QTableView::doubleClicked, [&](const QModelIndex &index) { - if(index.isValid()) { - auto math = t.getMathOperations().at(index.row()).math; - math->edit(); - } - }); - - connect(ui->bAdd, &QPushButton::clicked, [=](){ - auto d = new QDialog(); - auto ui = new Ui::NewTraceMathDialog(); - ui->setupUi(d); - for(int i = 0; i < (int) TraceMath::Type::Last;i++) { - auto info = TraceMath::getInfo(static_cast(i)); - ui->list->addItem(info.name); - if(!info.explanationWidget) { - info.explanationWidget = new QWidget(); - } - ui->stack->addWidget(info.explanationWidget); - } - // always show the widget for the selected function - connect(ui->list, &QListWidget::currentRowChanged, ui->stack, &QStackedWidget::setCurrentIndex); - - connect(ui->list, &QListWidget::doubleClicked, ui->buttonBox, &QDialogButtonBox::accepted); - connect(ui->buttonBox, &QDialogButtonBox::accepted, [=](){ - auto newMath = TraceMath::createMath(static_cast(ui->list->currentRow())); - if(newMath) { - model->addOperation(newMath); - } - }); - ui->list->setCurrentRow(0); - ui->stack->setCurrentIndex(0); - - d->show(); - }); - connect(ui->bDelete, &QPushButton::clicked, [=](){ - model->deleteRow(ui->view->currentIndex().row()); - }); - connect(ui->bMoveUp, &QPushButton::clicked, [&](){ - auto index = ui->view->currentIndex(); - t.swapMathOrder(index.row() - 1); - ui->view->setCurrentIndex(index.sibling(index.row() - 1, 0)); - }); - connect(ui->bMoveDown, &QPushButton::clicked, [&](){ - auto index = ui->view->currentIndex(); - t.swapMathOrder(index.row()); - ui->view->setCurrentIndex(index.sibling(index.row() + 1, 0)); - }); -} - -TraceMathEditDialog::~TraceMathEditDialog() -{ - delete ui; -} - -MathModel::MathModel(Trace &t, QObject *parent) - : QAbstractTableModel(parent), - t(t) -{ - -} - -int MathModel::rowCount(const QModelIndex &parent) const -{ - Q_UNUSED(parent); - return t.getMathOperations().size(); -} - -int MathModel::columnCount(const QModelIndex &parent) const -{ - Q_UNUSED(parent); - return ColIndexLast; -} - -QVariant MathModel::data(const QModelIndex &index, int role) const -{ - if(!index.isValid()) { - return QVariant(); - } - auto math = t.getMathOperations().at(index.row()); - switch(index.column()) { - case ColIndexStatus: - if(role == Qt::DecorationRole) { - switch(math.math->getStatus()) { - case TraceMath::Status::Ok: - return QApplication::style()->standardIcon(QStyle::SP_DialogApplyButton); - case TraceMath::Status::Warning: - return QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning); - case TraceMath::Status::Error: - return QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical); - } - } else if(role == Qt::ToolTipRole) { - if(math.math->getStatus() != TraceMath::Status::Ok) { - return math.math->getStatusDescription(); - } - } - break; - case ColIndexDescription: - if(role == Qt::DisplayRole) { - return math.math->description(); - } -// else if(role == Qt::CheckStateRole){ -// return math.enabled ? Qt::Checked : Qt::Unchecked; -// } - break; - case ColIndexDomain: - if(role == Qt::DisplayRole) { - switch(math.math->getDataType()) { - case TraceMath::DataType::Time: - return "Time"; - case TraceMath::DataType::Frequency: - return "Frequency"; - case TraceMath::DataType::Invalid: - return "Invalid"; - } - } - } - return QVariant(); -} - -QVariant MathModel::headerData(int section, Qt::Orientation orientation, int role) const -{ - if(orientation == Qt::Horizontal && role == Qt::DisplayRole) { - switch(section) { - case ColIndexStatus: return "Status"; break; - case ColIndexDescription: return "Description"; break; - case ColIndexDomain: return "Output domain"; break; - default: break; - } - } - return QVariant(); -} - -Qt::ItemFlags MathModel::flags(const QModelIndex &index) const -{ - int flags = Qt::NoItemFlags; - if(index.row() >= 1) { - // the first entry is always the trace itself and not enabled - flags |= Qt::ItemIsEnabled | Qt::ItemIsSelectable; - } -// switch(index.column()) { -// case ColIndexDescription: flags |= Qt::ItemIsUserCheckable; break; -// default: -// break; -// } - return (Qt::ItemFlags) flags; -} - -void MathModel::addOperation(TraceMath *math) -{ - beginInsertRows(QModelIndex(), t.getMathOperations().size(), t.getMathOperations().size()); - t.addMathOperation(math); - endInsertRows(); - // open the editor for the newly added operation - math->edit(); -} - -void MathModel::deleteRow(unsigned int row) -{ - beginRemoveRows(QModelIndex(), row, row); - t.removeMathOperation(row); - endRemoveRows(); -} - diff --git a/Software/PC_Application/Traces/Math/tracematheditdialog.h b/Software/PC_Application/Traces/Math/tracematheditdialog.h deleted file mode 100644 index 4f0f54e..0000000 --- a/Software/PC_Application/Traces/Math/tracematheditdialog.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef TRACEMATHEDITDIALOG_H -#define TRACEMATHEDITDIALOG_H - -#include -#include -#include "Traces/trace.h" - -namespace Ui { -class TraceMathEditDialog; -} - -class MathModel : public QAbstractTableModel -{ - Q_OBJECT -public: - MathModel(Trace &t, QObject *parent = 0); - - enum { - ColIndexStatus = 0, - ColIndexDescription = 1, - ColIndexDomain = 2, - ColIndexLast, - }; - - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - int columnCount(const QModelIndex &parent = QModelIndex()) const override; - QVariant data(const QModelIndex &index, int role) const override; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; - Qt::ItemFlags flags(const QModelIndex &index) const override; - - void addOperation(TraceMath *math); - void deleteRow(unsigned int row); - -private: - Trace &t; -}; - -class TraceMathEditDialog : public QDialog -{ - Q_OBJECT - -public: - explicit TraceMathEditDialog(Trace &t, QWidget *parent = nullptr); - ~TraceMathEditDialog(); - -private: - Ui::TraceMathEditDialog *ui; -}; - -#endif // TRACEMATHEDITDIALOG_H diff --git a/Software/PC_Application/Traces/Math/tracematheditdialog.ui b/Software/PC_Application/Traces/Math/tracematheditdialog.ui deleted file mode 100644 index 4dcff3d..0000000 --- a/Software/PC_Application/Traces/Math/tracematheditdialog.ui +++ /dev/null @@ -1,185 +0,0 @@ - - - TraceMathEditDialog - - - Qt::ApplicationModal - - - - 0 - 0 - 903 - 350 - - - - Math functions - - - true - - - - - - - - Qt::ScrollBarAsNeeded - - - true - - - QAbstractItemView::InternalMove - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - false - - - 20 - - - 70 - - - false - - - false - - - - - - - - - - 0 - 0 - - - - Add - - - - - - - :/icons/add.png:/icons/add.png - - - - - - - false - - - - 0 - 0 - - - - Delete - - - - - - - :/icons/remove.png:/icons/remove.png - - - - - - - false - - - Move up - - - - - - - :/icons/up.png:/icons/up.png - - - - - - - false - - - Move down - - - - - - - :/icons/down.png:/icons/down.png - - - - - - - Qt::Vertical - - - - 18 - 186 - - - - - - - - - - - - QDialogButtonBox::Ok - - - - - - - - - - - buttonBox - accepted() - TraceMathEditDialog - accept() - - - 216 - 280 - - - 216 - 150 - - - - - diff --git a/Software/PC_Application/Traces/traceeditdialog.cpp b/Software/PC_Application/Traces/traceeditdialog.cpp index c504f9d..bfc697d 100644 --- a/Software/PC_Application/Traces/traceeditdialog.cpp +++ b/Software/PC_Application/Traces/traceeditdialog.cpp @@ -2,7 +2,10 @@ #include "ui_traceeditdialog.h" #include #include -#include "Math/tracematheditdialog.h" +#include "ui_newtracemathdialog.h" +namespace Ui { +class NewTraceMathDialog; +} TraceEditDialog::TraceEditDialog(Trace &t, QWidget *parent) : QDialog(parent), @@ -95,12 +98,78 @@ TraceEditDialog::TraceEditDialog(Trace &t, QWidget *parent) : connect(ui->GSource, qOverload(&QButtonGroup::buttonClicked), updateFileStatus); connect(ui->touchstoneImport, &TouchstoneImport::statusChanged, updateFileStatus); connect(ui->touchstoneImport, &TouchstoneImport::filenameChanged, updateFileStatus); - connect(ui->mathSetup, &QPushButton::clicked, [&](){ - auto dialog = new TraceMathEditDialog(t); - dialog->show(); - }); updateFileStatus(); + + // setup math part of the GUI + auto model = new MathModel(t); + ui->view->setModel(model); + + QHeaderView *headerView = ui->view->horizontalHeader(); + headerView->setSectionResizeMode(MathModel::ColIndexDescription, QHeaderView::Stretch); + headerView->setSectionResizeMode(MathModel::ColIndexStatus, QHeaderView::ResizeToContents); + headerView->setSectionResizeMode(MathModel::ColIndexDomain, QHeaderView::ResizeToContents); + + connect(ui->view->selectionModel(), &QItemSelectionModel::currentRowChanged, [=](const QModelIndex ¤t, const QModelIndex &previous){ + Q_UNUSED(previous) + if(!current.isValid()) { + ui->bDelete->setEnabled(false); + ui->bMoveUp->setEnabled(false); + ui->bMoveDown->setEnabled(false); + } else { + ui->bDelete->setEnabled(true); + ui->bMoveUp->setEnabled(current.row() > 1); + ui->bMoveDown->setEnabled(current.row() + 1 < model->rowCount()); + } + }); + + connect(ui->view, &QTableView::doubleClicked, [&](const QModelIndex &index) { + if(index.isValid()) { + auto math = t.getMathOperations().at(index.row()).math; + math->edit(); + } + }); + + connect(ui->bAdd, &QPushButton::clicked, [=](){ + auto d = new QDialog(); + auto ui = new Ui::NewTraceMathDialog(); + ui->setupUi(d); + for(int i = 0; i < (int) TraceMath::Type::Last;i++) { + auto info = TraceMath::getInfo(static_cast(i)); + ui->list->addItem(info.name); + if(!info.explanationWidget) { + info.explanationWidget = new QWidget(); + } + ui->stack->addWidget(info.explanationWidget); + } + // always show the widget for the selected function + connect(ui->list, &QListWidget::currentRowChanged, ui->stack, &QStackedWidget::setCurrentIndex); + + connect(ui->list, &QListWidget::doubleClicked, ui->buttonBox, &QDialogButtonBox::accepted); + connect(ui->buttonBox, &QDialogButtonBox::accepted, [=](){ + auto newMath = TraceMath::createMath(static_cast(ui->list->currentRow())); + if(newMath) { + model->addOperation(newMath); + } + }); + ui->list->setCurrentRow(0); + ui->stack->setCurrentIndex(0); + + d->show(); + }); + connect(ui->bDelete, &QPushButton::clicked, [=](){ + model->deleteRow(ui->view->currentIndex().row()); + }); + connect(ui->bMoveUp, &QPushButton::clicked, [&](){ + auto index = ui->view->currentIndex(); + t.swapMathOrder(index.row() - 1); + ui->view->setCurrentIndex(index.sibling(index.row() - 1, 0)); + }); + connect(ui->bMoveDown, &QPushButton::clicked, [&](){ + auto index = ui->view->currentIndex(); + t.swapMathOrder(index.row()); + ui->view->setCurrentIndex(index.sibling(index.row() + 1, 0)); + }); } TraceEditDialog::~TraceEditDialog() @@ -143,3 +212,113 @@ void TraceEditDialog::on_buttonBox_accepted() } delete this; } + +MathModel::MathModel(Trace &t, QObject *parent) + : QAbstractTableModel(parent), + t(t) +{ + +} + +int MathModel::rowCount(const QModelIndex &parent) const +{ + Q_UNUSED(parent); + return t.getMathOperations().size(); +} + +int MathModel::columnCount(const QModelIndex &parent) const +{ + Q_UNUSED(parent); + return ColIndexLast; +} + +QVariant MathModel::data(const QModelIndex &index, int role) const +{ + if(!index.isValid()) { + return QVariant(); + } + auto math = t.getMathOperations().at(index.row()); + switch(index.column()) { + case ColIndexStatus: + if(role == Qt::DecorationRole) { + switch(math.math->getStatus()) { + case TraceMath::Status::Ok: + return QApplication::style()->standardIcon(QStyle::SP_DialogApplyButton); + case TraceMath::Status::Warning: + return QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning); + case TraceMath::Status::Error: + return QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical); + } + } else if(role == Qt::ToolTipRole) { + if(math.math->getStatus() != TraceMath::Status::Ok) { + return math.math->getStatusDescription(); + } + } + break; + case ColIndexDescription: + if(role == Qt::DisplayRole) { + return math.math->description(); + } +// else if(role == Qt::CheckStateRole){ +// return math.enabled ? Qt::Checked : Qt::Unchecked; +// } + break; + case ColIndexDomain: + if(role == Qt::DisplayRole) { + switch(math.math->getDataType()) { + case TraceMath::DataType::Time: + return "Time"; + case TraceMath::DataType::Frequency: + return "Frequency"; + case TraceMath::DataType::Invalid: + return "Invalid"; + } + } + } + return QVariant(); +} + +QVariant MathModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + if(orientation == Qt::Horizontal && role == Qt::DisplayRole) { + switch(section) { + case ColIndexStatus: return "Status"; break; + case ColIndexDescription: return "Description"; break; + case ColIndexDomain: return "Output domain"; break; + default: break; + } + } + return QVariant(); +} + +Qt::ItemFlags MathModel::flags(const QModelIndex &index) const +{ + int flags = Qt::NoItemFlags; + if(index.row() >= 1) { + // the first entry is always the trace itself and not enabled + flags |= Qt::ItemIsEnabled | Qt::ItemIsSelectable; + } +// switch(index.column()) { +// case ColIndexDescription: flags |= Qt::ItemIsUserCheckable; break; +// default: +// break; +// } + return (Qt::ItemFlags) flags; +} + +void MathModel::addOperation(TraceMath *math) +{ + beginInsertRows(QModelIndex(), t.getMathOperations().size(), t.getMathOperations().size()); + t.addMathOperation(math); + endInsertRows(); + // open the editor for the newly added operation + math->edit(); +} + +void MathModel::deleteRow(unsigned int row) +{ + beginRemoveRows(QModelIndex(), row, row); + t.removeMathOperation(row); + endRemoveRows(); +} + diff --git a/Software/PC_Application/Traces/traceeditdialog.h b/Software/PC_Application/Traces/traceeditdialog.h index 9f16d10..a4a794b 100644 --- a/Software/PC_Application/Traces/traceeditdialog.h +++ b/Software/PC_Application/Traces/traceeditdialog.h @@ -3,11 +3,38 @@ #include #include "trace.h" +#include namespace Ui { class TraceEditDialog; } +class MathModel : public QAbstractTableModel +{ + Q_OBJECT +public: + MathModel(Trace &t, QObject *parent = 0); + + enum { + ColIndexStatus = 0, + ColIndexDescription = 1, + ColIndexDomain = 2, + ColIndexLast, + }; + + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; + QVariant data(const QModelIndex &index, int role) const override; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + Qt::ItemFlags flags(const QModelIndex &index) const override; + + void addOperation(TraceMath *math); + void deleteRow(unsigned int row); + +private: + Trace &t; +}; + class TraceEditDialog : public QDialog { Q_OBJECT diff --git a/Software/PC_Application/Traces/traceeditdialog.ui b/Software/PC_Application/Traces/traceeditdialog.ui index a368c18..436ba09 100644 --- a/Software/PC_Application/Traces/traceeditdialog.ui +++ b/Software/PC_Application/Traces/traceeditdialog.ui @@ -9,7 +9,7 @@ 0 0 - 282 + 1038 365 @@ -19,156 +19,311 @@ true - + - - - - - Name: - - - - - - - - - - Color: - - - - - - - - - - 0 - 0 - - - - - - - - - - - Math - - - - - - - - - Velocity Factor: - - - - - - - - - - + - - - Live Capture - - - true - - - GSource - - - - - - - From File - - - GSource - - - - - - - - - 0 - - - - - - - Type: - - - - - - - - Overwrite - - - - - Max hold - - - - - Min hold - - - - - - - - Parameter: - - - - - - - - - - + - - - - - - + + + - Parameter: + Name: - - + + + + + + + Color: + + + + + + + + + + 0 + 0 + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Velocity Factor: + + + + + + + + + + + Live Capture + + + true + + + GSource + + + + + + + From File + + + GSource + + + + + + + + + 0 + + + + + + + Type: + + + + + + + + Overwrite + + + + + Max hold + + + + + Min hold + + + + + + + + Parameter: + + + + + + + + + + + + + + + + + + + Parameter: + + + + + + + + + + + + - - + + + + + Math operations + + + + + + + + Qt::ScrollBarAsNeeded + + + true + + + QAbstractItemView::InternalMove + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + 20 + + + 70 + + + false + + + false + + + + + + + + + + 0 + 0 + + + + Add + + + + + + + :/icons/add.png:/icons/add.png + + + + + + + false + + + + 0 + 0 + + + + Delete + + + + + + + :/icons/remove.png:/icons/remove.png + + + + + + + false + + + Move up + + + + + + + :/icons/up.png:/icons/up.png + + + + + + + false + + + Move down + + + + + + + :/icons/down.png:/icons/down.png + + + + + + + Qt::Vertical + + + + 18 + 186 + + + + + + + + + + + + @@ -197,7 +352,9 @@
CustomWidgets/siunitedit.h
- + + + GSource diff --git a/Software/PC_Application/Traces/tracetouchstoneexport.cpp b/Software/PC_Application/Traces/tracetouchstoneexport.cpp index 70241c1..7d120a1 100644 --- a/Software/PC_Application/Traces/tracetouchstoneexport.cpp +++ b/Software/PC_Application/Traces/tracetouchstoneexport.cpp @@ -9,6 +9,7 @@ TraceTouchstoneExport::TraceTouchstoneExport(TraceModel &model, QWidget *parent) QDialog(parent), ui(new Ui::TraceTouchstoneExport), model(model), + ports(0), freqsSet(false) { ui->setupUi(this); @@ -24,6 +25,10 @@ TraceTouchstoneExport::~TraceTouchstoneExport() bool TraceTouchstoneExport::setTrace(int portFrom, int portTo, Trace *t) { + if(t->getDataType() != Trace::DataType::Frequency) { + // can only add frequency traces + return false; + } if(portFrom < 0 || portFrom >= ui->sbPorts->value() || portTo < 0 || portTo >= ui->sbPorts->value()) { // invalid port selection return false; @@ -101,20 +106,36 @@ void TraceTouchstoneExport::on_buttonBox_accepted() void TraceTouchstoneExport::on_sbPorts_valueChanged(int ports) { - // remove the previous widgets QGridLayout *layout = static_cast(ui->gbTraces->layout()); - QLayoutItem *child; - while ((child = layout->takeAt(0)) != 0) { - delete child->widget(); - delete child; + if((unsigned) ports != this->ports) { + this->ports = ports; + // remove the previous widgets + QLayoutItem *child; + while ((child = layout->takeAt(0)) != 0) { + delete child->widget(); + delete child; + } + cTraces.clear(); + for(int i=0;i()); + for(int j=0;j(&QComboBox::currentIndexChanged), [=](int) { + selectionChanged(c); + }); + layout->addWidget(l, i, j*2); + layout->addWidget(c, i, j*2 + 1); + } + } } - cTraces.clear(); auto availableTraces = model.getTraces(); for(int i=0;i()); for(int j=0;jblockSignals(true); + c->clear(); // create possible trace selections c->addItem("None"); for(auto t : availableTraces) { @@ -131,12 +152,7 @@ void TraceTouchstoneExport::on_sbPorts_valueChanged(int ports) } c->addItem(t->name(), QVariant::fromValue(t)); } - connect(c, qOverload(&QComboBox::currentIndexChanged), [=](int) { - selectionChanged(c); - }); - cTraces[i].push_back(c); - layout->addWidget(l, i, j*2); - layout->addWidget(c, i, j*2 + 1); + c->blockSignals(false); } } } @@ -186,5 +202,6 @@ void TraceTouchstoneExport::selectionChanged(QComboBox *w) ui->lowerFreq->clear(); ui->upperFreq->clear(); ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(false); + on_sbPorts_valueChanged(ui->sbPorts->value()); } } diff --git a/Software/PC_Application/Traces/tracetouchstoneexport.h b/Software/PC_Application/Traces/tracetouchstoneexport.h index 8ef2ada..11819ab 100644 --- a/Software/PC_Application/Traces/tracetouchstoneexport.h +++ b/Software/PC_Application/Traces/tracetouchstoneexport.h @@ -30,6 +30,7 @@ private: TraceModel &model; std::vector> cTraces; + unsigned int ports; unsigned int points; double lowerFreq, upperFreq; bool freqsSet; diff --git a/Software/PC_Application/VNA/Deembedding/deembeddingdialog.ui b/Software/PC_Application/VNA/Deembedding/deembeddingdialog.ui index 8918e4a..cc4ef66 100644 --- a/Software/PC_Application/VNA/Deembedding/deembeddingdialog.ui +++ b/Software/PC_Application/VNA/Deembedding/deembeddingdialog.ui @@ -6,8 +6,8 @@ 0 0 - 386 - 324 + 519 + 380 @@ -17,6 +17,16 @@ true + + + + Add/configure de-embedding options in this list. Although not required in most scenarios, multiple options can be active at once; de-embedding will be performed top-to-bottom. Therefore, the bottommost entry is the de-embedding that is closest to the DUT, whereas the topmost option is closest to the physical VNA ports. + + + true + + + diff --git a/Software/PC_Application/VNA/Deembedding/twothrudialog.ui b/Software/PC_Application/VNA/Deembedding/twothrudialog.ui index da25a51..29ac935 100644 --- a/Software/PC_Application/VNA/Deembedding/twothrudialog.ui +++ b/Software/PC_Application/VNA/Deembedding/twothrudialog.ui @@ -9,8 +9,8 @@ 0 0 - 742 - 198 + 701 + 465 @@ -19,7 +19,38 @@ true - + + + + + What is this? + + + + + + <ul> +<li>2xthru de-embedding attempts to remove the effect of the fixtures contacting the DUT.</li> +<li>Although not as accurate as a SOLT calibration, it can help in situations where SOLT standards are not usable with the fixtures.</li> +<li>To create the de-embedding parameters, a 2xThru measurement is required: Connect the fixtures of both ports directly to each other and measure their S parameters.</li> +<li>If other impedances than 50 Ohm are used, a Fixture-DUT-Fixture measurement is also necessary, attempting to compensate the impedance. Connect the DUT between the fixtures and measure the S parameters.</li> +<li>For more details of the 2xthru de-embedding see e.g. +<a href="https://www.signalintegrityjournal.com/articles/463-test-fixture-de-embedding-101">this</a> article. +</li> +<li>For more details and examples on how to use 2xthru de-embedding in this application, see the user manual. </li> +</ul> + + + true + + + true + + + + + +