mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-05 08:51:19 -05:00
c2ceb42b28
svn+ssh://svn.berlios.de/svnroot/repos/wsjt/WSJT/branches/linux merged into svn+ssh://svn.berlios.de/svnroot/repos/wsjt/trunk git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@155 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
24 lines
449 B
Fortran
24 lines
449 B
Fortran
subroutine ps(dat,nfft,s)
|
|
|
|
parameter (NMAX=16384+2)
|
|
parameter (NHMAX=NMAX/2-1)
|
|
real dat(nfft)
|
|
real s(NHMAX)
|
|
real x(NMAX)
|
|
complex c(0:NHMAX)
|
|
equivalence (x,c)
|
|
|
|
nh=nfft/2
|
|
do i=1,nfft
|
|
x(i)=dat(i)/128.0 !### Why 128 ??
|
|
enddo
|
|
|
|
call xfft(x,nfft)
|
|
fac=1.0/nfft
|
|
do i=1,nh
|
|
s(i)=fac*(real(c(i))**2 + aimag(c(i))**2)
|
|
enddo
|
|
|
|
return
|
|
end
|