mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-08 18:16:02 -05:00
7369062c4a
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2635 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
26 lines
510 B
Fortran
26 lines
510 B
Fortran
subroutine analytic(d,npts,nfft,s,c)
|
|
|
|
! Convert real data to analytic signal
|
|
|
|
parameter (NFFTMAX=128*1024)
|
|
real d(npts)
|
|
real s(npts)
|
|
complex c(NFFTMAX)
|
|
|
|
nh=nfft/2
|
|
fac=2.0/nfft
|
|
c(1:npts)=fac*d(1:npts)
|
|
c(npts+1:nfft)=0.
|
|
call four2a(c,nfft,1,-1,1) !Forward c2c FFT
|
|
|
|
do i=1,nh
|
|
s(i)=real(c(i))**2 + aimag(c(i))**2
|
|
enddo
|
|
|
|
c(1)=0.5*c(1)
|
|
c(nh+2:nfft)=0.
|
|
call four2a(c,nfft,1,1,1) !Inverse c2c FFT
|
|
|
|
return
|
|
end subroutine analytic
|