From a7b7805de303ef05e8e1e637d877fd3706079b24 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 3 Jul 2007 18:58:29 +0000 Subject: [PATCH] Can now change brightess or contrast of next spectrum. Waterfall still updates only at end of minute, hoiwever. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@465 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- map65.py | 2 +- map65a.f90 | 8 +++----- specjt.py | 42 ++++++++++++++++++------------------------ 3 files changed, 22 insertions(+), 30 deletions(-) diff --git a/map65.py b/map65.py index 469aee8f7..a6405080b 100644 --- a/map65.py +++ b/map65.py @@ -1,4 +1,4 @@ -#-------------------------------------------------------------------- MAP65 +#--------------------------------------------------------------------- MAP65 # $Date$ $Revision$ # from Tkinter import * diff --git a/map65a.f90 b/map65a.f90 index da9b6e2c1..66bded453 100644 --- a/map65a.f90 +++ b/map65a.f90 @@ -30,11 +30,9 @@ subroutine map65a(newdat) rewind 11 rewind 12 - if(nrw26.ne.0) then - print*,'Rewinding 26' - rewind 26 - nrw26=0 - endif + if(nrw26.ne.0) rewind 26 + nrw26=0 + if(nutc.ne.nutc0) nfile=nfile+1 nutc0=nutc nutcdata=nutc diff --git a/specjt.py b/specjt.py index 42e4c5ea0..48755e790 100644 --- a/specjt.py +++ b/specjt.py @@ -219,30 +219,24 @@ def update(): newspec=Audio.gcom2.newspec #True if new data available if newspec: Audio.spec(brightness,contrast,g0,nspeed,a,a2) #Call Fortran routine spec - - if newspec or brightness!=b0 or contrast!=c0: - if brightness==b0 and contrast==c0: - n=Audio.gcom2.nlines - box=(0,0,NX,130-n) #Define region - region=im.crop(box) #Get all but last line(s) - region2=im2.crop(box) #Get all but last line(s) - box=(125,0,624,120) - try: - im.paste(region,(0,n)) #Move waterfall down - im2.paste(region2,(0,n)) #Move waterfall down - except: - print "Images did not match, continuing anyway." - for i in range(n): - line0.putdata(a[NX*i:NX*(i+1)]) #One row of pixels to line0 - im.paste(line0,(0,i)) #Paste in new top line(s) - line02.putdata(a2[NX*i:NX*(i+1)])#One row of pixels to line0 - im2.paste(line02,(0,i)) #Paste in new top line(s) - nscroll=nscroll+n - else: #A scale factor has changed - im.putdata(a) #Compute whole new image - im2.putdata(a2) #Compute whole new image - b0=brightness #Save scale values - c0=contrast + n=Audio.gcom2.nlines + box=(0,0,NX,130-n) #Define region + region=im.crop(box) #Get all but last line(s) + region2=im2.crop(box) #Get all but last line(s) + box=(125,0,624,120) + try: + im.paste(region,(0,n)) #Move waterfall down + im2.paste(region2,(0,n)) #Move waterfall down + except: + print "Images did not match, continuing anyway." + for i in range(n): + line0.putdata(a[NX*i:NX*(i+1)]) #One row of pixels to line0 + im.paste(line0,(0,i)) #Paste in new top line(s) + line02.putdata(a2[NX*i:NX*(i+1)])#One row of pixels to line0 + im2.paste(line02,(0,i)) #Paste in new top line(s) + nscroll=nscroll+n +# b0=brightness #Save scale values +# c0=contrast if newspec: if Audio.gcom2.monitoring: