diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-06-01 23:06:01 +0200 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-06-01 23:06:01 +0200 |
commit | 0d5bcb268cbd8ece21b0d9aadaf547f3f5f1f40c (patch) | |
tree | 91c1c69bfb4f530f6d07da0f2ed8e30db59ecb2e /src | |
parent | 0702ba54d75f4580c7eb184fcef5048d6ba53c07 (diff) | |
download | fortran-assignment2-0d5bcb268cbd8ece21b0d9aadaf547f3f5f1f40c.tar.gz fortran-assignment2-0d5bcb268cbd8ece21b0d9aadaf547f3f5f1f40c.zip |
add noise filter
Diffstat (limited to 'src')
-rw-r--r-- | src/fourier.f90 | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/fourier.f90 b/src/fourier.f90 index be0a16f..b1d2b84 100644 --- a/src/fourier.f90 +++ b/src/fourier.f90 @@ -87,10 +87,20 @@ PROGRAM test DO i = 1, ncomplex write(*,*) i - 1, " ", abs(arr_complex(i)) - END DO ELSE - STOP "not implemented" + DO i = 1, ncomplex + + IF (abs(arr_complex(i)) < 50) arr_complex(i) = 0 + END DO + + call fftw_execute_dft_c2r(plan_b, arr_complex, arr_real) + + DO i = 1, npoints + + write(*,*) (i - 1) * delta + start, " ", arr_real(i) + END DO + END IF call fftw_free(p_real) |