From da3c63e739b66d08848d3c224941314a11d6818c Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 15 Feb 2023 17:05:15 -0500 Subject: [PATCH] Process the q3 candidates in frequency order rather than snr1 order. --- lib/qra/q65/q65.f90 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/qra/q65/q65.f90 b/lib/qra/q65/q65.f90 index 65f72a821..2e933a9e2 100644 --- a/lib/qra/q65/q65.f90 +++ b/lib/qra/q65/q65.f90 @@ -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