diff options
| author | Christoph Berg <myon@debian.org> | 2026-04-07 19:02:45 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-04-07 19:02:45 +0200 |
| commit | f647d78463c1250ce9c99af664615fafccf5e959 (patch) | |
| tree | 5b00428cef68aef1c9d407e2d4535687422419b6 /lib/twkfreq.f90 | |
| parent | 0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (diff) | |
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'lib/twkfreq.f90')
| -rw-r--r--[-rwxr-xr-x] | lib/twkfreq.f90 | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/lib/twkfreq.f90 b/lib/twkfreq.f90 index 5188d500..7ffe396f 100755..100644 --- a/lib/twkfreq.f90 +++ b/lib/twkfreq.f90 @@ -1,30 +1,30 @@ -subroutine twkfreq(c3,c4,npts,fsample,a)
-
- ! Adjust frequency of complex data
- ! a(1) Hz
- ! a(2) Hz/(0.5*TxT), where TxT = npts/fsample = file duration
-
- complex c3(npts)
- complex c4(npts)
- complex w,wstep
- real a(3)
- data twopi/6.283185307/
-
-! Mix the complex signal
- w=1.0
- wstep=1.0
- x0=0.5*(npts+1)
- s=2.0/npts
- do i=1,npts
- x=s*(i-x0)
- p2=1.5*x*x - 0.5
-! p3=2.5*(x**3) - 1.5*x
-! p4=4.375*(x**4) - 3.75*(x**2) + 0.375
- dphi=(a(1) + x*a(2) + p2*a(3)) * (twopi/fsample)
- wstep=cmplx(cos(dphi),sin(dphi))
- w=w*wstep
- c4(i)=w*c3(i)
- enddo
-
- return
-end subroutine twkfreq
+subroutine twkfreq(c3,c4,npts,fsample,a) + + ! Adjust frequency of complex data + ! a(1) Hz + ! a(2) Hz/(0.5*TxT), where TxT = npts/fsample = file duration + + complex c3(npts) + complex c4(npts) + complex w,wstep + real a(3) + data twopi/6.283185307/ + +! Mix the complex signal + w=1.0 + wstep=1.0 + x0=0.5*(npts+1) + s=2.0/npts + do i=1,npts + x=s*(i-x0) + p2=1.5*x*x - 0.5 +! p3=2.5*(x**3) - 1.5*x +! p4=4.375*(x**4) - 3.75*(x**2) + 0.375 + dphi=(a(1) + x*a(2) + p2*a(3)) * (twopi/fsample) + wstep=cmplx(cos(dphi),sin(dphi)) + w=w*wstep + c4(i)=w*c3(i) + enddo + + return +end subroutine twkfreq |
