diff --git a/lib/fast_decode.f90 b/lib/fast_decode.f90 index c4d120beb..6ae8c6388 100644 --- a/lib/fast_decode.f90 +++ b/lib/fast_decode.f90 @@ -91,7 +91,7 @@ subroutine fast_decode(id2,narg,ntrperiod,bShMsgs,line,mycall_12, & ndat=ndat0 call wav11(id2,ndat,dat) nzz=11025*ntrperiod - if(ndat.lt.nzz) dat(npts+1:nzz)=0.0 + if(ndat.lt.nzz) dat(ndat+1:nzz)=0.0 ndat=min(ndat,30*11025) call ana932(dat,ndat,cdat,npts) !Make downsampled analytic signal endif diff --git a/lib/iscat.f90 b/lib/iscat.f90 index 652aaf3aa..bfba9fe09 100644 --- a/lib/iscat.f90 +++ b/lib/iscat.f90 @@ -146,7 +146,8 @@ subroutine iscat(cdat0,npts0,nh,npct,t2,pick,cfile6,minsync,ntol, & endif isync = xsync - if(navg.gt.0 .and. isync.ge.max(minsync,0) .and. maxlines.ge.2) then + if(avg.gt.2.5 .and. xsync.ge.max(float(minsync),1.5) .and. & + maxlines.ge.2) then nsig=nint(sig) nworst=10.0*(worst-1.0) navg=10.0*(avg-1.0) diff --git a/lib/synciscat.f90 b/lib/synciscat.f90 index 69a48b14f..5ce27acfe 100644 --- a/lib/synciscat.f90 +++ b/lib/synciscat.f90 @@ -39,6 +39,7 @@ subroutine synciscat(cdat,npts,nh,npct,s0,jsym,df,ntol,NFreeze, & df=fsample/nfft fac=1.0/1000.0 !Somewhat arbitrary savg=0. + s0=0. ia=1-kstep do j=1,4*nsym !Compute symbol spectra @@ -109,17 +110,9 @@ subroutine synciscat(cdat,npts,nh,npct,s0,jsym,df,ntol,NFreeze, & ref=nfold*4 i0=27 - ia=i0-400/df !Set search range in frequency... - ib=i0+400/df - if(mode4.eq.1) then - i0=95 - ia=i0-600/df !Set search range in frequency... - ib=i0+600/df - endif - if(nfreeze.eq.1) then - ia=i0+(mousedf-ntol)/df - ib=i0+(mousedf+ntol)/df - endif + if(mode4.eq.1) i0=95 + ia=i0-nint(ntol/df) + ib=i0+nint(ntol/df) if(ia.lt.1) ia=1 if(ib.gt.nfft-3) ib=nfft-3 @@ -164,9 +157,9 @@ subroutine synciscat(cdat,npts,nh,npct,s0,jsym,df,ntol,NFreeze, & ipk2=i endif enddo - + msglen=(ipk2-ipk)/2 - if(msglen.lt.2 .or. msglen.gt.29) msglen=3 + if(msglen.lt.2 .or. msglen.gt.29) cycle if(xsync.ge.xsyncbest) then xsyncbest=xsync