summaryrefslogtreecommitdiff
path: root/map65/libm65/zplot.f90
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
committerhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
commitc25cbdf6fb6d946175f4335fab77bfea601b56db (patch)
tree6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /map65/libm65/zplot.f90
parent71f5689252c9f13e70e1c24856904475b2307809 (diff)
parent0685fcada9f95fe90f70b387cd7d757da8209624 (diff)
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'map65/libm65/zplot.f90')
-rw-r--r--map65/libm65/zplot.f9075
1 files changed, 42 insertions, 33 deletions
diff --git a/map65/libm65/zplot.f90 b/map65/libm65/zplot.f90
index 55aa3c6f..4155a537 100644
--- a/map65/libm65/zplot.f90
+++ b/map65/libm65/zplot.f90
@@ -1,34 +1,43 @@
-subroutine zplot(amp,nz,jj,ave,rms)
-
- real amp(nz)
- character*1 line(100),mark(0:6)
- data mark/' ',' ','.','-','+','X','$'/
-
- sum=0.
- smax=0.
- do i=1,nz
- sum=sum+amp(i)
- if(amp(i).gt.smax) then
- smax=amp(i)
- ipk=i
- endif
- enddo
- ave=(sum-smax)/(nz-1)
- sq=0.
- do i=1,nz
- if(i.ne.ipk) sq=sq+(amp(i)-ave)**2
- enddo
- rms=sqrt(sq/(nz-2))
-
- do i=1,nz
- n=(amp(i)-ave)/rms
-! n=(amp(i)-ave)/0.33
- if(n.lt.0) n=0
- if(n.gt.6) n=6
- line(i)=mark(n)
- enddo
- write(89,1010) jj,0.01*ave,0.01*rms,(line(i),i=1,nz)
-1010 format(i3,2f6.1,1x,100a1)
+module zplot_mod
+ implicit none
+contains
+ subroutine zplot(amp,nz,jj,ave,rms)
+ implicit none
+ integer, intent(in) :: nz, jj
+ real, intent(in) :: amp(nz)
+ real, intent(out) :: ave, rms
+
+ character*1 :: line(100)
+ character*1 :: mark(0:6)
+ data mark/' ',' ','.','-','+','X','$'/
+ integer :: i, ipk, n
+ real :: sum, smax, sq
- return
-end subroutine zplot
+ sum=0.
+ smax=0.
+ do i=1,nz
+ sum=sum+amp(i)
+ if(amp(i).gt.smax) then
+ smax=amp(i)
+ ipk=i
+ endif
+ enddo
+ ave=(sum-smax)/(nz-1)
+ sq=0.
+ do i=1,nz
+ if(i.ne.ipk) sq=sq+(amp(i)-ave)**2
+ enddo
+ rms=sqrt(sq/(nz-2))
+
+ do i=1,nz
+ n=(amp(i)-ave)/rms
+ ! n=(amp(i)-ave)/0.33
+ if(n.lt.0) n=0
+ if(n.gt.6) n=6
+ line(i)=mark(n)
+ enddo
+ write(89,1010) jj,0.01*ave,0.01*rms,(line(i),i=1,nz)
+ 1010 format(i3,2f6.1,1x,100a1)
+
+ end subroutine zplot
+end module zplot_mod