mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-26 22:28:41 -05:00
Implement a final stage of noise blanking on the timf2 data.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@1019 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
2b015a1823
commit
7168208cdd
@ -8,6 +8,7 @@ real ccf !CCF in time (blue curve) Decoder
|
||||
real green !Data for green line GUI
|
||||
real fselect !Specified QSO frequency GUI
|
||||
real pctlost !Percent of lost packets Decoder
|
||||
real pctblank !Percent of blanked blocks/packets Decoder
|
||||
real rxnoise !Rx noise in dB recvpkt
|
||||
real dphi !Phase shift between pol'n channels GUI,Decoder
|
||||
integer ngreen !Length of green GUI
|
||||
@ -103,7 +104,7 @@ character*12 pttport
|
||||
character*8 utcdata !HHMM UTC for the processed data Decoder
|
||||
|
||||
common/gcom2/fcenter,ps0(431),psavg(450),s2(64,3100),ccf(-5:540), &
|
||||
green(500),fselect,pctlost,rxnoise,dphi,ngreen,dgain,iter, &
|
||||
green(500),fselect,pctlost,pctblank,rxnoise,dphi,ngreen,dgain,iter, &
|
||||
ndecoding,ndecoding0,mousebutton,multicast, &
|
||||
ndecdone,npingtime,ierr,lauto,mantx,nrestart,ntr,nmsg,nsave,nadd5, &
|
||||
dftolerance,LDecoded,rxdone,monitoring,nzap,minsigdb, &
|
||||
|
11
map65.py
11
map65.py
@ -970,13 +970,10 @@ def update():
|
||||
t=time.strftime('%Y %b %d\n%H:%M:%S',utc)
|
||||
Audio.gcom2.utcdate=t[:12]
|
||||
ldate.configure(text=t)
|
||||
t="Rx noise: %.1f dB" % Audio.gcom2.rxnoise
|
||||
t="Rx: %.1f dB %.1f %%" % (Audio.gcom2.rxnoise,Audio.gcom2.pctblank)
|
||||
msg4.configure(text=t)
|
||||
t="Drop: %.2f %%" % Audio.gcom2.pctlost
|
||||
msg5.configure(text=t)
|
||||
## t="%d %.2f %.2f" % (Audio.datcom.kbuf,Audio.datcom.kk/(60.0*96000.0), \
|
||||
## Audio.datcom.kxp/(60.0*96000.0))
|
||||
msg5.configure(text=t)
|
||||
root_geom=root.geometry()
|
||||
try:
|
||||
bm_geom=bm.geometry()
|
||||
@ -1620,12 +1617,14 @@ f5a.pack(side=LEFT,expand=1,fill=BOTH)
|
||||
#------------------------------------------------------ Receiving parameters
|
||||
f5b=Frame(iframe5,bd=2,relief=GROOVE)
|
||||
nzap=IntVar()
|
||||
bblank=Checkbutton(f5b,text='NB',justify=RIGHT,variable=nblank)
|
||||
bblank.grid(column=0,row=0,padx=2,pady=20,sticky='EW')
|
||||
ltol=Label(f5b, bg='white', fg='black', text='Tol 400', width=8, relief=RIDGE)
|
||||
ltol.grid(column=0,row=2,padx=2,pady=1,sticky='EW')
|
||||
ltol.grid(column=0,row=1,padx=2,pady=1,sticky='EW')
|
||||
Widget.bind(ltol,'<Button-1>',inctol)
|
||||
Widget.bind(ltol,'<Button-3>',dectol)
|
||||
ldsec=Label(f5b, bg='white', fg='black', text='Dsec 0.0', width=8, relief=RIDGE)
|
||||
ldsec.grid(column=0,row=4,ipadx=3,padx=2,pady=5,sticky='EW')
|
||||
ldsec.grid(column=0,row=2,ipadx=3,padx=2,pady=5,sticky='EW')
|
||||
Widget.bind(ldsec,'<Button-1>',incdsec)
|
||||
Widget.bind(ldsec,'<Button-3>',decdsec)
|
||||
|
||||
|
@ -15,7 +15,7 @@ subroutine recvpkt(iarg)
|
||||
include 'gcom2.f90'
|
||||
equivalence (id,d8)
|
||||
data nblock0/0/,kb/1/,ns00/99/
|
||||
data sqave/0.0/,u/0.001/,rxnoise/0.0/,kbuf/1/,lost_tot/0/
|
||||
data sqave/0.0/,u/0.001/,rxnoise/0.0/,pctblank/0.0/,kbuf/1/,lost_tot/0/
|
||||
data multicast0/-99/
|
||||
save
|
||||
|
||||
|
57
symspec.f90
57
symspec.f90
@ -30,7 +30,64 @@ subroutine symspec(id,kbuf,kk,kkdone,nutc,newdat)
|
||||
szavg(ip,i)=0.
|
||||
enddo
|
||||
enddo
|
||||
|
||||
! Get baseline power level for this minute
|
||||
n1=174 !Block size (somewhat arbitrary)
|
||||
n2=(kkk-kkdone)/n1 !Number of blocks
|
||||
k=0 !Starting place
|
||||
sqq=0.
|
||||
nsqq=0
|
||||
do j=1,n2
|
||||
sq=0.
|
||||
do i=1,n1 !Find power in each block
|
||||
k=k+1
|
||||
x1=id(1,k,kbuf)
|
||||
x2=id(2,k,kbuf)
|
||||
x3=id(3,k,kbuf)
|
||||
x4=id(4,k,kbuf)
|
||||
sq=sq + x1*x1 + x2*x2 + x3*x3 + x4*x4
|
||||
enddo
|
||||
if(sq.lt.n1*10000.) then !Find power in good blocks
|
||||
sqq=sqq+sq
|
||||
nsqq=nsqq+1
|
||||
endif
|
||||
enddo
|
||||
sqave=sqq/nsqq !Average power in good blocks
|
||||
nclip=0
|
||||
nz2=0
|
||||
endif
|
||||
|
||||
if(nblank.ne.0) then
|
||||
! Apply final noise blanking
|
||||
n2=(kkk-kkdone)/n1
|
||||
k=kkdone
|
||||
do j=1,n2
|
||||
sq=0.
|
||||
do i=1,n1
|
||||
k=k+1
|
||||
x1=id(1,k,kbuf)
|
||||
x2=id(2,k,kbuf)
|
||||
x3=id(3,k,kbuf)
|
||||
x4=id(4,k,kbuf)
|
||||
sq=sq + x1*x1 + x2*x2 + x3*x3 + x4*x4
|
||||
enddo
|
||||
! If power in this block is excessive, blank it.
|
||||
if(sq.gt.1.5*sqave) then
|
||||
do i=k-n1+1,k
|
||||
id(1,i,kbuf)=0
|
||||
id(2,i,kbuf)=0
|
||||
id(3,i,kbuf)=0
|
||||
id(4,i,kbuf)=0
|
||||
enddo
|
||||
nclip=nclip+1
|
||||
endif
|
||||
enddo
|
||||
nz2=nz2+n2
|
||||
pctblank=nclip*100.0/nz2
|
||||
! write(*,3002) nblank,n2,nz2,nclip,kkk,kkdone,pctblank,sqave
|
||||
!3002 format(4i6,2i9,f8.1,f10.0)
|
||||
endif
|
||||
!###
|
||||
|
||||
do nn=1,ntot
|
||||
i0=ts+hsym !Starting sample pointer
|
||||
|
Loading…
Reference in New Issue
Block a user