diff options
| author | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2018-02-16 15:17:14 +0000 |
| commit | 37f727ac0746fd85504aa46c1f023c09b3eff33a (patch) | |
| tree | c8a7ce04545040a8f161ba279528730bd9a3e6ab /lib/ccf2.f90 | |
| parent | d63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff) | |
New upstream version 1.8.0+repackupstream/1.8.0+repack
Diffstat (limited to 'lib/ccf2.f90')
| -rw-r--r-- | lib/ccf2.f90 | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/ccf2.f90 b/lib/ccf2.f90 index 4e74a52e..194608d1 100644 --- a/lib/ccf2.f90 +++ b/lib/ccf2.f90 @@ -1,7 +1,6 @@ -subroutine ccf2(ss,nz,nflip,ccfbest,lagpk)
+subroutine ccf2(ss,nz,nflip,ccfbest,xlagpk)
- parameter (LAGMAX=60)
-! parameter (LAGMAX=200)
+ parameter (LAGMIN=-86,LAGMAX=258)
real ss(nz)
real ccf(-LAGMAX:LAGMAX)
integer npr(126)
@@ -18,15 +17,15 @@ subroutine ccf2(ss,nz,nflip,ccfbest,lagpk) save
ccfbest=0.
- lag1=-LAGMAX
+ lag1=LAGMIN
lag2=LAGMAX
do lag=lag1,lag2
s0=0.
s1=0.
do i=1,126
- j=2*(8*i + 43) + lag
+ j=16*(i-1)+1 + lag
if(j.ge.1 .and. j.le.nz-8) then
- x=ss(j)+ss(j+8) !Add two half-symbol contributions
+ x=ss(j)
if(npr(i).eq.0) then
s0=s0 + x
else
@@ -38,8 +37,12 @@ subroutine ccf2(ss,nz,nflip,ccfbest,lagpk) if(ccf(lag).gt.ccfbest) then
ccfbest=ccf(lag)
lagpk=lag
+ xlagpk=lagpk
endif
enddo
-
+ if( lagpk.gt.-LAGMAX .and. lagpk.lt.LAGMAX) then
+ call peakup(ccf(lagpk-1),ccf(lagpk),ccf(lagpk+1),dx)
+ xlagpk=lagpk+dx
+ endif
return
end subroutine ccf2
|
