Fixed bounds error in short65.f

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@272 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2006-09-05 14:27:53 +00:00
parent f05bdc4887
commit bbda677489
1 changed files with 17 additions and 12 deletions

View File

@ -1,6 +1,6 @@
subroutine short65(data,jz,NFreeze,MouseDF,DFTolerance, subroutine short65(data,jz,NFreeze,MouseDF,DFTolerance,
+ mode65,nspecialbest,nstest,dfsh,iderrbest,idriftbest, + mode65,nspecialbest,nstest,dfsh,iderrbest,idriftbest,
+ snrdb,ss1,ss2,nwsh) + snrdb,ss1a,ss2a,nwsh)
C Checks to see if this might be a shorthand message. C Checks to see if this might be a shorthand message.
C This is done before zapping, downsampling, or normal decoding. C This is done before zapping, downsampling, or normal decoding.
@ -17,8 +17,10 @@ C This is done before zapping, downsampling, or normal decoding.
real ss(NQ,4) !Save spectra in four phase bins real ss(NQ,4) !Save spectra in four phase bins
real psavg(NQ) real psavg(NQ)
real sigmax(4) !Peak of spectrum at each phase real sigmax(4) !Peak of spectrum at each phase
real ss1(-224:224) !Lower magenta curve real ss1a(-224:224) !Lower magenta curve
real ss2(-224:224) !Upper magenta curve real ss2a(-224:224) !Upper magenta curve
real ss1(-473:1227) !Lower magenta curve (temp)
real ss2(-473:1227) !Upper magenta curve (temp)
real ssavg(-10:10) real ssavg(-10:10)
integer ipk(4) !Peak bin at each phase integer ipk(4) !Peak bin at each phase
save save
@ -139,19 +141,17 @@ C Find strongest line in each of the 4 phases, repeating for each drift rate.
ipk2=ntmp ipk2=ntmp
endif endif
call zero(ss1,449) call zero(ss1,1701)
call zero(ss2,449) call zero(ss2,1701)
do i=ia2,ib2,4 do i=ia2,ib2,4
f=df*i f=df*i
k=nint((f-1270.46)/df4) k=nint((f-1270.46)/df4)
if(k.ge.-224 .and. k.le.224) then ss1(k)=0.3 * (ss(i-2,n1) + ss(i-1,n1) + ss(i,n1) +
ss1(k)=0.3 * (ss(i-2,n1) + ss(i-1,n1) + ss(i,n1) + + ss(i+1,n1) + ss(i+2,n1))
+ ss(i+1,n1) + ss(i+2,n1)) ss2(k)=0.3 * (ss(i-2,n2) + ss(i-1,n2) + ss(i,n2) +
ss2(k)=0.3 * (ss(i-2,n2) + ss(i-1,n2) + ss(i,n2) + + ss(i+1,n2) + ss(i+2,n2))
+ ss(i+1,n2) + ss(i+2,n2))
endif
enddo enddo
! kpk1=nint(0.25*ipk(n1)-472.0)
kpk1=nint(0.25*ipk1-472.0) kpk1=nint(0.25*ipk1-472.0)
kpk2=kpk1 + nspecial*mode65*10 kpk2=kpk1 + nspecial*mode65*10
ssmax=0. ssmax=0.
@ -177,5 +177,10 @@ C Find strongest line in each of the 4 phases, repeating for each drift rate.
nwsh=nint(x*df4) nwsh=nint(x*df4)
endif endif
do i=-224,224
ss1a(i)=ss1(i)
ss2a(i)=ss2(i)
enddo
return return
end end