diff options
| author | Christoph Berg <myon@debian.org> | 2026-04-07 19:02:45 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-04-07 19:02:45 +0200 |
| commit | f647d78463c1250ce9c99af664615fafccf5e959 (patch) | |
| tree | 5b00428cef68aef1c9d407e2d4535687422419b6 /lib/fchisq.f90 | |
| parent | 0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (diff) | |
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'lib/fchisq.f90')
| -rw-r--r--[-rwxr-xr-x] | lib/fchisq.f90 | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/lib/fchisq.f90 b/lib/fchisq.f90 index 1aa2b0bb..f84898ba 100755..100644 --- a/lib/fchisq.f90 +++ b/lib/fchisq.f90 @@ -1,44 +1,44 @@ -real function fchisq(c3,npts,fsample,a)
-
- parameter (NMAX=85*16)
- complex c3(npts)
- complex c4(NMAX)
- real a(3)
- complex z
- data a1,a2,a3/99.,99.,99./
- include 'jt9sync.f90'
- save
-
- if(a(1).ne.a1 .or. a(2).ne.a2 .or. a(3).ne.a3) then
- a1=a(1)
- a2=a(2)
- a3=a(3)
- call twkfreq(c3,c4,npts,fsample,a)
- endif
-
-! Get sync power.
- nspsd=16
- sum1=0.
- sum0=0.
- k=-1
- do i=1,85
- z=0.
- do j=1,nspsd
- k=k+1
- z=z+c4(k+1)
- enddo
- pp=real(z)**2 + aimag(z)**2
- if(isync(i).eq.1) then
- sum1=sum1+pp
- else
- sum0=sum0+pp
- endif
- enddo
- sync_4992=(sum1/16.0)/(sum0/69.0) - 1.0 !r4992
- sync_4993=sum1/10000.0 !r4993+
-! write(80,3001) 1.e-5*sum1,1.e-5*sum0,sync_4992,sync_4993,sync
-!3001 format(5f11.4)
- fchisq=-sync_4993
-
- return
-end function fchisq
+real function fchisq(c3,npts,fsample,a) + + parameter (NMAX=85*16) + complex c3(npts) + complex c4(NMAX) + real a(3) + complex z + data a1,a2,a3/99.,99.,99./ + include 'jt9sync.f90' + save + + if(a(1).ne.a1 .or. a(2).ne.a2 .or. a(3).ne.a3) then + a1=a(1) + a2=a(2) + a3=a(3) + call twkfreq(c3,c4,npts,fsample,a) + endif + +! Get sync power. + nspsd=16 + sum1=0. + sum0=0. + k=-1 + do i=1,85 + z=0. + do j=1,nspsd + k=k+1 + z=z+c4(k+1) + enddo + pp=real(z)**2 + aimag(z)**2 + if(isync(i).eq.1) then + sum1=sum1+pp + else + sum0=sum0+pp + endif + enddo + sync_4992=(sum1/16.0)/(sum0/69.0) - 1.0 !r4992 + sync_4993=sum1/10000.0 !r4993+ +! write(80,3001) 1.e-5*sum1,1.e-5*sum0,sync_4992,sync_4993,sync +!3001 format(5f11.4) + fchisq=-sync_4993 + + return +end function fchisq |
