mirror of https://github.com/saitohirga/WSJT-X.git
1. Use Lorentzian profile for smoothing (but not yet for message averaging).
2. Add ability to set ndepth and do message averaging ti fer65. 3. Correct SNR values for measured Doppler width. 4. Comment out the "write(62..." diagnostics. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6537 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
533bb81220
commit
767a9452e6
|
@ -388,6 +388,7 @@ set (wsjt_FSRCS
|
||||||
lib/slope.f90
|
lib/slope.f90
|
||||||
lib/smo.f90
|
lib/smo.f90
|
||||||
lib/smo121.f90
|
lib/smo121.f90
|
||||||
|
lib/smolorentz.f90
|
||||||
lib/softsym.f90
|
lib/softsym.f90
|
||||||
lib/softsym9f.f90
|
lib/softsym9f.f90
|
||||||
lib/shell.f90
|
lib/shell.f90
|
||||||
|
|
|
@ -13,6 +13,7 @@ subroutine decode65a(dd,npts,newdat,nqd,f0,nflip,mode65,ntrials, &
|
||||||
complex cx1(NMAX/8) !Data at 1378.125 sps, offset by 355.3 Hz
|
complex cx1(NMAX/8) !Data at 1378.125 sps, offset by 355.3 Hz
|
||||||
complex c5x(NMAX/32) !Data at 344.53125 Hz
|
complex c5x(NMAX/32) !Data at 344.53125 Hz
|
||||||
complex c5a(512)
|
complex c5a(512)
|
||||||
|
real s1a(-255:256,126)
|
||||||
real s2(66,126)
|
real s2(66,126)
|
||||||
real a(5)
|
real a(5)
|
||||||
logical first
|
logical first
|
||||||
|
@ -90,16 +91,15 @@ subroutine decode65a(dd,npts,newdat,nqd,f0,nflip,mode65,ntrials, &
|
||||||
maxsmo=2*minsmo
|
maxsmo=2*minsmo
|
||||||
endif
|
endif
|
||||||
nn=0
|
nn=0
|
||||||
do ismo=minsmo,maxsmo
|
do ismo=0,3
|
||||||
if(ismo.gt.0) then
|
if(ismo.gt.0) then
|
||||||
|
w=width/df
|
||||||
|
if(ismo.eq.2) w=1.414*w
|
||||||
|
if(ismo.eq.3) w=2.0*w
|
||||||
do j=1,126
|
do j=1,126
|
||||||
call smo121(s1(-255,j),512)
|
call smolorentz(s1(-255,j),512,w,s1a(-255,j))
|
||||||
if(j.eq.1) nn=nn+1
|
|
||||||
if(nn.ge.4) then
|
|
||||||
call smo121(s1(-255,j),512)
|
|
||||||
if(j.eq.1) nn=nn+1
|
|
||||||
endif
|
|
||||||
enddo
|
enddo
|
||||||
|
s1=s1a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
do i=1,66
|
do i=1,66
|
||||||
|
|
|
@ -19,13 +19,13 @@ program fer65
|
||||||
|
|
||||||
implicit real*8 (a-h,o-z)
|
implicit real*8 (a-h,o-z)
|
||||||
real*8 s(6),sq(6)
|
real*8 s(6),sq(6)
|
||||||
character arg*12,cmnd*100,decoded*22,submode*1,csync*1
|
character arg*12,cmnd*100,decoded*22,submode*1,csync*1,f1*15,f2*15
|
||||||
logical syncok
|
logical syncok
|
||||||
|
|
||||||
nargs=iargc()
|
nargs=iargc()
|
||||||
if(nargs.ne.5) then
|
if(nargs.ne.6) then
|
||||||
print*,'Usage: fer65 submode fspread snr1 snr2 iters'
|
print*,'Usage: fer65 submode fspread snr1 snr2 depth iters'
|
||||||
print*,'Example: fer65 C 3.0 -28 -12 1000'
|
print*,'Example: fer65 C 3.0 -28 -12 5 1000'
|
||||||
go to 999
|
go to 999
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -37,6 +37,8 @@ program fer65
|
||||||
call getarg(4,arg)
|
call getarg(4,arg)
|
||||||
read(arg,*) snr2
|
read(arg,*) snr2
|
||||||
call getarg(5,arg)
|
call getarg(5,arg)
|
||||||
|
read(arg,*) ndepth
|
||||||
|
call getarg(6,arg)
|
||||||
read(arg,*) iters
|
read(arg,*) iters
|
||||||
|
|
||||||
dfmax=min(d,0.5*2.69)
|
dfmax=min(d,0.5*2.69)
|
||||||
|
@ -46,13 +48,15 @@ program fer65
|
||||||
|
|
||||||
ntrials=1000
|
ntrials=1000
|
||||||
naggressive=10
|
naggressive=10
|
||||||
|
nfiles=1
|
||||||
|
if(ndepth.eq.4) nfiles=4
|
||||||
|
|
||||||
open(20,file='fer65.20',status='unknown')
|
open(20,file='fer65.20',status='unknown')
|
||||||
open(21,file='fer65.21',status='unknown')
|
open(21,file='fer65.21',status='unknown')
|
||||||
|
|
||||||
write(20,1000) submode,iters,ntrials,naggressive,d
|
write(20,1000) submode,iters,ntrials,naggressive,d,ndepth,nfiles
|
||||||
1000 format(/'JT65',a1,' Iters:',i6,' T:',i7,' Aggressive:',i3, &
|
1000 format(/'JT65',a1,' Iters:',i5,' T:',i6,' Aggressive:',i3, &
|
||||||
' Doppler:',f6.1)
|
' Doppler:',f5.1,' Depth:',i2,' Navg:',i3)
|
||||||
write(20,1002)
|
write(20,1002)
|
||||||
1002 format(/' dB nsync ngood nbad sync dsnr ', &
|
1002 format(/' dB nsync ngood nbad sync dsnr ', &
|
||||||
'DT Freq Drift Width'/85('-'))
|
'DT Freq Drift Width'/85('-'))
|
||||||
|
@ -67,11 +71,19 @@ program fer65
|
||||||
s=0.
|
s=0.
|
||||||
sq=0.
|
sq=0.
|
||||||
do iter=1,iters
|
do iter=1,iters
|
||||||
write(cmnd,1010) submode,d,snr
|
write(cmnd,1010) submode,d,snr,nfiles
|
||||||
1010 format('./jt65sim -n 1 -m ',a1,' -d',f6.1,' -s \\',f5.1,' >devnull')
|
1010 format('./jt65sim -n 1 -m ',a1,' -d',f6.1,' -s \\',f5.1,' -f',i3,' >devnull')
|
||||||
call unlink('000000_0001.wav')
|
call unlink('000000_????.wav')
|
||||||
! print*,cmnd
|
|
||||||
call system(cmnd)
|
call system(cmnd)
|
||||||
|
if(nfiles.gt.1) then
|
||||||
|
do i=nfiles,2,-1
|
||||||
|
j=2*i-1
|
||||||
|
write(f1,1011) i
|
||||||
|
write(f2,1011) j
|
||||||
|
1011 format('000000_',i4.4,'.wav')
|
||||||
|
call rename(f1,f2)
|
||||||
|
enddo
|
||||||
|
endif
|
||||||
call unlink('decoded.txt')
|
call unlink('decoded.txt')
|
||||||
call unlink('fort.13')
|
call unlink('fort.13')
|
||||||
isync=0
|
isync=0
|
||||||
|
@ -80,14 +92,16 @@ program fer65
|
||||||
nfreq=0
|
nfreq=0
|
||||||
ndrift=0
|
ndrift=0
|
||||||
nwidth=0
|
nwidth=0
|
||||||
cmnd='./jt65 -m A -a 10 -f 1500 -n 1000 -d 3 -s -X 32 000000_0001.wav > decoded.txt'
|
cmnd='./jt65 -m A -a 10 -c K1ABC -f 1500 -n 1000 -d 5 -s -X 32 000000_????.wav > decoded.txt'
|
||||||
cmnd(11:11)=submode
|
cmnd(11:11)=submode
|
||||||
! print*,cmnd
|
write(cmnd(47:47),'(i1)') ndepth
|
||||||
call system(cmnd)
|
call system(cmnd)
|
||||||
open(13,file='fort.13',status='old',err=20)
|
open(13,file='fort.13',status='old',err=20)
|
||||||
read(13,1012) nutc,isync,nsnr,dt,nfreq,ndrift,nwidth,decoded, &
|
do i=1,nfiles
|
||||||
|
read(13,1012) nutc,isync,nsnr,dt,nfreq,ndrift,nwidth,decoded, &
|
||||||
nft,nsum,nsmo
|
nft,nsum,nsmo
|
||||||
1012 format(i4,i4,i5,f6.2,i5,i4,i3,1x,a22,5x,3i3)
|
1012 format(i4,i4,i5,f6.2,i5,i4,i3,1x,a22,5x,3i3)
|
||||||
|
enddo
|
||||||
close(13)
|
close(13)
|
||||||
syncok=abs(dt).lt.0.2 .and. float(abs(nfreq-1500)).lt.dfmax
|
syncok=abs(dt).lt.0.2 .and. float(abs(nfreq-1500)).lt.dfmax
|
||||||
csync=' '
|
csync=' '
|
||||||
|
|
|
@ -204,7 +204,7 @@ contains
|
||||||
! s2db=10.0*log10(sync2) - 35 !### empirical ###
|
! s2db=10.0*log10(sync2) - 35 !### empirical ###
|
||||||
! if(width.gt.3) s2db=s2db + 2.1*sqrt(width-3.0) + 1.5 + &
|
! if(width.gt.3) s2db=s2db + 2.1*sqrt(width-3.0) + 1.5 + &
|
||||||
! 0.11*(width-7.0) !### empirical^2 ###
|
! 0.11*(width-7.0) !### empirical^2 ###
|
||||||
s2db=sync1 - 30.0
|
s2db=sync1 - 30.0 + db(width/3.3)
|
||||||
nsnr=nint(s2db)
|
nsnr=nint(s2db)
|
||||||
if(nsnr.lt.-30) nsnr=-30
|
if(nsnr.lt.-30) nsnr=-30
|
||||||
if(nsnr.gt.-1) nsnr=-1
|
if(nsnr.gt.-1) nsnr=-1
|
||||||
|
@ -307,7 +307,7 @@ contains
|
||||||
integer nfsave(MAXAVE)
|
integer nfsave(MAXAVE)
|
||||||
integer listutc(10)
|
integer listutc(10)
|
||||||
integer nflipsave(MAXAVE)
|
integer nflipsave(MAXAVE)
|
||||||
! real s1b(-255:256,126)
|
! real s1a(-255:256,126)
|
||||||
! real s1save(-255:256,126,MAXAVE)
|
! real s1save(-255:256,126,MAXAVE)
|
||||||
real s3save(64,63,MAXAVE)
|
real s3save(64,63,MAXAVE)
|
||||||
real s3b(64,63)
|
real s3b(64,63)
|
||||||
|
@ -380,31 +380,31 @@ contains
|
||||||
enddo
|
enddo
|
||||||
if(nsum.lt.2) go to 900
|
if(nsum.lt.2) go to 900
|
||||||
|
|
||||||
rewind 62
|
! rewind 62
|
||||||
sqt=0.
|
! sqt=0.
|
||||||
sqf=0.
|
! sqf=0.
|
||||||
do j=1,64
|
! do j=1,64
|
||||||
i=iused(j)
|
! i=iused(j)
|
||||||
if(i.eq.0) exit
|
! if(i.eq.0) exit
|
||||||
csync='*'
|
! csync='*'
|
||||||
if(nflipsave(i).lt.0) csync='#'
|
! if(nflipsave(i).lt.0) csync='#'
|
||||||
write(62,3001) i,iutc(i),syncsave(i),dtsave(i),nfsave(i),csync
|
! write(62,3001) i,iutc(i),syncsave(i),dtsave(i),nfsave(i),csync
|
||||||
3001 format(i3,i6.4,f6.1,f6.2,i6,1x,a1)
|
!3001 format(i3,i6.4,f6.1,f6.2,i6,1x,a1)
|
||||||
sqt=sqt + (dtsave(i)-dtave)**2
|
! sqt=sqt + (dtsave(i)-dtave)**2
|
||||||
sqf=sqf + (nfsave(i)-fave)**2
|
! sqf=sqf + (nfsave(i)-fave)**2
|
||||||
enddo
|
! enddo
|
||||||
rmst=0.
|
! rmst=0.
|
||||||
rmsf=0.
|
! rmsf=0.
|
||||||
if(nsum.ge.2) then
|
! if(nsum.ge.2) then
|
||||||
rmst=sqrt(sqt/(nsum-1))
|
! rmst=sqrt(sqt/(nsum-1))
|
||||||
rmsf=sqrt(sqf/(nsum-1))
|
! rmsf=sqrt(sqf/(nsum-1))
|
||||||
endif
|
! endif
|
||||||
write(62,3002)
|
! write(62,3002)
|
||||||
3002 format(16x,'----- -----')
|
!3002 format(16x,'----- -----')
|
||||||
write(62,3003) dtave,nint(fave)
|
! write(62,3003) dtave,nint(fave)
|
||||||
write(62,3003) rmst,nint(rmsf)
|
! write(62,3003) rmst,nint(rmsf)
|
||||||
3003 format(15x,f6.2,i6)
|
!3003 format(15x,f6.2,i6)
|
||||||
flush(62)
|
! flush(62)
|
||||||
|
|
||||||
nadd=nsum*mode65
|
nadd=nsum*mode65
|
||||||
nftt=0
|
nftt=0
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
!program smolorentz
|
||||||
|
subroutine smolorentz(s1,nz,w,s2)
|
||||||
|
|
||||||
|
! parameter (nz=512)
|
||||||
|
real s1(nz),s2(nz)
|
||||||
|
real y(-50:50)
|
||||||
|
! character*8 arg
|
||||||
|
|
||||||
|
! s1=0.
|
||||||
|
! s1(256)=1.
|
||||||
|
|
||||||
|
! call getarg(1,arg)
|
||||||
|
! read(arg,*) w
|
||||||
|
|
||||||
|
do i=-50,50
|
||||||
|
x=i
|
||||||
|
z=x/(0.5*w)
|
||||||
|
y(i)=0.
|
||||||
|
if(abs(z).lt.3.0) then
|
||||||
|
d=1.0 + z*z
|
||||||
|
y(i)=(1.0/d - 0.1)*10.0/9.0
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
|
||||||
|
jz=nint(1.5*w)
|
||||||
|
if(jz.gt.50) jz=50
|
||||||
|
do i=1,nz
|
||||||
|
s=0.
|
||||||
|
sy=0.
|
||||||
|
do j=-jz,jz
|
||||||
|
k=i+j
|
||||||
|
if(k.ge.1 .and. k.le.nz) then
|
||||||
|
s=s + s1(k)*y(j)
|
||||||
|
sy=sy+y(j)
|
||||||
|
endif
|
||||||
|
enddo
|
||||||
|
s2(i)=s/sy
|
||||||
|
! write(52,3002) i-256,s1(i),s2(i)
|
||||||
|
!3002 format(i5,2f10.4)
|
||||||
|
enddo
|
||||||
|
|
||||||
|
end subroutine smolorentz
|
Loading…
Reference in New Issue