WSJT-X/libm65/tweak1.f90
Joe Taylor c6544d05c3 Are these properly registered, finally?
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2528 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-07-19 12:16:29 +00:00

25 lines
425 B
Fortran

subroutine tweak1(ca,jz,f0,cb)
! Shift frequency of analytic signal ca, with output to cb
complex ca(jz),cb(jz)
real*8 twopi
complex*16 w,wstep
data twopi/0.d0/
save twopi
if(twopi.eq.0.d0) twopi=8.d0*atan(1.d0)
w=1.d0
dphi=twopi*f0/11025.d0
wstep=cmplx(cos(dphi),sin(dphi))
x0=0.5*(jz+1)
s=2.0/jz
do i=1,jz
x=s*(i-x0)
w=w*wstep
cb(i)=w*ca(i)
enddo
return
end subroutine tweak1