From 9f0998e37603a4e869cf0d0ad8a1db8be9f2b7c7 Mon Sep 17 00:00:00 2001 From: Pavel Demin Date: Sat, 31 Mar 2018 23:16:01 +0200 Subject: [PATCH] switch to input files with complex values --- ft8_downsample.f90 | 4 ++-- ft8d.f90 | 2 +- sync8.f90 | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ft8_downsample.f90 b/ft8_downsample.f90 index b147803..53ac11c 100644 --- a/ft8_downsample.f90 +++ b/ft8_downsample.f90 @@ -8,7 +8,7 @@ subroutine ft8_downsample(dd,newdat,f0,c1) logical newdat complex c1(0:NFFT2-1) complex cx(0:NFFT1/2) - real dd(NMAX),x(NFFT1) + complex dd(NMAX),x(NFFT1) equivalence (x,cx) save cx @@ -16,7 +16,7 @@ subroutine ft8_downsample(dd,newdat,f0,c1) ! Data in dd have changed, recompute the long FFT x(1:NMAX)=dd x(NMAX+1:NFFT1)=0. !Zero-pad the x array - call four2a(cx,NFFT1,1,-1,0) !r2c FFT to freq domain + call four2a(cx,NFFT1,1,-1,1) !c2c FFT to freq domain newdat=.false. endif diff --git a/ft8d.f90 b/ft8d.f90 index ba31bfe..0b72901 100644 --- a/ft8d.f90 +++ b/ft8d.f90 @@ -10,7 +10,7 @@ program ft8d real s(NH1,NHSYM) real sbase(NH1) real candidate(3,200) - real dd(NMAX) + complex dd(NMAX) logical newdat,lsubtract,ldupe,bcontest integer apsym(KK) integer allsnrs(100) diff --git a/sync8.f90 b/sync8.f90 index d1e540b..924436b 100644 --- a/sync8.f90 +++ b/sync8.f90 @@ -7,12 +7,12 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase) real s(NH1,NHSYM) real savg(NH1) real sbase(NH1) - real x(NFFT1) + complex x(NFFT1) real sync2d(NH1,-JZ:JZ) real red(NH1) real candidate0(3,200) real candidate(3,200) - real dd(NMAX) + complex dd(NMAX) integer jpeak(NH1) integer indx(NH1) integer ii(1) @@ -30,7 +30,7 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase) ib=ia+NSPS-1 x(1:NSPS)=fac*dd(ia:ib) x(NSPS+1:)=0. - call four2a(x,NFFT1,1,-1,0) !r2c FFT + call four2a(x,NFFT1,1,-1,1) !c2c FFT do i=1,NH1 s(i,j)=real(cx(i))**2 + aimag(cx(i))**2 enddo