2020-11-29 02:32:18 +08:00
|
|
|
#ifndef TDRLOWPASS_H
|
|
|
|
#define TDRLOWPASS_H
|
|
|
|
|
|
|
|
#include "tracemath.h"
|
2020-12-02 05:28:32 +08:00
|
|
|
#include "windowfunction.h"
|
2020-11-29 02:32:18 +08:00
|
|
|
|
|
|
|
namespace Math {
|
|
|
|
|
2020-12-02 05:28:32 +08:00
|
|
|
class TDR : public TraceMath
|
2020-11-29 02:32:18 +08:00
|
|
|
{
|
|
|
|
public:
|
2020-12-02 05:28:32 +08:00
|
|
|
TDR();
|
2020-11-29 02:32:18 +08:00
|
|
|
|
|
|
|
DataType outputType(DataType inputType) override;
|
|
|
|
QString description() override;
|
|
|
|
void edit() override;
|
|
|
|
|
|
|
|
static QWidget* createExplanationWidget();
|
|
|
|
|
2020-12-05 06:49:52 +08:00
|
|
|
virtual nlohmann::json toJSON() override;
|
|
|
|
virtual void fromJSON(nlohmann::json j) override;
|
|
|
|
Type getType() override {return Type::TDR;};
|
|
|
|
|
2020-12-12 03:28:40 +08:00
|
|
|
enum class Mode {
|
|
|
|
Lowpass,
|
|
|
|
Bandpass,
|
|
|
|
};
|
2021-05-13 04:55:05 +08:00
|
|
|
void setMode(Mode m);
|
2020-12-12 03:28:40 +08:00
|
|
|
Mode getMode() const;
|
|
|
|
const WindowFunction& getWindow() const;
|
|
|
|
|
2020-11-29 02:32:18 +08:00
|
|
|
public slots:
|
|
|
|
void inputSamplesChanged(unsigned int begin, unsigned int end) override;
|
2020-12-02 05:28:32 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
void updateTDR();
|
|
|
|
Mode mode;
|
|
|
|
WindowFunction window;
|
|
|
|
bool stepResponse;
|
|
|
|
bool automaticDC;
|
|
|
|
std::complex<double> manualDC;
|
2020-11-29 02:32:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // TDRBANDPASS_H
|