WSJT-X/lib/fsk4hf/spec8.f90
Joe Taylor 303eecdfd6 Make wspr_fsk8d search for DT as well as f0.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7681 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2017-05-17 13:13:11 +00:00

32 lines
596 B
Fortran

subroutine spec8(c,s,savg)
include 'wspr_fsk8_params.f90'
complex c(0:NMAXD-1)
complex c1(0:NSPS-1)
real s(0:NH2,NN)
real savg(0:NH2)
fs=12000.0/NDOWN
df=fs/NSPS
savg=0.
do j=1,NN
ia=(j-1)*NSPS
ib=ia + NSPS-1
c1(0:NSPS-1)=c(ia:ib)
c1(NSPS:)=0.
call four2a(c1,NSPS,1,-1,1)
do i=0,NH2
s(i,j)=real(c1(i))**2 + aimag(c1(i))**2
enddo
savg=savg+s(0:NH2,j)
enddo
s=s/NZ
savg=savg/(NN*NZ)
do i=0,NH2
write(31,3101) i*df,savg(i)
3101 format(f10.3,f12.3)
enddo
return
end subroutine spec8