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
This commit is contained in:
Steven Franke 2015-11-22 15:52:34 +00:00
parent c9ad0c3038
commit 16a5a6c56f
1 changed files with 8 additions and 37 deletions

View File

@ -16,7 +16,7 @@ subroutine jt65a(dd0,npts,newdat,nutc,nf1,nf2,nfqso,ntol,nsubmode, &
real dt real dt
real sync real sync
end type candidate end type candidate
type(candidate) ca(300), car(300) type(candidate) ca(300)
type decode type decode
real freq real freq
real dt real dt
@ -52,50 +52,21 @@ subroutine jt65a(dd0,npts,newdat,nutc,nf1,nf2,nfqso,ntol,nsubmode, &
! nfa=max(200,nfqso-ntol) ! nfa=max(200,nfqso-ntol)
! nfb=min(4000,nfqso+ntol) ! nfb=min(4000,nfqso+ntol)
! OPTION 2 is not used at present. Checkbox in Advanced setup selects nrobust=1 ! nrobust = 0: use float ccf. Only if ncand>50 fall back to robust (1-bit) ccf
! nrobust = 0: use only float ccf
! nrobust = 1: use only robust (1-bit) ccf ! nrobust = 1: use only robust (1-bit) ccf
! nrobust = 2: use algorithm below ncand=0
! find ncand using float ccf and ncandr using 1-bit ccf if(nrobust.eq.0) then
! 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
call timer('sync65 ',0) call timer('sync65 ',0)
call sync65(ss,nfa,nfb,nhsym,ca,ncand,0) call sync65(ss,nfa,nfb,nhsym,ca,ncand,0)
call timer('sync65 ',1) call timer('sync65 ',1)
endif endif
if(ncand.gt.50) nrobust=1
if( (nrobust.eq.1) .or. (nrobust.eq.2) ) then if(nrobust.eq.1) then
ncandr=0 ncand=0
call timer('sync65 ',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) call timer('sync65 ',1)
endif 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 nvec=ntrials
if(ncand.gt.75) then if(ncand.gt.75) then