Process the q3 candidates in frequency order rather than snr1 order.

This commit is contained in:
Joe Taylor 2023-02-15 17:05:15 -05:00
parent f9d2ca736d
commit da3c63e739

View File

@ -493,6 +493,7 @@ subroutine q65_ccf_22(s1,iz,jz,nfqso,ntol,iavg,ipk,jpk, &
real s1(iz,jz)
real ccf2(iz) !Orange sync curve
real tmp(20,3)
real, allocatable :: xdt2(:)
real, allocatable :: s1avg(:)
integer, allocatable :: indx(:)
@ -591,6 +592,13 @@ subroutine q65_ccf_22(s1,iz,jz,nfqso,ntol,iavg,ipk,jpk, &
if(ncand.ge.maxcand) exit
enddo
! Resort the candidates back into frequency order
tmp(1:ncand,1:3)=candidates(1:ncand,1:3)
call indexx(tmp(1:ncand,3),ncand,indx)
do i=1,ncand
candidates(i,1:3)=tmp(indx(i),1:3)
enddo
return
end subroutine q65_ccf_22