From 8cc1be7c5a66b2f686405373cab6618e6997cea5 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 19 Sep 2006 20:26:04 +0000 Subject: [PATCH] Fix another bounds problem. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@304 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- sync65.f | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sync65.f b/sync65.f index 24977e26f..a51e7b757 100644 --- a/sync65.f +++ b/sync65.f @@ -1,5 +1,5 @@ subroutine sync65(dat,jz,DFTolerance,NFreeze,MouseDF, - + mode65,dtx,dfx,snrx,snrsync,ccfblue,ccfred,flip,width) + + mode65,dtx,dfx,snrx,snrsync,ccfblue,ccfred1,flip,width) C Synchronizes JT65 data, finding the best-fit DT and DF. C NB: at this stage, submodes ABC are processed in the same way. @@ -13,7 +13,8 @@ C NB: at this stage, submodes ABC are processed in the same way. real psavg(NHMAX) !Average spectrum of whole record real s2(NHMAX,NSMAX) !2d spectrum, stepped by half-symbols real ccfblue(-5:540) !CCF with pseudorandom sequence - real ccfred(-224:224) !Peak of ccfblue, as function of freq + real ccfred(-372:372) !Peak of ccfblue, as function of freq + real ccfred1(-224:224) !Peak of ccfblue, as function of freq real tmp(450) save @@ -60,12 +61,12 @@ C Find the best frequency channel for CCF syncbest=-1.e30 syncbest2=-1.e30 - call zero(ccfred,449) + call zero(ccfred,745) do i=ia,ib call xcor(s2,i,nsteps,nsym,lag1,lag2, + ccfblue,ccf0,lagpk0,flip,0.0) j=i-i0 - if(j.ge.-224 .and. j.le.224) ccfred(j)=ccf0 + if(j.ge.-372 .and. j.le.372) ccfred(j)=ccf0 C Find rms of the CCF, without the main peak call slope(ccfblue(lag1),lag2-lag1+1,lagpk0-lag1+1.0) @@ -163,6 +164,10 @@ C Compute width of sync tone to outermost -3 dB points width=df*width width=max(0.0,min(99.0,width)) + do i=-224,224 + ccfred1(i)=ccfred(i) + enddo + return end