summaryrefslogtreecommitdiff
path: root/lib/xcor4.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-10-14 14:39:20 +0200
committerChristoph Berg <myon@debian.org>2026-10-14 14:39:20 +0200
commitc576a4281ef8c87990ae6399393a827dfaccacd5 (patch)
tree0f28b7d1fc2ba73ccea5d7513281b0f8cae76fb6 /lib/xcor4.f90
parentffc62c792c9a5196cb4ce7a353287dfe20db6524 (diff)
New upstream version 3.3.0~beta2+dfsgupstream/3.3.0_beta2+dfsgupstream
Diffstat (limited to 'lib/xcor4.f90')
-rw-r--r--lib/xcor4.f9030
1 files changed, 6 insertions, 24 deletions
diff --git a/lib/xcor4.f90 b/lib/xcor4.f90
index fa9c2012..2dc2deb9 100644
--- a/lib/xcor4.f90
+++ b/lib/xcor4.f90
@@ -1,40 +1,22 @@
subroutine xcor4(s2,ipk,nsteps,nsym,lag1,lag2,ich,mode4,ccf,ccf0, &
lagpk,flip)
-! Computes ccf of the 4_FSK spectral array s2 and the pseudo-random
-! array pr2. Returns peak of CCF and the lag at which peak occurs.
+! Computes ccf of the 4_FSK spectral array s2 and the pseudo-random
+! array pr2. Returns peak of CCF and the lag at which peak occurs.
! The CCF peak may be either positive or negative, with negative
! implying the "OOO" message.
+ use jt4, only: nch,npr
parameter (NHMAX=1260) !Max length of power spectra
parameter (NSMAX=525) !Max number of half-symbol steps
real s2(NHMAX,NSMAX) !2d spectrum, stepped by half-symbols
real a(NSMAX)
real ccf(-5:540)
- integer nch(7)
- integer npr2(207)
real pr2(207)
- logical first
- data lagmin/0/ !Silence compiler warning
- data first/.true./
- data npr2/ &
- 0,0,0,0,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,0,0,0,0,0,0,1,1,0,0, &
- 0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,1,0,1,0,1,1,1,1,1,0,1,0,0,0, &
- 1,0,0,1,0,0,1,1,1,1,1,0,0,0,1,0,1,0,0,0,1,1,1,1,0,1,1,0,0,1, &
- 0,0,0,1,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,0,1,0,1,0,1,1,0,1,0,1, &
- 0,1,1,1,0,0,1,0,1,1,0,1,1,1,1,0,0,0,0,1,1,0,1,1,0,0,0,1,1,1, &
- 0,1,1,1,0,1,1,1,0,0,1,0,0,0,1,1,0,1,1,0,0,1,0,0,0,1,1,1,1,1, &
- 1,0,0,1,1,0,0,0,0,1,1,0,0,0,1,0,1,1,0,1,1,1,1,0,1,0,1/
- data nch/1,2,4,9,18,36,72/
- save
-
- if(first) then
- do i=1,207
- pr2(i)=2*npr2(i)-1
- enddo
- first=.false.
- endif
+ pr2=2*npr-1
+ lagpk=lag1
+ lagmin=lag1
ccfmax=0.
ccfmin=0.
nw=nch(min(max(ich,1),7))