From d50ca6a0777f322645c515ce7a29d00c3dca14ec Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 16 Apr 2013 18:33:38 +0000 Subject: [PATCH] Fine-tuning work on decoder. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3181 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/decoder.f90 | 16 ++++++++-------- lib/fillcom.f90 | 4 ++-- lib/jt9.f90 | 12 +++++++----- mainwindow.cpp | 2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/lib/decoder.f90 b/lib/decoder.f90 index db1118387..98ab94e70 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -63,10 +63,10 @@ subroutine decoder(ss,c0,nstandalone) do nqd=1,0,-1 limit=5000 - ccflim=4.0 + ccflim=3.7 if(ndepth.ge.2) then limit=50000 - ccflim=3.0 + ccflim=2.9 endif if(ndepth.ge.3 .or. nqd.eq.1) then limit=200000 @@ -92,8 +92,8 @@ subroutine decoder(ss,c0,nstandalone) ib1=ib else do i=ia+9,ib-25 - t1=ccfred(i)/(sum(ccfred(i-8:i-6)/3.0)) - t2=ccfred(i)/(sum(ccfred(i+23:i+25)/3.0)) + t1=ccfred(i)/(sum(ccfred(i-8:i-6)/ccflim)) + t2=ccfred(i)/(sum(ccfred(i+23:i+25)/ccflim)) if(t1.ge.ccflim .and. t2.ge.ccflim) ccfok(i)=.true. enddo ccfok(ia1:ib1)=.false. @@ -115,7 +115,7 @@ subroutine decoder(ss,c0,nstandalone) if(done(i) .or. (.not.ccfok(i)) .or. (ccfred(i).lt.ccflim-1.0) .or. & (ccfred(i).lt.ccfred(i+1))) cycle if(nqd.eq.1 .or. & - (ccfred(i).ge.3.0 .and. abs(f-fgood).gt.10.0*df8)) then + (ccfred(i).ge.ccflim .and. abs(f-fgood).gt.10.0*df8)) then call timer('decode9a',0) fpk=1000.0 + df3*(i-1) c1(1:npts8)=conjg(c0(1:npts8)) @@ -136,8 +136,8 @@ subroutine decoder(ss,c0,nstandalone) if(msg.ne.' ') then write(*,fmt) nutc,nsync,nsnr,xdt,freq,ndrift,msg write(13,fmt) nutc,nsync,nsnr,xdt,freq,ndrift,msg - write(14,1014) nutc,nsync,nsnr,xdt,freq,ndrift,ccfred(i),nlim,msg -1014 format(i4.4,i4,i5,f6.1,f8.0,i4,f9.1,i9,3x,a22) +! write(14,1014) nutc,nsync,nsnr,xdt,freq,ndrift,ccfred(i),nlim,msg +!1014 format(i4.4,i4,i5,f6.1,f8.0,i4,f9.1,i9,3x,a22) iaa=max(1,i-3) ibb=min(NSMAX,i+11) fgood=f @@ -157,7 +157,7 @@ subroutine decoder(ss,c0,nstandalone) 1010 format('',2i4) call flush(6) close(13) - call flush(14) +! call flush(14) call timer('decoder ',1) if(nstandalone.eq.0) call timer('decoder ',101) diff --git a/lib/fillcom.f90 b/lib/fillcom.f90 index 6b8022aa9..adb76710b 100644 --- a/lib/fillcom.f90 +++ b/lib/fillcom.f90 @@ -1,4 +1,4 @@ -subroutine fillcom(nutc0) +subroutine fillcom(nutc0,ndepth0) character*20 datetime common/npar/nutc,ndiskdat,ntrperiod,nfqso,newdat,npts8,nfa,nfb,ntol, & kin,nzhsym,nsave,nagain,ndepth,nrxlog,nfsample,datetime @@ -16,7 +16,7 @@ subroutine fillcom(nutc0) kin=1024 nzhsym=173 nsave=0 - ndepth=3 + ndepth=ndepth0 nrxlog=1 nfsample=12000 datetime="2013-Apr-16 15:13" diff --git a/lib/jt9.f90 b/lib/jt9.f90 index d1331d57f..1c1e9d49d 100644 --- a/lib/jt9.f90 +++ b/lib/jt9.f90 @@ -25,7 +25,7 @@ program jt9 nargs=iargc() if(nargs.lt.1) then - print*,'Usage: jt9 TRperiod file1 [file2 ...]' + print*,'Usage: jt9 TRperiod ndepth file1 [file2 ...]' print*,' Reads data from *.wav files.' print*,'' print*,' jt9 -s' @@ -39,8 +39,10 @@ program jt9 go to 999 endif read(arg,*) ntrperiod + call getarg(2,arg) + read(arg,*) ndepth - ifile1=2 + ifile1=3 limtrace=0 lu=12 @@ -50,7 +52,7 @@ program jt9 nfqso=1500 newdat=1 nb=0 - nbslider=100 + nbslider=30 limit=20000 ndiskdat=1 @@ -110,12 +112,12 @@ program jt9 s,ccfred,df3,ihsym,nzap,slimit,lstrong,npts8) call timer('symspec ',1) nhsym0=nhsym - if(ihsym.ge.184) go to 10 + if(ihsym.ge.173) go to 10 endif enddo 10 close(10) - call fillcom(nutc0) + call fillcom(nutc0,ndepth) call decoder(ss,c0,1) enddo diff --git a/mainwindow.cpp b/mainwindow.cpp index a059bcb3b..51d04110e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//--------------------------------------------------------------- MainWindow +//-------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" #include "devsetup.h"