From 0d5bcb268cbd8ece21b0d9aadaf547f3f5f1f40c Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Sat, 1 Jun 2019 23:06:01 +0200 Subject: add noise filter --- src/fourier.f90 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit v1.2.3