diff options
Diffstat (limited to 'log-fourier_test.cpp')
-rw-r--r-- | log-fourier_test.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/log-fourier_test.cpp b/log-fourier_test.cpp deleted file mode 100644 index 678e4b1..0000000 --- a/log-fourier_test.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include "log-fourier.hpp" -#include <getopt.h> -#include <iostream> - -int main(int argc, char* argv[]) { - /* Log-Fourier parameters */ - unsigned log2n = 8; - Real Δτ = 0.1; - Real k = 0.1; - unsigned pad = 4; - - int opt; - - while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:g:k:D:e:0:lS:x:P:")) != -1) { - switch (opt) { - case '2': - log2n = atoi(optarg); - break; - case 'k': - k = atof(optarg); - break; - case 'D': - Δτ = atof(optarg); - break; - case 'P': - pad = atoi(optarg); - break; - default: - exit(1); - } - } - - unsigned N =log2n; - - LogarithmicFourierTransform fft(N, k, Δτ, pad); - - std::vector<Complex> a(N); - - for (unsigned i = 0; i < N; i++) { - a[i] = 1 / (1 + pow(fft.ν(i), 2)); - } - - std::vector<Real> â = fft.inverse(a); - - for (unsigned i = 0; i < N; i++) { - std::cout << fft.t(i) << " " << â[i] << std::endl; - } - - return 0; -} |