Improve sync for early decodes.

This commit is contained in:
Steven Franke 2022-11-01 17:58:36 -05:00
parent 1bcbca4634
commit a99798fec4
2 changed files with 22 additions and 10 deletions

View File

@ -1,4 +1,4 @@
subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,s,candidate, &
subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,nzhsym,candidate, &
ncand,sbase)
include 'ft8_params.f90'
@ -73,6 +73,10 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,s,candidate, &
t0c=t0c + sum(s(i:i+nfos*6:nfos,m+nssy*72))
endif
enddo
t=ta+tb
t0=t0a+t0b
t0=(t0-t)/6.0
sync_ab=t/t0
t=ta+tb+tc
t0=t0a+t0b+t0c
t0=(t0-t)/6.0
@ -81,13 +85,20 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,s,candidate, &
t0=t0b+t0c
t0=(t0-t)/6.0
sync_bc=t/t0
sync2d(i,j)=max(sync_abc,sync_bc)
if(j.le.-12) then
sync2d(i,j)=sync_bc
elseif(j.gt.-12 .and. j.lt. 49) then
if(nzhsym.eq.41) sync2d(i,j)=sync_ab
if(nzhsym.eq.50) sync2d(i,j)=max(sync_abc,sync_bc)
elseif(j.ge.49) then
sync2d(i,j)=sync_ab
endif
enddo
enddo
red=0.
red2=0.
mlag=20
mlag=10
mlag2=JZ
do i=ia,ib
ii=maxloc(sync2d(i,-mlag:mlag)) - 1 - mlag
@ -110,12 +121,11 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,s,candidate, &
base=red(ibase)
red=red/base
call indexx(red2(ia:ib),iz,indx2)
ibase=indx2(npctile) - 1 + ia
if(ibase.lt.1) ibase=1
if(ibase.gt.nh1) ibase=nh1
base2=red2(ibase)
ibase2=indx2(npctile) - 1 + ia
if(ibase2.lt.1) ibase2=1
if(ibase2.gt.nh1) ibase2=nh1
base2=red2(ibase2)
red2=red2/base2
do i=1,min(MAXPRECAND,iz)
n=ia + indx(iz+1-i) - 1
if(k.ge.MAXPRECAND) exit

View File

@ -166,11 +166,13 @@ contains
! ndepth=2: subtraction, 3 passes, bp+osd (no subtract refinement)
! ndepth=3: subtraction, 3 passes, bp+osd
npass=3
if(ndepth.eq.1) npass=1
if(ndepth.eq.1) npass=2
do ipass=1,npass
newdat=.true.
syncmin=1.3
if(ndepth.le.2) syncmin=1.6
! if(nzhsym.eq.41.or.ipass.eq.1) syncmin=2.0
if(nzhsym.eq.41) syncmin=2.0
if(ipass.eq.1) then
lsubtract=.true.
ndeep=ndepth
@ -187,7 +189,7 @@ contains
endif
call timer('sync8 ',0)
maxc=MAXCAND
call sync8(dd,ifa,ifb,syncmin,nfqso,maxc,s,candidate, &
call sync8(dd,ifa,ifb,syncmin,nfqso,maxc,nzhsym,candidate, &
ncand,sbase)
call timer('sync8 ',1)
do icand=1,ncand