00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef FFT_H
00030 #define FFT_H
00031
00032 #include "Filter.h"
00033
00034 class FFT : public Filter
00035 {
00036 Q_OBJECT
00037
00038 public:
00039 FFT(ApplicationWindow *parent, Table *t, const QString& realColName, const QString& imagColName = QString(), int from = 1, int to = -1);
00040 FFT(ApplicationWindow *parent, Graph *g, const QString& curveTitle);
00041 FFT(ApplicationWindow *parent, Graph *g, const QString& curveTitle, double start, double end);
00042
00043 void setInverseFFT(bool inverse = true){d_inverse = inverse;};
00044 void setSampling(double sampling){d_sampling = sampling;};
00045 void normalizeAmplitudes(bool norm = true){d_normalize = norm;};
00046 void shiftFrequencies(bool shift = true){d_shift_order = shift;};
00047
00048 private:
00049 void init();
00050 void output();
00051 void output(const QString &text);
00052
00053 QString fftCurve();
00054 QString fftTable();
00055
00056 bool setDataFromTable(Table *t, const QString& realColName, const QString& imagColName = QString(), int from = 0, int to = -1);
00057
00058 double d_sampling;
00060 bool d_inverse;
00062 bool d_normalize;
00064 bool d_shift_order;
00065
00066 int d_real_col, d_imag_col;
00067 };
00068
00069 #endif