summaryrefslogtreecommitdiff
path: root/lib/sh65snr.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2025-01-09 22:12:06 +0100
committerChristoph Berg <myon@debian.org>2025-01-09 22:12:06 +0100
commit992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 (patch)
treefbfdfe6bcb0a8a114be2480dac53d88c977e4869 /lib/sh65snr.f90
parent4320ce238aae1fe87fc9f379cdd816e9317885fa (diff)
New upstream version 2.7.0~rc8+repackupstream/2.7.0_rc8+repack
Diffstat (limited to 'lib/sh65snr.f90')
-rwxr-xr-xlib/sh65snr.f9072
1 files changed, 36 insertions, 36 deletions
diff --git a/lib/sh65snr.f90 b/lib/sh65snr.f90
index bc4cab7d..3d449010 100755
--- a/lib/sh65snr.f90
+++ b/lib/sh65snr.f90
@@ -1,36 +1,36 @@
-subroutine sh65snr(x,nz,snr)
-
- real x(nz)
-
- ipk=0 !Shut up compiler warnings. -db
- smax=-1.e30
- do i=1,nz
- if(x(i).gt.smax) then
- ipk=i
- smax=x(i)
- endif
- s=s+x(i)
- enddo
-
- s=0.
- ns=0
- do i=1,nz
- if(abs(i-ipk).ge.3) then
- s=s+x(i)
- ns=ns+1
- endif
- enddo
- ave=s/ns
-
- sq=0.
- do i=1,nz
- if(abs(i-ipk).ge.3) then
- sq=sq+(x(i)-ave)**2
- ns=ns+1
- endif
- enddo
- rms=sqrt(sq/(nz-2))
- snr=(smax-ave)/rms
-
- return
-end subroutine sh65snr
+subroutine sh65snr(x,nz,snr)
+
+ real x(nz)
+
+ ipk=0 !Shut up compiler warnings. -db
+ smax=-1.e30
+ do i=1,nz
+ if(x(i).gt.smax) then
+ ipk=i
+ smax=x(i)
+ endif
+ s=s+x(i)
+ enddo
+
+ s=0.
+ ns=0
+ do i=1,nz
+ if(abs(i-ipk).ge.3) then
+ s=s+x(i)
+ ns=ns+1
+ endif
+ enddo
+ ave=s/ns
+
+ sq=0.
+ do i=1,nz
+ if(abs(i-ipk).ge.3) then
+ sq=sq+(x(i)-ave)**2
+ ns=ns+1
+ endif
+ enddo
+ rms=sqrt(sq/(nz-2))
+ snr=(smax-ave)/rms
+
+ return
+end subroutine sh65snr