diff options
| author | Enrico Rossi <e.rossi@tecnobrain.com> | 2018-11-03 17:52:26 +0100 |
|---|---|---|
| committer | Enrico Rossi <e.rossi@tecnobrain.com> | 2018-11-03 17:52:26 +0100 |
| commit | b4aebf2d137b892f53503b13785ecae900062ff7 (patch) | |
| tree | 3ba99b2baec2292f2e13bfe90a5e401a5f4c47a5 /lib/xcor.f90 | |
| parent | 37f727ac0746fd85504aa46c1f023c09b3eff33a (diff) | |
New upstream version 1.9.1+repackupstream/1.9.1+repack
* Drop local hamlib copy (commit d1b545be).
* Drop local boost copy (1.63.0).
Diffstat (limited to 'lib/xcor.f90')
| -rw-r--r-- | lib/xcor.f90 | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/xcor.f90 b/lib/xcor.f90 index 3f95f768..83937736 100644 --- a/lib/xcor.f90 +++ b/lib/xcor.f90 @@ -1,4 +1,5 @@ -subroutine xcor(ss,ipk,nsteps,nsym,lag1,lag2,ccf,ccf0,lagpk,flip,fdot,nrobust) +!subroutine xcor(ss,ipk,nsteps,nsym,lag1,lag2,ccf,ccf0,lagpk,flip,fdot,nrobust) +subroutine xcor(ipk,nsteps,nsym,lag1,lag2,ccf,ccf0,lagpk,flip,fdot,nrobust) ! Computes ccf of a row of ss and the pseudo-random array pr. Returns ! peak of the CCF and the lag at which peak occurs. For JT65, the @@ -7,17 +8,19 @@ subroutine xcor(ss,ipk,nsteps,nsym,lag1,lag2,ccf,ccf0,lagpk,flip,fdot,nrobust) use jt65_mod parameter (NHMAX=3413) !Max length of power spectra - parameter (NSMAX=322) !Max number of half-symbol steps + parameter (NSMAX=552) !Max number of quarter-symbol steps real ss(NSMAX,NHMAX) !2d spectrum, stepped by half-symbols real a(NSMAX) - real ccf(-11:540) +! real ccf(-44:118) + real ccf(lag1:lag2) data lagmin/0/ !Silence g77 warning - save +! save + common/sync/ss df=12000.0/8192. - dtstep=0.5/df +! dtstep=0.5/df + dtstep=0.25/df fac=dtstep/(60.0*df) - do j=1,nsteps ii=nint((j-nsteps/2)*fdot*fac)+ipk if( (ii.ge.1) .and. (ii.le.NHMAX) ) then @@ -43,7 +46,7 @@ subroutine xcor(ss,ipk,nsteps,nsym,lag1,lag2,ccf,ccf0,lagpk,flip,fdot,nrobust) do lag=lag1,lag2 x=0. do i=1,nsym - j=2*i-1+lag + j=4*i-3+lag if(j.ge.1 .and. j.le.nsteps) x=x+a(j)*pr(i) enddo ccf(lag)=2*x !The 2 is for plotting scale |
