mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-09 02:26:06 -05:00
5b51d6be83
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2966 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
28 lines
471 B
Fortran
28 lines
471 B
Fortran
subroutine ps24(dat,nfft,s)
|
|
|
|
parameter (NMAX=2520+2)
|
|
parameter (NHMAX=NMAX/2-1)
|
|
real dat(nfft)
|
|
real dat2(NMAX)
|
|
real s(NHMAX)
|
|
complex c(0:NMAX)
|
|
equivalence(dat2,c)
|
|
|
|
nh=nfft/2
|
|
do i=1,nh
|
|
dat2(i)=dat(i)/128.0 !### Why 128 ??
|
|
enddo
|
|
do i=nh+1,nfft
|
|
dat2(i)=0.
|
|
enddo
|
|
|
|
call four2a(c,nfft,1,-1,0)
|
|
|
|
fac=1.0/nfft
|
|
do i=1,nh
|
|
s(i)=fac*(real(c(i))**2 + aimag(c(i))**2)
|
|
enddo
|
|
|
|
return
|
|
end subroutine ps24
|