mirror of
https://github.com/pavel-demin/ft8d.git
synced 2024-11-27 14:58:43 -05:00
switch to input files with complex values
This commit is contained in:
parent
56667947ca
commit
9f0998e376
@ -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
|
||||
|
||||
|
2
ft8d.f90
2
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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user