mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-20 02:52:00 -05:00
Basic waterfall now works.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@346 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
105aef292d
commit
e375b9baae
@ -97,6 +97,9 @@ subroutine ftn_init
|
|||||||
status='unknown')
|
status='unknown')
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
open(24,file=appdir(:iz)//'/tmp24.txt',status='unknown')
|
||||||
|
open(26,file=appdir(:iz)//'/tmp26.txt',status='unknown')
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
910 print*,'Error opening DECODED.TXT'
|
910 print*,'Error opening DECODED.TXT'
|
||||||
|
11
map65a.f90
11
map65a.f90
@ -32,17 +32,8 @@ subroutine map65a
|
|||||||
nmin=1
|
nmin=1
|
||||||
infile='061111.0745'
|
infile='061111.0745'
|
||||||
|
|
||||||
! Initialize some constants
|
|
||||||
|
|
||||||
! open(22,file='kvasd.dat',access='direct',recl=1024,
|
|
||||||
! + status='unknown')
|
|
||||||
open(23,file='CALL3.TXT',status='unknown')
|
open(23,file='CALL3.TXT',status='unknown')
|
||||||
|
|
||||||
! nbytes=8*(4*96000+9000) !Empirical, for 061111_0744.dat.48
|
|
||||||
! nskip=8*nint(96000*(tskip+4.09375))
|
|
||||||
! n=rfile3(infile,id,nskip) !Skip to start of minute
|
|
||||||
! if(n.ne.nskip) go to 9999
|
|
||||||
|
|
||||||
df=96000.0/NFFT !df = 96000/NFFT = 2.930 Hz
|
df=96000.0/NFFT !df = 96000/NFFT = 2.930 Hz
|
||||||
fa=0.0
|
fa=0.0
|
||||||
fb=60000.0
|
fb=60000.0
|
||||||
@ -53,7 +44,6 @@ subroutine map65a
|
|||||||
nkk=1
|
nkk=1
|
||||||
|
|
||||||
do nfile=1,nmin
|
do nfile=1,nmin
|
||||||
! n=rfile3(infile,id,8*NSMAX) !Read 60 s of data (approx 46 MB)
|
|
||||||
n=8*NSMAX
|
n=8*NSMAX
|
||||||
call rfile3a(infile,id,n,ierr)
|
call rfile3a(infile,id,n,ierr)
|
||||||
newdat=1
|
newdat=1
|
||||||
@ -181,7 +171,6 @@ subroutine map65a
|
|||||||
|
|
||||||
if(freq-freq0.gt.ftol .or. sync1.gt.sync10) then
|
if(freq-freq0.gt.ftol .or. sync1.gt.sync10) then
|
||||||
nflip=nint(flipk)
|
nflip=nint(flipk)
|
||||||
|
|
||||||
call decode1a(id,newdat,nfilt,freq,nflip,ipol, &
|
call decode1a(id,newdat,nfilt,freq,nflip,ipol, &
|
||||||
sync2,a,dt,pol,nkv,nhist,qual,decoded)
|
sync2,a,dt,pol,nkv,nhist,qual,decoded)
|
||||||
kk=kk+1
|
kk=kk+1
|
||||||
|
@ -9,5 +9,6 @@ subroutine rfile3a(infile,ibuf,n,ierr)
|
|||||||
ierr=0
|
ierr=0
|
||||||
go to 999
|
go to 999
|
||||||
998 ierr=1002
|
998 ierr=1002
|
||||||
999 return
|
999 close(10)
|
||||||
|
return
|
||||||
end subroutine rfile3a
|
end subroutine rfile3a
|
||||||
|
69
spec.f90
69
spec.f90
@ -10,68 +10,59 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
|
|||||||
! Output:
|
! Output:
|
||||||
integer*2 a(NTOT) !Pixel values for NX x NY array
|
integer*2 a(NTOT) !Pixel values for NX x NY array
|
||||||
|
|
||||||
! real a0(NTOT) !Save the last NY spectra
|
logical first
|
||||||
integer nstep(5)
|
integer nstep(4)
|
||||||
integer b0,c0
|
integer b0,c0
|
||||||
real s(NFFT)
|
real s(NX,NY)
|
||||||
common/spcom/ss(4,322,NFFT) !169 MB: half-symbol spectra
|
common/spcom/ss(4,322,NFFT) !169 MB: half-symbol spectra
|
||||||
include 'gcom1.f90'
|
include 'gcom1.f90'
|
||||||
include 'gcom2.f90'
|
include 'gcom2.f90'
|
||||||
include 'gcom3.f90'
|
include 'gcom3.f90'
|
||||||
include 'gcom4.f90'
|
include 'gcom4.f90'
|
||||||
data jz/0/ !Number of spectral lines available
|
data first/.true./
|
||||||
data nstep/15,10,5,2,1/ !Integration limits
|
data nstep/16,10,5,3/ !Integration limits
|
||||||
save
|
save
|
||||||
|
|
||||||
|
if(first) then
|
||||||
df=96000.0/nfft
|
df=96000.0/nfft
|
||||||
b0=-999
|
call zero(a,NX*NY/2)
|
||||||
c0=-999
|
first=.false.
|
||||||
logmap0=-999
|
endif
|
||||||
nspeed0=-999
|
|
||||||
nmode=2 !JT65 mode
|
|
||||||
|
|
||||||
nadd=nstep(nspeed)
|
nadd=nstep(nspeed)
|
||||||
nlines=322/nadd
|
nlines=322/nadd
|
||||||
j=0
|
call zero(s,NX*NY)
|
||||||
print*,'A',nspeed,nadd,nlines
|
k=0
|
||||||
do k=1,nlines
|
ia=9001
|
||||||
do i=1,nfft
|
ib=9750
|
||||||
s(i)=0.
|
do j=1,nlines
|
||||||
do n=1,nadd
|
k=k+1
|
||||||
j=j+1
|
do i=ia,ib
|
||||||
s(i)=s(i) + ss(1,j,i) + ss(3,j,i)
|
s(i,j)=s(i,j) + ss(1,k,i) + ss(3,k,i)
|
||||||
enddo
|
enddo
|
||||||
s(i)=s(i)/nadd
|
|
||||||
enddo
|
enddo
|
||||||
print*,'B',k
|
|
||||||
|
|
||||||
! Compute pixel values
|
newpts=NX*nlines
|
||||||
! iz=NX
|
do i=newpts+1,NX*NY
|
||||||
! logmap=0
|
a(i)=a(i-newpts)
|
||||||
! if(brightness.ne.b0 .or. contrast.ne.c0 .or. logmap.ne.logmap0 .or. &
|
enddo
|
||||||
! nspeed.ne.nspeed0 .or. nlines.gt.1) then
|
|
||||||
iz=NTOT
|
|
||||||
gain=40*sqrt(nstep(nspeed)/5.0) * 5.0**(0.01*contrast)
|
gain=40*sqrt(nstep(nspeed)/5.0) * 5.0**(0.01*contrast)
|
||||||
gamma=1.3 + 0.01*contrast
|
gamma=1.3 + 0.01*contrast
|
||||||
offset=(brightness+64.0)/2
|
offset=(brightness+64.0)/2
|
||||||
b0=brightness
|
k=0
|
||||||
c0=contrast
|
do j=1,nlines
|
||||||
logmap0=logmap
|
|
||||||
nspeed0=nspeed
|
|
||||||
ia=10001
|
|
||||||
ib=10750
|
|
||||||
|
|
||||||
do i=ia,ib
|
do i=ia,ib
|
||||||
|
k=k+1
|
||||||
n=0
|
n=0
|
||||||
if(s(i).gt.0.0 .and. logmap.eq.1) n=gain*log10(0.001*s(i)) &
|
x=s(i,j)
|
||||||
+ offset + 20
|
! if(s(i).gt.0.0 .and. logmap.eq.1) n=gain*log10(0.001*s(i)) &
|
||||||
if(s(i).gt.0.0 .and. logmap.eq.0) n=(0.01*s(i))**gamma + offset
|
! + offset + 20
|
||||||
|
if(x.gt.0.0 .and. logmap.eq.0) n=(20.0*x)**gamma + offset
|
||||||
n=min(252,max(0,n))
|
n=min(252,max(0,n))
|
||||||
a(i)=n
|
a(k)=n
|
||||||
enddo
|
enddo
|
||||||
print*,'C'
|
|
||||||
enddo
|
enddo
|
||||||
print*,'D'
|
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine spec
|
end subroutine spec
|
||||||
|
@ -251,6 +251,7 @@ def update():
|
|||||||
newspec=Audio.gcom2.newspec #True if new data available
|
newspec=Audio.gcom2.newspec #True if new data available
|
||||||
if newspec:
|
if newspec:
|
||||||
Audio.spec(brightness,contrast,logm,g0,nspeed,a) #Call Fortran routine spec
|
Audio.spec(brightness,contrast,logm,g0,nspeed,a) #Call Fortran routine spec
|
||||||
|
pass
|
||||||
|
|
||||||
if newspec or brightness!=b0 or contrast!=c0 or logm!=logm0:
|
if newspec or brightness!=b0 or contrast!=c0 or logm!=logm0:
|
||||||
if brightness==b0 and contrast==c0 and logm==logm0:
|
if brightness==b0 and contrast==c0 and logm==logm0:
|
||||||
@ -428,10 +429,10 @@ bfmid3.pack(side=LEFT)
|
|||||||
bfmid2.pack(side=LEFT)
|
bfmid2.pack(side=LEFT)
|
||||||
|
|
||||||
#------------------------------------------------- Speed selection buttons
|
#------------------------------------------------- Speed selection buttons
|
||||||
for i in (5, 4, 3, 2, 1):
|
for i in (4, 3, 2, 1):
|
||||||
t=str(i)
|
t=str(i)
|
||||||
Radiobutton(mbar,text=t,value=i,variable=nspeed0).pack(side=RIGHT)
|
Radiobutton(mbar,text=t,value=i,variable=nspeed0).pack(side=RIGHT)
|
||||||
nspeed0.set(3)
|
nspeed0.set(1)
|
||||||
lab2=Label(mbar,text='Speed: ',bd=0)
|
lab2=Label(mbar,text='Speed: ',bd=0)
|
||||||
lab2.pack(side=RIGHT)
|
lab2.pack(side=RIGHT)
|
||||||
#------------------------------------------------- Graphics frame
|
#------------------------------------------------- Graphics frame
|
||||||
|
Loading…
Reference in New Issue
Block a user