Starting on the data input and waterfall display necessities ...

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@332 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2007-01-09 17:46:02 +00:00
parent 4ef03f3b8e
commit 170e192c89
5 changed files with 33 additions and 25 deletions

View File

@ -19,12 +19,12 @@ SRCS2F90 = a2d.f90 astro0.f90 audio_init.f90 azdist0.f90 \
i1tor4.f90 pix2d65.f90 rfile.f90 savedata.f90 spec.f90 \ i1tor4.f90 pix2d65.f90 rfile.f90 savedata.f90 spec.f90 \
wsjtgen.f90 runqqq.f90 fivehz.f90 wsjtgen.f90 runqqq.f90 fivehz.f90
SRCS2F77 = wsjt1.f avesp2.f bzap.f \ SRCS2F77 = wsjt1.f bzap.f avesp2.f flatten.f \
stdecode.f indexx.f s2shape.f flat2.f gen65.f chkmsg.f \ indexx.f flat2.f gen65.f chkmsg.f \
gentone.f \ gentone.f gencwid.f \
set.f flatten.f db.f pctile.f sort.f ssort.f ps.f smooth.f \ set.f db.f pctile.f sort.f ssort.f ps.f smooth.f \
peakup.f sync.f detect.f avemsg65.f decode65.f demod64a.f \ peakup.f avemsg65.f decode65.f demod64a.f \
encode65.f extract.f flat1.f four2.f gencw.f getpfx1.f \ encode65.f extract.f flat1.f four2.f getpfx1.f \
getpfx2.f getsnr.f graycode.f grid2k.f interleave63.f k2grid.f \ getpfx2.f getsnr.f graycode.f grid2k.f interleave63.f k2grid.f \
limit.f lpf1.f deep65.f morse.f nchar.f packcall.f packgrid.f \ limit.f lpf1.f deep65.f morse.f nchar.f packcall.f packgrid.f \
packmsg.f packtext.f setup65.f short65.f slope.f spec2d65.f \ packmsg.f packtext.f setup65.f short65.f slope.f spec2d65.f \

View File

@ -36,7 +36,6 @@ integer newdat !New data available for waterfall? GUI
integer ndsec !Dsec in units of 0.1 s GUI integer ndsec !Dsec in units of 0.1 s GUI
integer ndevin !Device# for audio input GUI integer ndevin !Device# for audio input GUI
integer ndevout !Device# for audio output GUI integer ndevout !Device# for audio output GUI
integer nx !x coordinate for waterfall pixmap GUI
integer mfsample !Measured sample rate, input SoundIn integer mfsample !Measured sample rate, input SoundIn
integer mfsample2 !Measured sample rate, output SoundOut integer mfsample2 !Measured sample rate, output SoundOut
integer ns0 !Time at last ALL.TXT date entry Decoder integer ns0 !Time at last ALL.TXT date entry Decoder
@ -46,7 +45,7 @@ common/gcom1/Tbuf(1024),ntrbuf(1024),Tsec,rxdelay,txdelay, &
samfacin,samfacout,txsnrdb,y1(NRXMAX),y2(NRXMAX), & samfacin,samfacout,txsnrdb,y1(NRXMAX),y2(NRXMAX), &
nmax,iwrite,iread,iwave(NTXMAX),nwave,TxOK,Receiving,Transmitting, & nmax,iwrite,iread,iwave(NTXMAX),nwave,TxOK,Receiving,Transmitting, &
TxFirst,TRPeriod,ibuf,ibuf0,ave,rms,ngo,level,mute,newdat,ndsec, & TxFirst,TRPeriod,ibuf,ibuf0,ave,rms,ngo,level,mute,newdat,ndsec, &
ndevin,ndevout,nx,mfsample,mfsample2,ns0,devin_name,devout_name ndevin,ndevout,mfsample,mfsample2,ns0,devin_name,devout_name
!### volatile /gcom1/ !### volatile /gcom1/

View File

@ -120,6 +120,7 @@ static int SoundOut( void *inputBuffer, void *outputBuffer,
} else { } else {
memset((void*)outputBuffer, 0, 2*sizeof(short)*framesPerBuffer); memset((void*)outputBuffer, 0, 2*sizeof(short)*framesPerBuffer);
} }
fivehz_(); //Call fortran routine
fivehztx_(); //Call fortran routine fivehztx_(); //Call fortran routine
return 0; return 0;
} }

View File

@ -1,17 +1,18 @@
!---------------------------------------------------- spec !---------------------------------------------------- spec
subroutine spec(brightness,contrast,logmap,ngain,nspeed,a) subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
! Called by SpecJT in its TopLevel Python code. ! Called by SpecJT.
! Probably should use the "!f2py intent(...)" structure here. ! Probably should use the "!f2py intent(...)" structure here.
! Input: ! Input:
parameter (NX=750,NY=130,NTOT=NX*NY)
integer brightness,contrast !Display parameters integer brightness,contrast !Display parameters
integer ngain !Digital gain for input audio integer ngain !Digital gain for input audio
integer nspeed !Scrolling speed index integer nspeed !Scrolling speed index
! Output: ! Output:
integer*2 a(225000) !Pixel values for 750 x 300 array integer*2 a(NTOT) !Pixel values for NX x NY array
real a0(225000) !Save the last 300 spectra real a0(NTOT) !Save the last NY spectra
integer nstep(5) integer nstep(5)
integer b0,c0 integer b0,c0
real x(4096) !Data for FFT real x(4096) !Data for FFT
@ -45,7 +46,6 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
c0=-999 c0=-999
logmap0=-999 logmap0=-999
nspeed0=-999 nspeed0=-999
nx=0
ncall=0 ncall=0
jza=0 jza=0
rms=0. rms=0.
@ -123,15 +123,15 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
if(nsum.ge.nstep(nspeed)) then !Integrate for specified time if(nsum.ge.nstep(nspeed)) then !Integrate for specified time
nlines=nlines+1 nlines=nlines+1
do i=225000,751,-1 !Move spectra up one row do i=NTOT,NX+1,-1 !Move spectra up one row
a0(i)=a0(i-750) ! (will be "down" on display) a0(i)=a0(i-NX) ! (will be "down" on display)
enddo enddo
if(ndiskdat.eq.1 .and. nlines.eq.1) then if(ndiskdat.eq.1 .and. nlines.eq.1) then
do i=1,750 do i=1,NX
a0(i)=255 a0(i)=255
enddo enddo
do i=225000,751,-1 do i=NTOT,NX+1,-1
a0(i)=a0(i-750) a0(i)=a0(i-NX)
enddo enddo
endif endif
@ -142,10 +142,10 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
i0=182 + nint((nfmid-1500)/df) i0=182 + nint((nfmid-1500)/df)
if(i0.lt.0) ia=1-i0 if(i0.lt.0) ia=1-i0
else if(nfrange.eq.4000) then else if(nfrange.eq.4000) then
i0=nint(nfmid/df - 752.0) i0=nint(nfmid/df - (NX+2.0))
if(i0.lt.0) ia=1-i0/2 if(i0.lt.0) ia=1-i0/2
endif endif
do i=ia,750 !Insert new data in top row do i=ia,NX !Insert new data in top row
if(nfrange.eq.2000) then if(nfrange.eq.2000) then
a0(i)=5*ss(i+i0)/nsum a0(i)=5*ss(i+i0)/nsum
else if(nfrange.eq.4000) then else if(nfrange.eq.4000) then
@ -158,7 +158,7 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
do i=1,nh !Zero the accumulating array do i=1,nh !Zero the accumulating array
ss(i)=0. ss(i)=0.
enddo enddo
if(jz.lt.300) jz=jz+1 if(jz.lt.NY) jz=jz+1
endif endif
if(ndiskdat.eq.1) then if(ndiskdat.eq.1) then
@ -171,11 +171,11 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
if(npts.ge.4096) go to 10 if(npts.ge.4096) go to 10
! Compute pixel values ! Compute pixel values
iz=750 iz=NX
logmap=0 logmap=0
if(brightness.ne.b0 .or. contrast.ne.c0 .or. logmap.ne.logmap0 .or. & if(brightness.ne.b0 .or. contrast.ne.c0 .or. logmap.ne.logmap0 .or. &
nspeed.ne.nspeed0 .or. nlines.gt.1) then nspeed.ne.nspeed0 .or. nlines.gt.1) then
iz=225000 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

View File

@ -68,11 +68,19 @@ tol0=400
ttot=0.0 ttot=0.0
c=Canvas() c=Canvas()
a=zeros(225000,'s')
im=Image.new('P',(750,300)) a=zeros(750*130,'s')
im=Image.new('P',(750,130))
line0=Image.new('P',(750,1)) #Image fragment for top line of waterfall line0=Image.new('P',(750,1)) #Image fragment for top line of waterfall
draw=ImageDraw.Draw(im) draw=ImageDraw.Draw(im)
pim=ImageTk.PhotoImage(im) pim=ImageTk.PhotoImage(im)
a2=zeros(750*130,'s')
im2=Image.new('P',(750,130))
line02=Image.new('P',(750,1)) #Image fragment for top line of zoomed waterfall
draw2=ImageDraw.Draw(im2)
pim2=ImageTk.PhotoImage(im2)
balloon=Pmw.Balloon(root) balloon=Pmw.Balloon(root)
def pal_gray0(): def pal_gray0():