mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-19 02:22:10 -05:00
IMplemented "Save All".
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@480 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
f872770875
commit
76cb2b7922
@ -18,7 +18,7 @@
|
||||
! 25 meas25.dat
|
||||
! 26 tmp26.tmp
|
||||
! 27 dphi.txt
|
||||
|
||||
! 28 saved *.tf2 files
|
||||
!------------------------------------------------ ftn_init
|
||||
subroutine ftn_init
|
||||
|
||||
|
5
map65.py
5
map65.py
@ -1,4 +1,4 @@
|
||||
#---------------------------------------------------------------------- MAP65
|
||||
#--------------------------------------------------------------------- MAP65
|
||||
# $Date$ $Revision$
|
||||
#
|
||||
from Tkinter import *
|
||||
@ -1342,8 +1342,7 @@ savemenu = Menu(savebutton, tearoff=1)
|
||||
savebutton['menu'] = savemenu
|
||||
nsave=IntVar()
|
||||
savemenu.add_radiobutton(label = 'None', variable=nsave,value=0)
|
||||
savemenu.add_radiobutton(label = 'Save timf2', variable=nsave,value=1,
|
||||
state=DISABLED)
|
||||
savemenu.add_radiobutton(label = 'Save all', variable=nsave,value=1)
|
||||
nsave.set(0)
|
||||
|
||||
#------------------------------------------------------ Band menu
|
||||
|
@ -334,7 +334,8 @@ subroutine map65a(newdat)
|
||||
call display(nkeep)
|
||||
ndecdone=2
|
||||
|
||||
if(nsave.gt.0) call savetf2(id(1,1,kbuf),nsave,nutc)
|
||||
if(nsave.gt.0 .and. ndiskdat.eq.0) call savetf2(id(1,1,kbuf),nsave, &
|
||||
ntime,nutc,savedir)
|
||||
|
||||
999 close(23)
|
||||
ndphi=0
|
||||
|
56
savetf2.F90
56
savetf2.F90
@ -1,18 +1,63 @@
|
||||
subroutine savetf2(id,nsave,nutc)
|
||||
subroutine savetf2(id,nsave,ntime,nutc,savedir)
|
||||
|
||||
#ifdef Win32
|
||||
use dfport
|
||||
#else
|
||||
external gmtime_r
|
||||
#endif
|
||||
|
||||
parameter (NZ=60*96000)
|
||||
parameter (NSPP=174)
|
||||
parameter (NPKTS=NZ/NSPP)
|
||||
integer*2 id(4,NZ)
|
||||
real*4 ss(NPKTS),ss2(60)
|
||||
real*8 dt,t,t2
|
||||
character*80 savedir,fname
|
||||
integer it(9)
|
||||
|
||||
if(nsave.eq.1) then
|
||||
print*,nsave,nutc
|
||||
print*,savedir
|
||||
|
||||
n2=ntime/60
|
||||
n3=(n2-1)*60
|
||||
|
||||
#ifdef Win32
|
||||
call gmtime(n3,it)
|
||||
#else
|
||||
call gmtime_r(n3,it)
|
||||
#endif
|
||||
it(5)=it(5)+1
|
||||
it(6)=mod(it(6),100)
|
||||
nhr=nutc/100
|
||||
nmin=mod(nutc,100)
|
||||
write(fname,1000) it(6),it(5),it(4),nhr,nmin
|
||||
1000 format('/',3i2.2,'_',2i2.2,'.tf2')
|
||||
do i=80,1,-1
|
||||
if(savedir(i:i).ne.' ') go to 1
|
||||
enddo
|
||||
|
||||
1 iz=i
|
||||
fname=savedir(1:iz)//fname
|
||||
#ifdef Win32
|
||||
open(17,file=fname,status='unknown',form='binary',err=998)
|
||||
write(17) id
|
||||
close(17)
|
||||
#else
|
||||
open(17,file=fname,status='unknown',form='unformatted', &
|
||||
access='direct',recl=nbytes,err=998)
|
||||
write(17,rec=1) id
|
||||
close(17)
|
||||
#endif
|
||||
|
||||
|
||||
else
|
||||
dt=NSPP/96000.d0
|
||||
t=0.d0
|
||||
nh=nutc/100
|
||||
nm=mod(nutc,100)
|
||||
t2=3600*nh + 60*nm
|
||||
fac=1.0/(4.0*NSPP)
|
||||
|
||||
do i=1,NPKTS
|
||||
s=0.
|
||||
do n=1,NSPP
|
||||
@ -45,6 +90,11 @@ subroutine savetf2(id,nsave,nutc)
|
||||
write(25,1010) t,t2,ss2(i)
|
||||
enddo
|
||||
endif
|
||||
endif
|
||||
go to 999
|
||||
|
||||
return
|
||||
998 print*,'Cannot open file:'
|
||||
print*,fname
|
||||
|
||||
999 return
|
||||
end subroutine savetf2
|
||||
|
Loading…
Reference in New Issue
Block a user