diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-08 17:32:13 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-08 17:32:13 -0300 |
commit | 18c33edc2fdf6abc9f8f36ea67b256d4a885493a (patch) | |
tree | 30a96ad32a8cc89120e2ae2938b865af2d33a08f /log-fourier_test.cpp | |
parent | bd0b96fabdf4c71b95d14dbfca3692cdcd90ec9a (diff) | |
download | code-18c33edc2fdf6abc9f8f36ea67b256d4a885493a.tar.gz code-18c33edc2fdf6abc9f8f36ea67b256d4a885493a.tar.bz2 code-18c33edc2fdf6abc9f8f36ea67b256d4a885493a.zip |
Revert "Work to debug log-fourier"
This reverts commit 77e8c94e5b41287e97e36e34a97478400637d102.
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; -} |