mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-03 09:44:24 -05:00
Add stats (convenience program for measuring decode statistics).
Minor tweaks to hinted-decode routine. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6297 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
2072f6f7c6
commit
b6d9e5dda0
@ -146,14 +146,11 @@ subroutine exp_decode65(s3,mrs,mrs2,mrsym,mr2sym,mrprob,mode65,flip, &
|
||||
enddo
|
||||
|
||||
! ### DO NOT REMOVE ###
|
||||
! call cs_lock('deep65')
|
||||
! rewind 77
|
||||
! write(77,*) p1,p2
|
||||
! call flush(77)
|
||||
! call cs_unlock
|
||||
! ### Works OK without it (in both Windows and Linux) if compiled
|
||||
! ### without optimization. However, in Windows this is a colossal
|
||||
! ### pain because of the way F2PY wants to run the compile step.
|
||||
rewind 77
|
||||
write(77,*) p1,p2
|
||||
call flush(77)
|
||||
! ### Works OK without these three lines (in both Windows and Linux)
|
||||
! ### if compiled without optimization.
|
||||
|
||||
bias=max(1.12*p2,0.335)
|
||||
if(mode65.eq.2) bias=max(1.08*p2,0.405)
|
||||
|
@ -95,6 +95,7 @@ subroutine extract(s3,nadd,ntrials,naggressive,ndepth,mycall_12, &
|
||||
if(qual.ge.qmin) then
|
||||
nft=2
|
||||
else
|
||||
decoded=' '
|
||||
param=0
|
||||
ntry=0
|
||||
endif
|
||||
|
64
lib/stats.f90
Normal file
64
lib/stats.f90
Normal file
@ -0,0 +1,64 @@
|
||||
program stats
|
||||
|
||||
character*8 arg
|
||||
character*40 infile
|
||||
character decoded*22
|
||||
|
||||
nargs=iargc()
|
||||
if(nargs.lt.1) then
|
||||
print*,'Usage: stats file1 ...'
|
||||
go to 999
|
||||
endif
|
||||
|
||||
ttol=0.1
|
||||
nftol=1
|
||||
write(*,1000)
|
||||
1000 format(' SNR Nsigs Sync BM FT Hint Total False BadSync'/ &
|
||||
67('-'))
|
||||
|
||||
do ifile=1,nargs
|
||||
call getarg(ifile,infile)
|
||||
open(10,file=infile,status='old')
|
||||
i1=index(infile,".")
|
||||
read(infile(i1+1:i1+2),*) snrgen
|
||||
snrgen=-snrgen
|
||||
nsynced=0
|
||||
nbm=0
|
||||
nftok=0
|
||||
nhint=0
|
||||
ngood=0
|
||||
nbad=0
|
||||
nbadsync=0
|
||||
|
||||
do iline=1,999999
|
||||
read(10,1010,end=100) nutc,nsync,nsnr,dt,nfreq,ncandidates,nhard, &
|
||||
ntotal,ntry,naggressive,nft,nqual,decoded
|
||||
1010 format(i4.4,i3,i4,f6.2,i5,i7,i3,i4,i8,i3,i2,i5,1x,a22)
|
||||
ndfreq=9999
|
||||
do ifreq=600,2400,200
|
||||
n=abs(nfreq-ifreq)
|
||||
if(n.lt.ndfreq) ndfreq=n
|
||||
enddo
|
||||
|
||||
if(nsync.ge.3 .and. abs(dt).le.ttol .and. ndfreq.le.nftol) then
|
||||
nsynced=nsynced+1
|
||||
else
|
||||
nbadsync=nbadsync+1
|
||||
endif
|
||||
if(decoded.eq.' ') cycle
|
||||
if(decoded(1:11).eq.'K1ABC W9XYZ') then
|
||||
ngood=ngood+1
|
||||
if(ncandidates.eq.0) nbm=nbm+1
|
||||
if(nft.eq.1) nftok=nftok+1
|
||||
if(nft.ge.1) nhint=nhint+1
|
||||
else
|
||||
nbad=nbad+1
|
||||
endif
|
||||
enddo
|
||||
|
||||
100 write(*,1100) snrgen,10*nutc,nsynced,nbm,nftok,nhint,ngood,nbad, &
|
||||
nbadsync
|
||||
1100 format(f5.1,8i6)
|
||||
enddo
|
||||
|
||||
999 end program stats
|
Loading…
Reference in New Issue
Block a user