Log scale in waterfalls.

Remove rfile2.
Remove call to hrtime.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@607 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2007-12-28 17:33:18 +00:00
parent a9fc41b0ee
commit 5e4fb0f31e
6 changed files with 25 additions and 37 deletions

View File

@ -37,8 +37,6 @@ C NB: may want to smooth the Tsky map to 10 degrees or so.
open(13,file=fname,status='old',access='stream',err=10) open(13,file=fname,status='old',access='stream',err=10)
read(13) nsky read(13) nsky
close(13) close(13)
! call rfile2(fname,nsky,129600,nr)
! if(nr.ne.129600) go to 10
#endif #endif
ltsky=.true. ltsky=.true.
first=.false. first=.false.

View File

@ -33,22 +33,12 @@ subroutine getfile2(fname,len)
ndecoding=4 ndecoding=4
monitoring=0 monitoring=0
kbuf=1 kbuf=1
!#ifdef CVF
! open(10,file=fname,form='binary',status='old',err=998)
call rfile3a(fname,id,n,ierr) call rfile3a(fname,id,n,ierr)
if(ierr.ne.0) then if(ierr.ne.0) then
print*,'Error opening or reading file: ',fname,ierr print*,'Error opening or reading file: ',fname,ierr
go to 999 go to 999
endif endif
!#else
! call rfile2(fname,id,n,nr)
! if(nr.ne.n) then
! print*,'Error opening or reading file: ',fname,n,nr
! ierr=1002
! go to 999
! endif
!
!#endif
sq=0. sq=0.
ka=0.1*NSMAX ka=0.1*NSMAX

View File

@ -1,4 +1,4 @@
#--------------------------------------------------------------------- MAP65 #-------------------------------------------------------------------- MAP65
# $Date$ $Revision$ # $Date$ $Revision$
# #
from Tkinter import * from Tkinter import *

View File

@ -1,14 +1,5 @@
real function sec_midn() real function sec_midn()
real*8 sec8,hrtime
#ifdef CVF
sec_midn=secnds(0.0) sec_midn=secnds(0.0)
#else
sec8=hrtime()
sec_midn=mod(sec8,86400.d0)
#endif
return return
end function sec_midn end function sec_midn

View File

@ -89,9 +89,13 @@ subroutine spec(brightness,contrast,ngain,nspeed,a,a2)
a2(i)=a2(i-newpts) a2(i)=a2(i-newpts)
enddo enddo
gain=40*sqrt(nstep(nspeed)/5.0) * 5.0**(0.01*contrast) logmap=1
gamma=1.3 + 0.01*contrast gamma=1.3 + 0.01*contrast
offset=(brightness+64.0)/2 offset=(brightness+64.0)/2
if(logmap.eq.1) then
gain=40*sqrt(nstep(nspeed)/5.0) * 5.0**(0.01*contrast)
offset=brightness/2 + 10
endif
fac=20.0/nadd fac=20.0/nadd
fac=fac*0.065/base fac=fac*0.065/base
! fac=fac*(0.1537/base) ! fac=fac*(0.1537/base)
@ -120,14 +124,16 @@ subroutine spec(brightness,contrast,ngain,nspeed,a,a2)
x=max(x,s(ii,j)) x=max(x,s(ii,j))
enddo enddo
x=fac*x x=fac*x
if(x.gt.0.0) n=(2.0*x)**gamma + offset if(x.gt.0.0 .and. logmap.eq.0) n=(2.0*x)**gamma + offset
if(x.gt.0.0 .and. logmap.eq.1) n=gain*log10(1.0*x) + offset
n=min(252,max(0,n)) n=min(252,max(0,n))
a(k)=n a(k)=n
! Now do the lower (zoomed) waterfall with one FFT bin per pixel. ! Now do the lower (zoomed) waterfall with one FFT bin per pixel.
n=0 n=0
x=fac*s(i0+i-1,j) x=fac*s(i0+i-1,j)
if(x.gt.0.0) n=(3.0*x)**gamma + offset if(x.gt.0.0 .and. logmap.eq.0) n=(3.0*x)**gamma + offset
if(x.gt.0.0 .and. logmap.eq.1) n=1.2*gain*log10(1.0*x) + offset
n=min(252,max(0,n)) n=min(252,max(0,n))
a2(k)=n a2(k)=n

View File

@ -64,6 +64,9 @@ subroutine wsjtgen
testfile=msg(2:) testfile=msg(2:)
#ifdef CVF #ifdef CVF
open(18,file=testfile,form='binary',status='old',err=12) open(18,file=testfile,form='binary',status='old',err=12)
#else
open(18,file=testfile,access='stream',status='old',err=12)
#endif
go to 14 go to 14
12 print*,'Cannot open test file ',msg(2:) 12 print*,'Cannot open test file ',msg(2:)
go to 999 go to 999
@ -73,17 +76,17 @@ subroutine wsjtgen
close(18) close(18)
if(ierr.ne.0) print*,'Error reading test file ',msg(2:) if(ierr.ne.0) print*,'Error reading test file ',msg(2:)
#else !#else
tfile2=testfile ! tfile2=testfile
call rfile2(tfile2,hdr,44+2*661500,nr) ! call rfile2(tfile2,hdr,44+2*661500,nr)
if(nr.le.0) then ! if(nr.le.0) then
print*,'Error reading ',testfile ! print*,'Error reading ',testfile
stop ! stop
endif ! endif
do i=1,ndata/2 ! do i=1,ndata/2
iwave(i)=jwave(i) ! iwave(i)=jwave(i)
enddo ! enddo
#endif !#endif
nwave=ndata/2 nwave=ndata/2
do i=nwave,NTXMAX do i=nwave,NTXMAX
iwave(i)=0 iwave(i)=0