Sort candidates by frequency, after all.

This commit is contained in:
Joe Taylor 2022-12-05 11:54:16 -05:00
parent 27f304752a
commit e4a7f3a22a
2 changed files with 9 additions and 2 deletions

View File

@ -4,7 +4,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, & neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, &
ndiskdat,nxpol,nmode,ndop00) ndiskdat,nxpol,nmode,ndop00)
! Processes timf2 data from Linrad to find and decode JT65 signals. ! Processes timf2 data from Linrad to find and decode JT65 and Q65 signals.
use wideband_sync use wideband_sync
use timer_module, only: timer use timer_module, only: timer
@ -67,7 +67,6 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
call timer('get_cand',1) call timer('get_cand',1)
candec=.false. candec=.false.
endif endif
print*,'~ncand:',ncand
!### !###
! do k=1,ncand ! do k=1,ncand
! freq=cand(k)%f+nkhz_center-48.0 ! freq=cand(k)%f+nkhz_center-48.0

View File

@ -39,6 +39,7 @@ subroutine get_candidates(ss,savg,xpol,jz,nfa,nfb,nts_jt65,nts_q65,cand,ncand)
integer indx(NFFT) integer indx(NFFT)
logical xpol,skip,ldecoded logical xpol,skip,ldecoded
type(candidate) :: cand(MAX_CANDIDATES) type(candidate) :: cand(MAX_CANDIDATES)
type(candidate) :: cand0(MAX_CANDIDATES)
common/early/nhsym1,nhsym2,ldecoded(32768) common/early/nhsym1,nhsym2,ldecoded(32768)
call wb_sync(ss,savg,xpol,jz,nfa,nfb) !Output to sync() array call wb_sync(ss,savg,xpol,jz,nfa,nfb) !Output to sync() array
@ -103,6 +104,13 @@ subroutine get_candidates(ss,savg,xpol,jz,nfa,nfb,nts_jt65,nts_q65,cand,ncand)
enddo enddo
ncand=k ncand=k
cand0(1:ncand)=cand(1:ncand)
call indexx(cand0(1:ncand)%f,ncand,indx) !Sort by relative snr
do i=1,ncand
k=indx(i)
cand(i)=cand0(k)
enddo
return return
end subroutine get_candidates end subroutine get_candidates