diff options
| author | Christoph Berg <myon@debian.org> | 2025-01-09 22:12:06 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-01-09 22:12:06 +0100 |
| commit | 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 (patch) | |
| tree | fbfdfe6bcb0a8a114be2480dac53d88c977e4869 /lib/fqso_first.f90 | |
| parent | 4320ce238aae1fe87fc9f379cdd816e9317885fa (diff) | |
New upstream version 2.7.0~rc8+repackupstream/2.7.0_rc8+repack
Diffstat (limited to 'lib/fqso_first.f90')
| -rwxr-xr-x | lib/fqso_first.f90 | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/lib/fqso_first.f90 b/lib/fqso_first.f90 index 779bfe95..e553e3e4 100755 --- a/lib/fqso_first.f90 +++ b/lib/fqso_first.f90 @@ -1,32 +1,32 @@ -subroutine fqso_first(nfqso,ntol,ca,ncand)
-
-! If a candidate was found within +/- ntol of nfqso, move it into ca(1).
-
- type candidate
- real freq
- real dt
- real sync
- real flip
- end type candidate
- type(candidate) ca(300),cb
-
- dmin=1.e30
- i0=0
- do i=1,ncand
- d=abs(ca(i)%freq-nfqso)
- if(d.lt.dmin) then
- i0=i
- dmin=d
- endif
- enddo
-
- if(dmin.lt.float(ntol)) then
- cb=ca(i0)
- do i=i0,2,-1
- ca(i)=ca(i-1)
- enddo
- ca(1)=cb
- endif
-
- return
-end subroutine fqso_first
+subroutine fqso_first(nfqso,ntol,ca,ncand) + +! If a candidate was found within +/- ntol of nfqso, move it into ca(1). + + type candidate + real freq + real dt + real sync + real flip + end type candidate + type(candidate) ca(300),cb + + dmin=1.e30 + i0=0 + do i=1,ncand + d=abs(ca(i)%freq-nfqso) + if(d.lt.dmin) then + i0=i + dmin=d + endif + enddo + + if(dmin.lt.float(ntol)) then + cb=ca(i0) + do i=i0,2,-1 + ca(i)=ca(i-1) + enddo + ca(1)=cb + endif + + return +end subroutine fqso_first |
