#ifndef TWOTHRU_H #define TWOTHRU_H #include "deembeddingoption.h" #include "Tools/parameters.h" #include #include namespace Ui { class TwoThruDialog; } class TwoThru : public DeembeddingOption { public: TwoThru(); virtual void transformDatapoint(VNAData& p) override; virtual void edit() override; virtual Type getType() override {return DeembeddingOption::Type::TwoThru;} nlohmann::json toJSON() override; void fromJSON(nlohmann::json j) override; private slots: void startMeasurement(); void updateGUI(); void measurementCompleted(std::vector m) override; private: using Point = struct { double freq; Tparam inverseP1, inverseP2; }; static std::vector interpolateEvenFrequencySteps(std::vector input); static std::vector calculateErrorBoxes(std::vector data_2xthru); static std::vector calculateErrorBoxes(std::vector data_2xthru, std::vector data_fix_dut_fix, double z0); std::vector measurements2xthru; std::vector measurementsDUT; double Z0; std::vector points; bool measuring2xthru; bool measuringDUT; Ui::TwoThruDialog *ui; }; #endif // TWOTHRU_H