diff --git a/lib/js8/syncjs8.f90 b/lib/js8/syncjs8.f90 index 1635fa2..daea1c8 100644 --- a/lib/js8/syncjs8.f90 +++ b/lib/js8/syncjs8.f90 @@ -145,10 +145,6 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase) enddo ncand=k -! Put nfqso at top of list - do i=1,ncand - if(abs(candidate0(1,i)-nfqso).lt.10.0) candidate0(1,i)=-candidate0(1,i) - enddo ! Save only the best of near-dupe freqs. do i=1,ncand @@ -162,6 +158,11 @@ subroutine syncjs8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase) enddo endif enddo + +! Put nfqso at top of list + do i=1,ncand + if(abs(candidate0(1,i)-nfqso).lt.10.0) candidate0(1,i)=-candidate0(1,i) + enddo fac=20.0/maxval(s) s=fac*s