From 16a5a6c56f41375d5a991770cbd2cbb006b79084 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Sun, 22 Nov 2015 15:52:34 +0000 Subject: [PATCH] Simplify sync logic and restore fallback to robust sync when ncand>50, even when box is un-checked. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6152 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/jt65a.f90 | 45 ++++++++------------------------------------- 1 file changed, 8 insertions(+), 37 deletions(-) diff --git a/lib/jt65a.f90 b/lib/jt65a.f90 index 127e768d6..7ae2656be 100644 --- a/lib/jt65a.f90 +++ b/lib/jt65a.f90 @@ -16,7 +16,7 @@ subroutine jt65a(dd0,npts,newdat,nutc,nf1,nf2,nfqso,ntol,nsubmode, & real dt real sync end type candidate - type(candidate) ca(300), car(300) + type(candidate) ca(300) type decode real freq real dt @@ -52,50 +52,21 @@ subroutine jt65a(dd0,npts,newdat,nutc,nf1,nf2,nfqso,ntol,nsubmode, & ! nfa=max(200,nfqso-ntol) ! nfb=min(4000,nfqso+ntol) -! OPTION 2 is not used at present. Checkbox in Advanced setup selects nrobust=1 -! nrobust = 0: use only float ccf +! nrobust = 0: use float ccf. Only if ncand>50 fall back to robust (1-bit) ccf ! nrobust = 1: use only robust (1-bit) ccf -! nrobust = 2: use algorithm below -! find ncand using float ccf and ncandr using 1-bit ccf -! if ncand>50, use robust ccf -! if ncand<25 and ncandr<25, form union of both sets -! else, use float ccf - if( (nrobust.eq.0) .or. (nrobust.eq.2) ) then - ncand=0 + ncand=0 + if(nrobust.eq.0) then call timer('sync65 ',0) call sync65(ss,nfa,nfb,nhsym,ca,ncand,0) call timer('sync65 ',1) endif - - if( (nrobust.eq.1) .or. (nrobust.eq.2) ) then - ncandr=0 + if(ncand.gt.50) nrobust=1 + if(nrobust.eq.1) then + ncand=0 call timer('sync65 ',0) - call sync65(ss,nfa,nfb,nhsym,car,ncandr,1) + call sync65(ss,nfa,nfb,nhsym,ca,ncand,1) call timer('sync65 ',1) endif - if( (nrobust.eq.1) .or. ((nrobust.eq.2) .and. (ncand.gt.50)) ) then - ncand=ncandr - do i=1,ncand - ca(i)=car(i) - enddo - elseif(nrobust.eq.2.and.ncand.le.25.and.ncandr.le.25) then - do icand=1,ncand ! combine ca and car, without dupes - ndupe=0 - do j=1,ncandr - if( abs(ca(icand)%freq-car(j)%freq) .lt. 1.0 ) then - ndupe=1 - endif - enddo - if( ndupe.eq.0 ) then - ncandr=ncandr+1 - car(ncandr)=ca(icand) - endif - enddo - ncand=ncandr - do i=1,ncand - ca(i)=car(i) - enddo - endif nvec=ntrials if(ncand.gt.75) then