1subroutine spec9f(id2,npts,nsps,s1,jz,nq)
2
3! Compute symbol spectra at quarter-symbol steps.
4
5  integer*2 id2(0:npts)
6  real s1(nq,jz)
7  real x(960)
8  complex c(0:480)
9  equivalence (x,c)
10
11  nfft=2*nsps                               !FFTs at twice the symbol length
12  nh=nfft/2
13  do j=1,jz
14     ia=(j-1)*nsps/4
15     ib=ia+nsps-1
16     if(ib.gt.npts) exit
17     x(1:nh)=id2(ia:ib)
18     x(nh+1:)=0.
19     call four2a(x,nfft,1,-1,0)           !r2c
20     k=mod(j-1,340)+1
21     do i=1,NQ
22        s1(i,j)=1.e-10*(real(c(i))**2 + aimag(c(i))**2)
23     enddo
24  enddo
25
26!### Reference spectrum should be applied here (or possibly earlier?) ###
27!### Normalize so that rms (or level?) is 1.0 ?  ###
28
29  return
30end subroutine spec9f
31