Many tweaks to user interface.

Included "ndepth" adjustments of deep search.
Changed name of bandmap -> messages, bandmap2 -> bandmap.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@456 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2007-07-02 19:17:07 +00:00
parent 83890ea45d
commit 0bd3ae43d9
6 changed files with 66 additions and 96 deletions

View File

@ -1,5 +1,6 @@
subroutine decode1a(id,newdat,nfilt,freq,nflip,dphi,ipol, subroutine decode1a(id,newdat,nfilt,freq,nflip,
+ sync2,a,dt,pol,nkv,nhist,qual,decoded) + mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi,
+ ipol,sync2,a,dt,pol,nkv,nhist,qual,decoded)
C Apply AFC corrections to a candidate JT65 signal, and then try C Apply AFC corrections to a candidate JT65 signal, and then try
C to decode it. C to decode it.
@ -21,6 +22,7 @@ C to decode it.
integer resample integer resample
logical first logical first
character decoded*22 character decoded*22
character mycall*12,hiscall*12,hisgrid*6
data first/.true./,jjjmin/1000/,jjjmax/-1000/ data first/.true./,jjjmin/1000/,jjjmax/-1000/
save save
@ -124,7 +126,8 @@ C Adding or subtracting a small number (e.g., 5) to j may make it decode.
enddo enddo
flip=nflip flip=nflip
call decode65b(s2,flip,nkv,nhist,qual,decoded) call decode65b(s2,flip,mycall,hiscall,hisgrid,neme,ndepth,
+ nqd,nkv,nhist,qual,decoded)
dt=dt00 + dtbest dt=dt00 + dtbest
return return

View File

@ -1,4 +1,5 @@
subroutine decode65b(s2,flip,nkv,nhist,qual,decoded) subroutine decode65b(s2,flip,mycall,hiscall,hisgrid,neme,ndepth,
+ nqd,nkv,nhist,qual,decoded)
real s2(256,126) real s2(256,126)
real s3(64,63) real s3(64,63)
@ -36,14 +37,9 @@ C Suppress "birdie messages":
qual=0. qual=0.
! if(nkv.eq.0) then ! if(nkv.eq.0) then
mycall='K1JT'
hiscall='W1ABC'
hisgrid='EM79'
neme=0
nsked=0
ndepth=5
if(ndepth.ge.1) call deep65(s3,mode65,neme, if(ndepth.ge.1) call deep65(s3,mode65,neme,
+ nsked,flip,mycall,hiscall,hisgrid,deepmsg,qual) + flip,mycall,hiscall,hisgrid,deepmsg,qual)
if(nqd.ne.1 .and. qual.lt.10.0) qual=0.0
C Save symbol spectra for possible decoding of average. C Save symbol spectra for possible decoding of average.
! do j=1,63 ! do j=1,63
@ -51,6 +47,7 @@ C Save symbol spectra for possible decoding of average.
! if(flip.lt.0.0) k=mdat2(j) ! if(flip.lt.0.0) k=mdat2(j)
! call move(s2(8,k),ppsave(1,j,nsave),64) ! call move(s2(8,k),ppsave(1,j,nsave),64)
! enddo ! enddo
! endif ! endif
if(nkv.eq.0 .and. qual.ge.1.0) decoded=deepmsg if(nkv.eq.0 .and. qual.ge.1.0) decoded=deepmsg

View File

@ -1,4 +1,4 @@
subroutine deep65(s3,mode65,neme,nsked,flip,mycall,hiscall, subroutine deep65(s3,mode65,neme,flip,mycall,hiscall,
+ hisgrid,decoded,qual) + hisgrid,decoded,qual)
parameter (MAXCALLS=7000,MAXRPT=63) parameter (MAXCALLS=7000,MAXRPT=63)
@ -100,7 +100,6 @@ C Insert CQ message
call encode65(message,ncode(1,k)) call encode65(message,ncode(1,k))
nflip(k)=flip nflip(k)=flip
enddo enddo
if(nsked.eq.1) go to 20
10 continue 10 continue
enddo enddo
20 ntot=k 20 ntot=k

View File

@ -9,8 +9,8 @@
! 16 c:/wsjt.reg ! 16 c:/wsjt.reg
! 17 wave files written to disk ! 17 wave files written to disk
! 18 test file to be transmitted (wsjtgen.f90) ! 18 test file to be transmitted (wsjtgen.f90)
! 19 bandmap.txt ! 19 messages.txt
! 20 bandmap2.txt ! 20 bandmap.txt
! 21 ALL65.TXT ! 21 ALL65.TXT
! 22 kvasd.dat ! 22 kvasd.dat
! 23 CALL3.TXT ! 23 CALL3.TXT
@ -73,19 +73,19 @@ subroutine ftn_init
#endif #endif
#ifdef Win32 #ifdef Win32
open(19,file=appdir(:iz)//'/bandmap.txt',status='unknown', & open(19,file=appdir(:iz)//'/messages.txt',status='unknown', &
share='denynone',err=911) share='denynone',err=911)
#else #else
open(19,file=appdir(:iz)//'/bandmap.txt',status='unknown', & open(19,file=appdir(:iz)//'/messages.txt',status='unknown', &
err=911) err=911)
#endif #endif
endfile 19 endfile 19
#ifdef Win32 #ifdef Win32
open(20,file=appdir(:iz)//'/bandmap2.txt',status='unknown', & open(20,file=appdir(:iz)//'/bandmap.txt',status='unknown', &
share='denynone',err=912) share='denynone',err=912)
#else #else
open(20,file=appdir(:iz)//'/bandmap2.txt',status='unknown', & open(20,file=appdir(:iz)//'/bandmap.txt',status='unknown', &
err=912) err=912)
#endif #endif
endfile 20 endfile 20
@ -135,9 +135,9 @@ subroutine ftn_init
910 print*,'Error opening DECODED.TXT' 910 print*,'Error opening DECODED.TXT'
stop stop
911 print*,'Error opening bandmap.txt' 911 print*,'Error opening messages.txt'
stop stop
912 print*,'Error opening bandmap2.txt' 912 print*,'Error opening bandmap.txt'
stop stop
920 print*,'Error opening DECODED.AVE' 920 print*,'Error opening DECODED.AVE'
stop stop

116
map65.py
View File

@ -1,4 +1,4 @@
#--------------------------------------------------------------------- MAP65 #-------------------------------------------------------------------- MAP65
# $Date$ $Revision$ # $Date$ $Revision$
# #
from Tkinter import * from Tkinter import *
@ -82,7 +82,6 @@ nopen=0
nosh441=IntVar() nosh441=IntVar()
noshjt65=IntVar() noshjt65=IntVar()
setseq=IntVar() setseq=IntVar()
textheight=7
tx6alt="" tx6alt=""
txsnrdb=99. txsnrdb=99.
TxFirst=IntVar() TxFirst=IntVar()
@ -167,8 +166,8 @@ def testmsgs():
tx5.insert(0,"@1000") tx5.insert(0,"@1000")
tx6.insert(0,"@2000") tx6.insert(0,"@2000")
#------------------------------------------------------ bandmap #------------------------------------------------------
def bandmap(event=NONE): def messages(event=NONE):
global Version,bm,bm_geom,bmtext global Version,bm,bm_geom,bmtext
bm=Toplevel(root) bm=Toplevel(root)
bm.title("Messages") bm.title("Messages")
@ -187,8 +186,8 @@ def bandmap(event=NONE):
bmtext.tag_configure('age3',foreground='gray50') bmtext.tag_configure('age3',foreground='gray50')
iframe_bm1.pack(expand=1, fill=X, padx=4) iframe_bm1.pack(expand=1, fill=X, padx=4)
#------------------------------------------------------ bandmap2 #------------------------------------------------------ bandmap
def bandmap2(event=NONE): def bandmap(event=NONE):
global Version,bm2,bm2_geom,bm2text global Version,bm2,bm2_geom,bm2text
bm2=Toplevel(root) bm2=Toplevel(root)
bm2.title("Band Map") bm2.title("Band Map")
@ -518,23 +517,19 @@ def cleartext():
#------------------------------------------------------ ModeJT65 #------------------------------------------------------ ModeJT65
def ModeJT65(): def ModeJT65():
global isync,textheight,itol global isync,itol
cleartext() cleartext()
Audio.gcom1.trperiod=60 Audio.gcom1.trperiod=60
iframe4b.pack(after=iframe4,expand=1, fill=X, padx=4) iframe4b.pack(after=iframe4,expand=1, fill=X, padx=4)
textheight=7
text.configure(height=textheight)
bclravg.configure(state=NORMAL) bclravg.configure(state=NORMAL)
binclude.configure(state=NORMAL) binclude.configure(state=NORMAL)
bexclude.configure(state=NORMAL) bexclude.configure(state=NORMAL)
graph2.configure(bg='#66FFFF')
itol=4 itol=4
inctol() inctol()
nfreeze.set(0) nfreeze.set(0)
ntx.set(1) ntx.set(1)
GenStdMsgs() GenStdMsgs()
erase() erase()
# graph2.pack_forget()
#------------------------------------------------------ ModeJT65A #------------------------------------------------------ ModeJT65A
def ModeJT65A(event=NONE): def ModeJT65A(event=NONE):
@ -607,13 +602,12 @@ Shift+F6 Decode all wave files in directory
F8 Set JT65A mode F8 Set JT65A mode
Shift+F8 Set JT65B mode Shift+F8 Set JT65B mode
Ctrl+F8 Set JT65C mode Ctrl+F8 Set JT65C mode
F10 Show SpecJT F10 Show Waterfall
Shift+F10 Show astronomical data Shift+F10 Show astronomical data
Alt+1 to Alt+6 Tx1 to Tx6 Alt+1 to Alt+6 Tx1 to Tx6
Alt+A Toggle Auto On/Off Alt+A Toggle Auto On/Off
Alt+D Decode Alt+D Decode
Alt+E Erase Alt+E Erase
Alt+F Toggle Freeze
Alt+G Generate Standard Messages Alt+G Generate Standard Messages
Ctrl+G Generate Alternate JT65 Messages Ctrl+G Generate Alternate JT65 Messages
Alt+I Include Alt+I Include
@ -624,7 +618,6 @@ Alt+O Tx Stop
Alt+Q Log QSO Alt+Q Log QSO
Alt+S Stop Monitoring or Decoding Alt+S Stop Monitoring or Decoding
Alt+X Exclude Alt+X Exclude
Alt+Z Toggle Zap
Right/Left Arrow Increase/decrease Freeze DF Right/Left Arrow Increase/decrease Freeze DF
""" """
Label(scwid,text=t,justify=LEFT).pack(padx=20) Label(scwid,text=t,justify=LEFT).pack(padx=20)
@ -638,17 +631,14 @@ def mouse_commands(event=NONE):
t=""" t="""
Click on Action Click on Action
-------------------------------------------------------- --------------------------------------------------------
Waterfall Click to set DF for Freeze Waterfall (upper) Click to set QSO frequency; double-click to set
Double-click to Freeze and Decode QSO frequency and Decode
Main screen, Click to set DF for Freeze Waterfall (lower) Click to set target DF; double-click to set
graphics area Double-click to Freeze and Decode target DF and Decode
Main screen, Double-click puts callsign in Tx messages Main screen, Double-click puts callsign in Tx messages
text area Right-double-click also sets Auto ON text area
Sync, Clip, Left/Right click to increase/decrease
Tol, ...
""" """
Label(scwid,text=t,justify=LEFT).pack(padx=20) Label(scwid,text=t,justify=LEFT).pack(padx=20)
scwid.focus_set() scwid.focus_set()
@ -753,14 +743,12 @@ def decdsec(event):
#------------------------------------------------------ erase #------------------------------------------------------ erase
def erase(event=NONE): def erase(event=NONE):
graph1.delete(ALL)
text.configure(state=NORMAL) text.configure(state=NORMAL)
text.delete('1.0',END) text.delete('1.0',END)
text.configure(state=DISABLED) text.configure(state=DISABLED)
avetext.configure(state=NORMAL) avetext.configure(state=NORMAL)
avetext.delete('1.0',END) avetext.delete('1.0',END)
avetext.configure(state=DISABLED) avetext.configure(state=DISABLED)
lab3.configure(text=" ")
Audio.gcom2.decodedfile=" " Audio.gcom2.decodedfile=" "
#------------------------------------------------------ clear_avg #------------------------------------------------------ clear_avg
def clear_avg(event=NONE): def clear_avg(event=NONE):
@ -952,13 +940,17 @@ def update():
if len(HisGrid.get().strip())<4: if len(HisGrid.get().strip())<4:
g.ndop=g.ndop00 g.ndop=g.ndop00
g.dfdt=g.dfdt0 g.dfdt=g.dfdt0
astrotext.delete(1.0,END)
graph2.delete(ALL) astrotext.insert(END,' Moon\n')
graph2.create_text(80,13,anchor=CENTER,text="Moon",font=g2font) astrotext.insert(END,"Az: %7.1f\n" % g.AzMoon)
graph2.create_text(13,37,anchor=W, text="Az: %6.2f" % g.AzMoon,font=g2font) astrotext.insert(END,"El: %7.1f\n" % g.ElMoon)
graph2.create_text(13,61,anchor=W, text="El: %6.2f" % g.ElMoon,font=g2font) astrotext.insert(END,"DxAz: %5.1f\n" % g.AzMoonB)
graph2.create_text(13,85,anchor=W, text="Dop:%6d" % g.ndop,font=g2font) astrotext.insert(END,"DxEl: %5.1f\n" % g.ElMoonB)
graph2.create_text(13,109,anchor=W,text="Dgrd:%5.1f" % g.Dgrd,font=g2font) astrotext.insert(END,' Sun\n')
astrotext.insert(END,"Az: %7.1f\n" % g.AzSun)
astrotext.insert(END,"El: %7.1f\n\n" % g.ElSun)
astrotext.insert(END,"Dop:%7d\n" % g.ndop)
astrotext.insert(END,"Dgrd:%6.1f\n" % g.Dgrd)
if g.freeze_decode and mode.get()[:4]=='JT65': if g.freeze_decode and mode.get()[:4]=='JT65':
itol=5 itol=5
@ -976,10 +968,8 @@ def update():
g.freeze_decode=0 g.freeze_decode=0
t=g.ftnstr(Audio.gcom2.decodedfile) t=g.ftnstr(Audio.gcom2.decodedfile)
# i=t.rfind(".")
i=g.rfnd(t,".") i=g.rfnd(t,".")
t=t[:i] t=t[:i]
lab3.configure(text=t)
if mode.get() != g.mode or first: if mode.get() != g.mode or first:
msg2.configure(bg='#00FFFF') msg2.configure(bg='#00FFFF')
g.mode=mode.get() g.mode=mode.get()
@ -1093,7 +1083,7 @@ def update():
if Audio.gcom2.ndecdone==2: if Audio.gcom2.ndecdone==2:
try: try:
f=open(appdir+'/bandmap.txt',mode='r') f=open(appdir+'/messages.txt',mode='r')
lines=f.readlines() lines=f.readlines()
f.close() f.close()
except: except:
@ -1116,7 +1106,7 @@ def update():
bmtext.see(END) bmtext.see(END)
try: try:
f=open(appdir+'/bandmap2.txt',mode='r') f=open(appdir+'/bandmap.txt',mode='r')
lines=f.readlines() lines=f.readlines()
f.close() f.close()
except: except:
@ -1249,8 +1239,8 @@ viewmenu=Menu(viewbutton,tearoff=0)
viewbutton['menu']=viewmenu viewbutton['menu']=viewmenu
viewmenu.add('command', label = 'SpecJT', command = showspecjt, \ viewmenu.add('command', label = 'SpecJT', command = showspecjt, \
accelerator='F10') accelerator='F10')
viewmenu.add('command', label = 'Band Map 1', command = bandmap) viewmenu.add('command', label = 'Messages', command = messages)
viewmenu.add('command', label = 'Band Map 2', command = bandmap2) viewmenu.add('command', label = 'Band Map', command = bandmap)
viewmenu.add('command', label = 'Astronomical data', command = astro1, \ viewmenu.add('command', label = 'Astronomical data', command = astro1, \
accelerator='Shift+F10') accelerator='Shift+F10')
@ -1288,8 +1278,8 @@ decodemenu.add_radiobutton(label = 'Normal Deep Search',
variable=ndepth, value=1) variable=ndepth, value=1)
decodemenu.add_radiobutton(label = 'Aggressive Deep Search', decodemenu.add_radiobutton(label = 'Aggressive Deep Search',
variable=ndepth, value=2) variable=ndepth, value=2)
decodemenu.add_radiobutton(label ='Include Average in Aggressive Deep Search', #decodemenu.add_radiobutton(label ='Include Average in Aggressive Deep Search',
variable=ndepth, value=3) # variable=ndepth, value=3)
#------------------------------------------------------ Save menu #------------------------------------------------------ Save menu
savebutton = Menubutton(mbar, text = 'Save') savebutton = Menubutton(mbar, text = 'Save')
@ -1331,43 +1321,17 @@ helpmenu.add('command', label = 'Available suffixes and add-on prefixes', \
helpmenu.add('command', label = 'About MAP65', command = about, \ helpmenu.add('command', label = 'About MAP65', command = about, \
accelerator='Ctrl+F1') accelerator='Ctrl+F1')
#------------------------------------------------------ Graphics areas
iframe1 = Frame(frame, bd=1, relief=SUNKEN)
graph1=Canvas(iframe1, bg='black', width=500, height=120,cursor='crosshair')
Widget.bind(graph1,"<Motion>",dtdf_change)
Widget.bind(graph1,"<Button-1>",mouse_click_g1)
Widget.bind(graph1,"<Double-Button-1>",double_click_g1)
Widget.bind(graph1,"<ButtonRelease-1>",mouse_up_g1)
Widget.bind(graph1,"<Button-3>",mouse_click_g1)
graph1.pack(side=LEFT)
graph2=Canvas(iframe1, bg='black', width=150, height=120,cursor='crosshair')
graph2.pack(side=LEFT)
g2font=graph2.option_get("font","font")
if g2font!="": g.g2font=g2font
iframe1.pack(expand=1, fill=X, padx=4)
#------------------------------------------------------ Labels under graphics #------------------------------------------------------ Labels under graphics
iframe2a = Frame(frame, bd=1, relief=FLAT, height=15)
lab1=Label(iframe2a, text='Time (s)')
lab1.place(x=250, y=6, anchor=CENTER)
lab3=Label(iframe2a, text=' ')
lab3.place(x=400,y=6, anchor=CENTER)
iframe2a.pack(expand=1, fill=X, padx=1)
iframe2 = Frame(frame, bd=1, relief=FLAT,height=15) iframe2 = Frame(frame, bd=1, relief=FLAT,height=15)
#lab2=Label(iframe2, text=' UTC dB DT DF W')
lab2=Label(iframe2, text='Freq DF Pol UTC dB DT W') lab2=Label(iframe2, text='Freq DF Pol UTC dB DT W')
lab2.place(x=3,y=6, anchor='w') lab2.place(x=3,y=6, anchor='w')
lab6=Label(iframe2a,text='0.0',bg='green') lab7=Label(iframe2,text='F3',fg='gray85')
lab6.place(x=40,y=6, anchor=CENTER)
lab7=Label(iframe2a,text='F3',fg='gray85')
lab7.place(x=495,y=6, anchor=CENTER) lab7.place(x=495,y=6, anchor=CENTER)
lab8=Label(iframe2a,text='1.0000 1.0000',fg='gray85')
lab8.place(x=135,y=6, anchor=CENTER)
iframe2.pack(expand=1, fill=X, padx=4) iframe2.pack(expand=1, fill=X, padx=4)
#-------------------------------------------------------- Decoded text #-------------------------------------------------------- Decoded text
iframe4 = Frame(frame, bd=1, relief=SUNKEN) iframe4 = Frame(frame, bd=2, relief=SUNKEN)
text=Text(iframe4, height=6, width=80) text=Text(iframe4, height=16, width=65)
text.bind('<Double-Button-1>',dbl_click_text) text.bind('<Double-Button-1>',dbl_click_text)
#text.bind('<Double-Button-3>',dbl_click_text) #text.bind('<Double-Button-3>',dbl_click_text)
text.bind('<Key>',textkey) text.bind('<Key>',textkey)
@ -1434,11 +1398,18 @@ root.bind_all('<Control-L>',lookup_gen)
text.pack(side=LEFT, fill=X, padx=1) text.pack(side=LEFT, fill=X, padx=1)
sb = Scrollbar(iframe4, orient=VERTICAL, command=text.yview) sb = Scrollbar(iframe4, orient=VERTICAL, command=text.yview)
sb.pack(side=RIGHT, fill=Y) sb.pack(side=LEFT, fill=Y)
text.configure(yscrollcommand=sb.set) text.configure(yscrollcommand=sb.set)
astrotext_font='"Lucida Console" 16'
astrotext=Text(iframe4, bg="#66FFFF",height=10,width=11,font=astrotext_font)
astrotext.pack(side=LEFT, fill=BOTH, padx=4)
g2font=astrotext_font
if g2font!="": g.g2font=g2font
iframe4.pack(expand=1, fill=X, padx=4) iframe4.pack(expand=1, fill=X, padx=4)
iframe4b = Frame(frame, bd=1, relief=SUNKEN) iframe4b = Frame(frame, bd=2, relief=SUNKEN)
avetext=Text(iframe4b, height=2, width=80) avetext=Text(iframe4b, height=2, width=65)
avetext.bind('<Double-Button-1>',dbl_click_ave) avetext.bind('<Double-Button-1>',dbl_click_ave)
#avetext.bind('<Double-Button-3>',dbl_click_ave) #avetext.bind('<Double-Button-3>',dbl_click_ave)
avetext.bind('<Key>',avetextkey) avetext.bind('<Key>',avetextkey)
@ -1467,7 +1438,6 @@ btxstop=Button(iframe4c,text='TxStop',underline=4,command=txstop,
padx=1,pady=1) padx=1,pady=1)
blogqso.pack(side=LEFT,expand=1,fill=X) blogqso.pack(side=LEFT,expand=1,fill=X)
#bplay.pack(side=LEFT,expand=1,fill=X)
bstop.pack(side=LEFT,expand=1,fill=X) bstop.pack(side=LEFT,expand=1,fill=X)
bmonitor.pack(side=LEFT,expand=1,fill=X) bmonitor.pack(side=LEFT,expand=1,fill=X)
bdecode.pack(side=LEFT,expand=1,fill=X) bdecode.pack(side=LEFT,expand=1,fill=X)
@ -1728,8 +1698,8 @@ monitor()
first=1 first=1
if g.Win32: root.iconbitmap("wsjt.ico") if g.Win32: root.iconbitmap("wsjt.ico")
root.title(' MAP65 by K1JT') root.title(' MAP65 by K1JT')
messages()
bandmap() bandmap()
bandmap2()
import astro import astro
import specjt import specjt

View File

@ -156,7 +156,8 @@ subroutine map65a(newdat)
if(freq-freq0.gt.ftol .or. sync1.gt.sync10 .and. nqd.eq.0) then if(freq-freq0.gt.ftol .or. sync1.gt.sync10 .and. nqd.eq.0) then
nflip=nint(flipk) nflip=nint(flipk)
call decode1a(id(1,1,kbuf),newdat,nfilt,freq,nflip,dphi, & call decode1a(id(1,1,kbuf),newdat,nfilt,freq,nflip, &
mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi, &
ipol,sync2,a,dt,pol,nkv,nhist,qual,decoded) ipol,sync2,a,dt,pol,nkv,nhist,qual,decoded)
km=km+1 km=km+1
sig(km,1)=nfile sig(km,1)=nfile