diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:49 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:49 +0200 |
| commit | 76956486fa7ef52a51d4e56df1e13a9f19a6c93c (patch) | |
| tree | fe0c394439fdc167d1970372e8998874090854dd /lib/sync9w.f90 | |
| parent | 0685fcada9f95fe90f70b387cd7d757da8209624 (diff) | |
| parent | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (diff) | |
Update upstream source from tag 'upstream/3.3.0_beta1+dfsg'
Update to upstream version '3.3.0~beta1+dfsg'
with Debian dir 85037bbb9376721108594b59b54ead82ac6924a3
Diffstat (limited to 'lib/sync9w.f90')
| -rw-r--r-- | lib/sync9w.f90 | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/sync9w.f90 b/lib/sync9w.f90 index e25afab0..cb9d4597 100644 --- a/lib/sync9w.f90 +++ b/lib/sync9w.f90 @@ -1,4 +1,4 @@ -subroutine sync9w(ss,nzhsym,lag1,lag2,ia,ib,ccfred,ccfblue,ipkbest,lagpk,nadd) +subroutine sync9w(ss,nzhsym,lag1,lag2,ia,ib,icandidatea,icandidateb,ccfred,ccfblue,ipkbest,lagpk,nadd) include 'constants.f90' real ss(184,NSMAX) @@ -12,10 +12,12 @@ subroutine sync9w(ss,nzhsym,lag1,lag2,ia,ib,ccfred,ccfblue,ipkbest,lagpk,nadd) do j=1,nzhsym sa=ss(j,1:NSMAX) call smo(sa,NSMAX,sb,nadd) - call smo(sb,NSMAX,sa,nadd) + call smo(sa,NSMAX,sb,nadd) ss(j,1:NSMAX)=sa enddo + lagpk=0 + ccfblue=0. ipk=0 ipkbest=0 sbest=0. @@ -23,9 +25,11 @@ subroutine sync9w(ss,nzhsym,lag1,lag2,ia,ib,ccfred,ccfblue,ipkbest,lagpk,nadd) df=12000.0/16384.0 do i=ia,ib !Loop over specified freq range - ss1=ss(1:184,i) !Symbol amplitudes at this freq + ss1=0. + ss1(1:nzhsym)=ss(1:nzhsym,i) !Available symbol amplitudes at this freq call pctile(ss1,nzhsym,50,xmed) !Median level at this freq - ss1=ss1/xmed - 1.0 + if(xmed.le.0.) cycle + ss1(1:nzhsym)=ss1(1:nzhsym)/xmed - 1.0 smax=0. !Find DT in specified range do lag=lag1,lag2 @@ -45,13 +49,14 @@ subroutine sync9w(ss,nzhsym,lag1,lag2,ia,ib,ccfred,ccfblue,ipkbest,lagpk,nadd) enddo ccfred(i)=smax !Best at this freq, over all lags - if(smax.gt.sbest) then + if(i.ge.icandidatea .and. i.le.icandidateb .and. smax.gt.sbest) then sbest=smax ipkbest=ipk ss1save=ss1 endif enddo + if(ipkbest.eq.0) return call pctile(ccfred(ia),ib-ia+1,50,xmed) if(xmed.le.0.0) xmed=1.0 ccfred=ccfred/xmed |
