diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
| commit | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch) | |
| tree | 1269efa852935b183daae4bb33a58d1b4d2ffb53 /lib/ft8/subtractft8.f90 | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
Diffstat (limited to 'lib/ft8/subtractft8.f90')
| -rw-r--r-- | lib/ft8/subtractft8.f90 | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/ft8/subtractft8.f90 b/lib/ft8/subtractft8.f90 index 40657e7e..8345b1a0 100644 --- a/lib/ft8/subtractft8.f90 +++ b/lib/ft8/subtractft8.f90 @@ -9,7 +9,8 @@ subroutine subtractft8(dd0,itone,f0,dt,lrefinedt) parameter (NMAX=15*12000,NFRAME=1920*79) parameter (NFFT=NMAX,NFILT=4000) - real dd(NMAX),dd0(NMAX) + real dd0(NMAX) + real, allocatable, save :: dd(:) real window(-NFILT/2:NFILT/2) real x(NFFT+2) real endcorrection(NFILT/2+1) @@ -22,6 +23,8 @@ subroutine subtractft8(dd0,itone,f0,dt,lrefinedt) equivalence (x,cx) save first,/heap8/,endcorrection + if(.not.allocated(dd)) allocate(dd(NMAX)) + if(first) then ! Create and normalize the filter pi=4.0*atan(1.0) fac=1.0/float(nfft) @@ -31,8 +34,9 @@ subroutine subtractft8(dd0,itone,f0,dt,lrefinedt) sumw=sumw+window(j) enddo cw=0. - cw(1:NFILT+1)=window/sumw - cw=cshift(cw,NFILT/2+1) + do j=-NFILT/2,NFILT/2 + cw(modulo(j-1,NFFT)+1)=window(j)/sumw + enddo call four2a(cw,nfft,1,-1,1) cw=cw*fac first=.false. |
