From f29469421fc6d8d7cea9829f27a0213c226e5b66 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 14 Jan 2006 18:38:15 +0000 Subject: [PATCH] 1. Fixed some problems with all-zero data. 2. Removed the two-buffer offset in fivehz.f90, it did not work right. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@104 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- decode3.f90 | 1 + fivehz.f90 | 4 ---- longx.f | 2 +- mtdecode.f | 1 - spec2d.f | 6 +++++- wsjt.py | 2 +- wsjt1.f | 6 +++++- 7 files changed, 13 insertions(+), 9 deletions(-) diff --git a/decode3.f90 b/decode3.f90 index ceb2f7c04..337dda67a 100644 --- a/decode3.f90 +++ b/decode3.f90 @@ -59,6 +59,7 @@ subroutine decode3(d2,jz,istart,filename) ps0,npkept,lumsg,basevb,rmspower,nslim2,psavg,ccf,Nseg, & MouseDF,NAgain,LDecoded,nspecial,ndf,ss1,ss2) close(23) + if(basevb.le.-98.0) go to 999 ! See whether this file should be saved or erased from disk if(nsave.eq.1 .and. ldecoded) filetokilla='' diff --git a/fivehz.f90 b/fivehz.f90 index f3f795a39..3d04666c2 100644 --- a/fivehz.f90 +++ b/fivehz.f90 @@ -84,15 +84,11 @@ subroutine fivehz endif ibuf000=ibuf iwrite000=iwrite - nsec=Tsec - ntr=mod(nsec/trperiod,2) !ntr=0 in 1st sequence, 1 in 2nd if(ntr.ne.ntr0) then ibuf0=ibuf !Start of new sequence, save ibuf - ibuf0=ibuf0-2 !Tweak the Rx start time - if(ibuf0.lt.1) ibuf0=ibuf0+1024 ! if(mode(1:4).ne.'JT65') then ! ibuf0=ibuf0+3 !So we don't copy our own Tx ! if(ibuf0.gt.1024) ibuf0=ibuf0-1024 diff --git a/longx.f b/longx.f index c0e4c069e..844f814af 100644 --- a/longx.f +++ b/longx.f @@ -124,5 +124,5 @@ C Finally, decode the message. if(nc.le.47) msg(i:i)=c(nc+1:nc+1) enddo - 20 return + return end diff --git a/mtdecode.f b/mtdecode.f index 948d97a85..338d1aae6 100644 --- a/mtdecode.f +++ b/mtdecode.f @@ -21,7 +21,6 @@ C Decode Multi-Tone FSK441 mesages. character*90 line common/ccom/nline,tping(100),line(100) -! slim=10.0*log10(10.0**(0.1*MinSigdB)+1.0) slim=MinSigdB wmin=0.001*MinWidth * (19.95/20.0) nf1=-DFTolerance diff --git a/spec2d.f b/spec2d.f index 06635c558..c0df82ac5 100644 --- a/spec2d.f +++ b/spec2d.f @@ -44,6 +44,10 @@ C Accumulate average spectrum for the whole file. psavg0(i) = psavg0(i)+ real(c(i))**2 + imag(c(i))**2 enddo enddo + if(sum.eq.0.0) then + sigma=-999. + go to 999 + endif C Normalize and save a copy of psavg0 for plotting. Roll off the C spectrum at 300 and 3000 Hz. @@ -120,5 +124,5 @@ C Find average of active spectral region, over the whole file. enddo sigma=sum/(44*nz) - return + 999 return end diff --git a/wsjt.py b/wsjt.py index 89c940248..4fd987e84 100644 --- a/wsjt.py +++ b/wsjt.py @@ -1,4 +1,4 @@ -#-------------------------------------------------------------- WSJT +#------------------------------------------------------------- WSJT from Tkinter import * from tkFileDialog import * import Pmw diff --git a/wsjt1.f b/wsjt1.f index c0e87f70d..9f8d6e210 100644 --- a/wsjt1.f +++ b/wsjt1.f @@ -125,6 +125,7 @@ enddo avesq=sq/jz basevb=dB(avesq) - 44 !Base power level to send back to GUI + if(avesq.eq.0) go to 900 nz=600 nstep=jz/nz @@ -196,7 +197,8 @@ enddo ! For waterfall plot call spec2d(dat,jz,nstep,s2,nchan,nz,psavg,sigma) - if(jz/11025.0.lt.3.9) go to 900 + if(sigma.lt.0.0) basevb=-99.0 + if(jz/11025.0.lt.3.9 .or. sigma.lt.0.0) go to 900 f0=1076.66 if(NFreeze.eq.1) f0=1076.66+mousedf @@ -249,6 +251,8 @@ dtbuf=nstep/11025.0 stlim=nslim2 !Single-tone threshold call spec2d(dat,jz,nstep,s2,nchan,nz,psavg,sigma) + if(sigma.lt.0.0) basevb=-99.0 + if(sigma.lt.0.0) go to 900 nline0=nline STfound=.false. npkept=0